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.
I'm using HTML5 Geolocation widget. I created also an address field for my content type.
I'd like that if a user didn't allow to give his position with HTML5, Geofield should take the coords from the address field.
I'm going to create a new module to do this (or I will use a rule), but I think it could be cool to have an option called "fallback widget" to determinate the value of Geofield if the principal widget is empty.
Thanks,
Fair
Comments
Comment #1
mErilainen CreditAttribution: mErilainen commentedThis would be great! In our case we might have the coordinates in a XML file, which the user can save when the address calculation is not precise, but when the coordinates are not available, then the address field is used to calculate the location.
Comment #2
mErilainen CreditAttribution: mErilainen commentedHere something that works for me in a custom module for the problem I mentioned above.
Both field_coordinates and field_geo are geofields. field_geo geocodes from another field, which is addressfield and field_coordinates gets the values directly from XML file through Feeds.
Comment #3
mtoscano CreditAttribution: mtoscano commentedIt will be great to have this as a separate module with some customisation option.
In my case for example I am looking for a solution with a three case geocoding scenario:
each one as the fallback option if the previous are left blank.
Are you planning to convert this in a proper module?
Thanks
P.S. Moved to version 2 as OpenLayers Interactive Geocoding option has been included there.