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

zzolo’s picture

Status: Active » Fixed

Hey. 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

blueearth’s picture

Hi, 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?

steinmb’s picture

Title: Populate Longitude Latitude CCK fields with point/marker » Populate Longitude Latitude fields with point/marker
Project: Openlayers » Geofield
Version: 7.x-2.0-beta1 » 7.x-1.1
Component: OL CCK » GeoField Map
Status: Fixed » Active

Moving since it is geofield that provide the map data input widget.

Brandonian’s picture

Status: Active » Closed (fixed)

Closing due to age. Please reopen if this is still an issue.

valthebald’s picture

Issue summary: View changes
Status: Closed (fixed) » Active

It is still an issue. Geofield provides either Longitude/Latitude, or map widgets, but not both of them simultaneously

drupalok’s picture

need this too...

steinmb’s picture

Category: Support request » Feature request
Issue tags: +Needs issue summary update

Changing 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.

steinmb’s picture

Version: 7.x-1.1 » 7.x-2.x-dev
Nchase’s picture

I totaly agree. The workflow is mostly:

  1. Type in address and / or lon lat
  2. See it on the map.
  3. Set the point on the map that it fits
  4. Get lon / lat from it

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

kinmen’s picture

+1

andyanderso’s picture

+1