I would like to be able to check a box in the Geofield behavior that disables the Geolocate behavior if the Geofield has data in it.

This would allow a Geofield map widget to geolocate the user automatically when they are adding a new Geofield point/line/polygon... but then when they edit it again it will show the one that they created, rather than geolocating them again (if they're not in the same place they were when they created the Geofield, then they have to zoom/pan around to find it again).

Comments

m.stenta’s picture

Status: Active » Closed (won't fix)

I decided on another approach. Rather than trying to get Geofield and Geolocate behaviors to work together, I wrote a simple geolocate button for Openlayers: https://www.drupal.org/project/openlayers_geolocate_button

It allows the user to manually center on their location, rather than it happening automatically when the map is loaded.

This is simpler, and more intuitive than adding extra logic to Geofield's behavior, in my opinion.

Closing this issue as "won't fix".