Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Have set up the following:
- Content type with address field and geofield
- Geofield widget is set to OpenLayers Map
- Geocoder settings are set to 'Enable geocoding of location data' from address field
- Everything configured as outlined by GreenSkunk in #1824708: How-to usecase? Add optional geocoding to map input widget so that only a single point can be marked and moved on the map.
Steps:
- Create node
- Add an address
- Map shows a single 'draw feature' button (see attached image) and only allows you to place a single point and move it (desired behaviour)
- Click 'Find using Address field'
- An extra 'draw feature' button is now visible and the map now allows multiple markers to be placed.
Comment | File | Size | Author |
---|---|---|---|
after-clicking-find-using-address-field.jpg | 66.11 KB | tymn | |
before-clicking-find-using-address-field.jpg | 48.84 KB | tymn |
Comments
Comment #1
guictx CreditAttribution: guictx commentedSame here with lateste 7.x-2.x-dev.
Comment #2
ufku CreditAttribution: ufku commentedThis is because geofield settings are added twice by openlayers_geofield_widget_afterbuild() during ajax request.
In geofield.widgets.openlayers.inc(line 289) replace
with
Sorry i can't provide a patch right now.
Comment #3
Enric Climent CreditAttribution: Enric Climent commentedSame bug.
I try #2 but doesn't works. any suggestion?
Thanks
Comment #4
antonello.dipinto CreditAttribution: antonello.dipinto commented#2 works form me
thanks
Comment #5
mtoscano CreditAttribution: mtoscano commentedA years old small issue still applying to latest version, #2 works.
Comment #6
poker10 CreditAttribution: poker10 at ActivIT s.r.o. commentedThanks for working on this. We cannot mark this RTBC when there is no patch.