Loading js/location-picker.js +21 −27 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ var myOptions; var singleClick; Drupal.behaviors.facetsIndexFormatter = { attach: function (context, settings) { geocoder = new google.maps.Geocoder(); Loading Loading @@ -88,14 +87,14 @@ searchapilocation.setMapMarker = function (latLng, i) { // remove old marker and circle if (searchapilocation.markers[i]) { searchapilocation.markers[i].setMap(null); searchapilocation.circles[i].setMap(null); searchapilocation.markers[i].setMap(NULL); searchapilocation.circles[i].setMap(NULL); } // add marker searchapilocation.markers[i] = new google.maps.Marker({ map: searchapilocation.maps[i], draggable: true, draggable: TRUE, animation: google.maps.Animation.DROP, position: latLng, icon: searchapilocation.config[i].marker_image Loading @@ -104,7 +103,7 @@ // Add circle. searchapilocation.circles[i] = new google.maps.Circle({ map: searchapilocation.maps[i], clickable:false, clickable:FALSE, strokeColor: searchapilocation.config[i].radius_border_color, strokeWeight: searchapilocation.config[i].radius_border_weight, fillColor: searchapilocation.config[i].radius_background_color, Loading @@ -116,7 +115,7 @@ // fit the map to te circle searchapilocation.maps[i].fitBounds(searchapilocation.circles[i].getBounds()); return false; // if called from <a>-Tag return FALSE; // if called from <a>-Tag }; // Work on each map Loading @@ -135,7 +134,7 @@ zoom: 12, center: latLng, mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: false scrollwheel: FALSE }; // Create map Loading @@ -161,7 +160,6 @@ $("#sal-" + i + "-slider").val($("#sal-" + i + "-slider").slider( "value" ) ); if (lat && lng) { // Set initial marker searchapilocation.setMapMarker(latLng, i); Loading Loading @@ -189,7 +187,6 @@ }, 500); }); // Detect double click to avoid setting marker google.maps.event.addListener(searchapilocation.maps[i], 'dblclick', function (me) { clearTimeout(singleClick); Loading @@ -202,9 +199,6 @@ searchapilocation.setMapMarker(me.latLng, i); }); }) }); } Loading modules/facets_map_widget/js/facets_map.js +3 −3 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ maxClusterRadius: 140 }); $.each(_this.facetHeatmap.counts_ints2D, function (row, value) { if (value === null) { if (value === NULL) { return; } Loading Loading @@ -133,7 +133,7 @@ this._markers = []; this._childClusters = []; this._childCount = 0; this._iconNeedsUpdate = true; this._iconNeedsUpdate = TRUE; this._bounds = new L.LatLngBounds(); if (a) { this._addChild(a); Loading modules/facets_map_widget/src/Plugin/facets/query_type/SearchApiRpt.php +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ class SearchApiRpt extends QueryTypePluginBase { } $facet_results = []; foreach ($this->results as $key => $result) { foreach ($this->results as $result) { if ($result['count'] || $query_operator == 'or') { $count = $result['count']; $result = new Result($this->facet, $result['filter'], "heatmap", $count); Loading modules/search_api_location_geocoder/src/Plugin/search_api_location/location_input/Geocode.php +2 −2 Original line number Diff line number Diff line Loading @@ -170,7 +170,7 @@ class Geocode extends LocationInputPluginBase implements ContainerFactoryPluginI * The current state of the complete form. */ public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { // TODO: Implement validateConfigurationForm() method. // @todo Implement validateConfigurationForm() method. } /** Loading @@ -183,7 +183,7 @@ class Geocode extends LocationInputPluginBase implements ContainerFactoryPluginI * The current state of the complete form. */ public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { // TODO: Implement submitConfigurationForm() method. // @todo Implement submitConfigurationForm() method. } } modules/search_api_location_geocoder/tests/src/Kernel/GeocodeTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ class GeocodeTest extends KernelTestBase { public function testGetParsedInput() { $input['value'] = 'Ghent'; $parsed = $this->sut->getParsedInput($input); list($lat, $lng) = explode(',', $parsed); [$lat, $lng] = explode(',', $parsed); $this->assertEquals(round($lat, 0, PHP_ROUND_HALF_DOWN), 51); $this->assertEquals(round($lng, 0, PHP_ROUND_HALF_DOWN), 4); } Loading Loading
js/location-picker.js +21 −27 Original line number Diff line number Diff line Loading @@ -15,7 +15,6 @@ var myOptions; var singleClick; Drupal.behaviors.facetsIndexFormatter = { attach: function (context, settings) { geocoder = new google.maps.Geocoder(); Loading Loading @@ -88,14 +87,14 @@ searchapilocation.setMapMarker = function (latLng, i) { // remove old marker and circle if (searchapilocation.markers[i]) { searchapilocation.markers[i].setMap(null); searchapilocation.circles[i].setMap(null); searchapilocation.markers[i].setMap(NULL); searchapilocation.circles[i].setMap(NULL); } // add marker searchapilocation.markers[i] = new google.maps.Marker({ map: searchapilocation.maps[i], draggable: true, draggable: TRUE, animation: google.maps.Animation.DROP, position: latLng, icon: searchapilocation.config[i].marker_image Loading @@ -104,7 +103,7 @@ // Add circle. searchapilocation.circles[i] = new google.maps.Circle({ map: searchapilocation.maps[i], clickable:false, clickable:FALSE, strokeColor: searchapilocation.config[i].radius_border_color, strokeWeight: searchapilocation.config[i].radius_border_weight, fillColor: searchapilocation.config[i].radius_background_color, Loading @@ -116,7 +115,7 @@ // fit the map to te circle searchapilocation.maps[i].fitBounds(searchapilocation.circles[i].getBounds()); return false; // if called from <a>-Tag return FALSE; // if called from <a>-Tag }; // Work on each map Loading @@ -135,7 +134,7 @@ zoom: 12, center: latLng, mapTypeId: google.maps.MapTypeId.ROADMAP, scrollwheel: false scrollwheel: FALSE }; // Create map Loading @@ -161,7 +160,6 @@ $("#sal-" + i + "-slider").val($("#sal-" + i + "-slider").slider( "value" ) ); if (lat && lng) { // Set initial marker searchapilocation.setMapMarker(latLng, i); Loading Loading @@ -189,7 +187,6 @@ }, 500); }); // Detect double click to avoid setting marker google.maps.event.addListener(searchapilocation.maps[i], 'dblclick', function (me) { clearTimeout(singleClick); Loading @@ -202,9 +199,6 @@ searchapilocation.setMapMarker(me.latLng, i); }); }) }); } Loading
modules/facets_map_widget/js/facets_map.js +3 −3 Original line number Diff line number Diff line Loading @@ -55,7 +55,7 @@ maxClusterRadius: 140 }); $.each(_this.facetHeatmap.counts_ints2D, function (row, value) { if (value === null) { if (value === NULL) { return; } Loading Loading @@ -133,7 +133,7 @@ this._markers = []; this._childClusters = []; this._childCount = 0; this._iconNeedsUpdate = true; this._iconNeedsUpdate = TRUE; this._bounds = new L.LatLngBounds(); if (a) { this._addChild(a); Loading
modules/facets_map_widget/src/Plugin/facets/query_type/SearchApiRpt.php +1 −1 Original line number Diff line number Diff line Loading @@ -66,7 +66,7 @@ class SearchApiRpt extends QueryTypePluginBase { } $facet_results = []; foreach ($this->results as $key => $result) { foreach ($this->results as $result) { if ($result['count'] || $query_operator == 'or') { $count = $result['count']; $result = new Result($this->facet, $result['filter'], "heatmap", $count); Loading
modules/search_api_location_geocoder/src/Plugin/search_api_location/location_input/Geocode.php +2 −2 Original line number Diff line number Diff line Loading @@ -170,7 +170,7 @@ class Geocode extends LocationInputPluginBase implements ContainerFactoryPluginI * The current state of the complete form. */ public function validateConfigurationForm(array &$form, FormStateInterface $form_state) { // TODO: Implement validateConfigurationForm() method. // @todo Implement validateConfigurationForm() method. } /** Loading @@ -183,7 +183,7 @@ class Geocode extends LocationInputPluginBase implements ContainerFactoryPluginI * The current state of the complete form. */ public function submitConfigurationForm(array &$form, FormStateInterface $form_state) { // TODO: Implement submitConfigurationForm() method. // @todo Implement submitConfigurationForm() method. } }
modules/search_api_location_geocoder/tests/src/Kernel/GeocodeTest.php +1 −1 Original line number Diff line number Diff line Loading @@ -78,7 +78,7 @@ class GeocodeTest extends KernelTestBase { public function testGetParsedInput() { $input['value'] = 'Ghent'; $parsed = $this->sut->getParsedInput($input); list($lat, $lng) = explode(',', $parsed); [$lat, $lng] = explode(',', $parsed); $this->assertEquals(round($lat, 0, PHP_ROUND_HALF_DOWN), 51); $this->assertEquals(round($lng, 0, PHP_ROUND_HALF_DOWN), 4); } Loading