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 am upgrading my site from using Drupal 6 with GMap and Location to Drupal 7 with OpenLayers. So far OpenLayers is amazing!
In my previous site I was able to click on the map to add a marker, and the lat/lon fields from Location module would populate with the coordinates. I could also enter the coordinates into the lat/lon fields and a point would appear on the map.
How do I integrate OpenLayers with Location or how can I input Lat/Lon coordinates to add a point on the map?
Comments
Comment #1
zzolo CreditAttribution: zzolo commentedHey. There is no input integration with Location and OpenLayers that I know of. You should look at Geofield, as it provides input based on map, and is a much more native way to handle geospatial data. http://drupal.org/project/geofield
Comment #2
blueearth CreditAttribution: blueearth commentedHi, I did instal Geofield but I still am not able to populate a lat and lon field when I click on the map, or add a marker on the map by entering the lat lon fields. It will generate these fields when I click save but I want it to be instant with clicking anything. So if you enter lat and then lon, the text field exit event would add a marker on the map.
Any way to do this with Geofield and OpenLayers?
Also how do you make a marker draggable?
Comment #3
steinmb CreditAttribution: steinmb commentedMoving since it is geofield that provide the map data input widget.
Comment #4
Brandonian CreditAttribution: Brandonian commentedClosing due to age. Please reopen if this is still an issue.
Comment #5
valthebaldIt is still an issue. Geofield provides either Longitude/Latitude, or map widgets, but not both of them simultaneously
Comment #6
drupalok CreditAttribution: drupalok commentedneed this too...
Comment #7
steinmb CreditAttribution: steinmb commentedChanging this to a feature request, though the issue is in need for a better title and issue summary, to help the maintainers understand the feature. The original issue post is about OL.
Comment #8
steinmb CreditAttribution: steinmb commentedComment #9
Nchase CreditAttribution: Nchase commentedI totaly agree. The workflow is mostly:
Its an end user scenario that I'm always asked for. There are some people having lon / lat, other use the map or the address
Comment #10
kinmen CreditAttribution: kinmen as a volunteer commented+1
Comment #11
andyanderso CreditAttribution: andyanderso as a volunteer commented+1