Problem/Motivation

When creating a map views with geofield and leaflet, I would like to allow end-user update the exposed proximity filter original coordinates by:

  • Moving the map with mouse click
  • Capture the "moveend" Leaflet event with JS
  • Using JQuery to update the exposed proximity filter original coordinates, with current map center Lat/Lng
  • User click on "search" button will now showing an updated result, based on Lat/Lng just captured

From this point of view, end-user shouldn't manually update the exposed proximity filter form (both the operator for distance, Latitude and Longitude). The form should therefore set as visually-hidden with CSS.

Issue fork geofield-3253240

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hswong3i created an issue. See original summary.

hswong3i’s picture

Issue summary: View changes
Status: Active » Needs review

hswong3i’s picture

Issue summary: View changes
hswong3i’s picture

Status: Needs review » Closed (outdated)

From https://www.drupal.org/project/drupal/issues/3253231#comment-14333970 we found that "visibility: hidden" by themer with CSS could be a more simple and elegant implementation. Therefore we should even simplify existing implementation for geofield (without those fancy "hidden" related options), but not making it more complicated ;-(