Would love users being prompted to zoom in on their location when presented with a big map of geofields. Or if not prompted just have the option to click in the Views header to zoom in on their location.

Comments

phayes’s picture

Project: Geofield » Openlayers
Component: User interface » OL Behaviors

This would be a request for a new OpenLayers behavior.

phayes’s picture

Title: HTML5 Geolocation as a Views Geofield Map display filter or link in header? » New Behavior: "Zoom to my location" using HTML5 Geolocation
zzolo’s picture

There is already a HTML5 based geolocation behavior with this module, which is actually just utilizing a Control from the Openlayers library itself. Check it out and let me know if it fills your needs.

giorgio79’s picture

Do I really need OpenLayers? I can easily output a google maps as display with Geofield, and Geofield too has a widget for HTML5 Geolocation, but they seem to be separate widgets.

zzolo’s picture

Project: Openlayers » Geofield
Component: OL Behaviors » GeoFied Map

Well, its arguable whether Geofield should even have that map as an option. It should not really add that much functionality to that map since there is already a GMap module. Pushing back to Geofield to answer or push onto the GMap module.

phayes’s picture

If you want this functionality you need to use OpenLayers. The embedded geofield_map module is meant to be very basic and we will not be adding bells and whistles.

phayes’s picture

Let me just explain a little more:

We wanted to include a really "basic" mapping module to get people started using geofield, or for really really basic mapping functionality. Geofield is a geospatial storage module and we were never intending to build a full-featured mapping module. We want to compliment the OpenLayers module, not compete with it. So for anything more the "simple" mapping (HTML5 geolocation falls into it), you should look elsewhere.

phayes’s picture

And geofield still doesn't have gmap module support due to bugs in gmap. So OpenLayers is pretty much your only option.

giorgio79’s picture

Ok still not sure about OpenLayers.

Check: I have gmap or some kind of dynamic map on field display with GeoField. I checked the source and it includes google gmap and works great.
Check: Geofield claims to have HTML5 Geocoding for user location on data input

I need this widget on data output, and a map.setcenter for the gmap. That's it. It seems I have everything in Geofield for this feature. I guess, we could rename it to "Add HTML5 Geolocation to data output" as well for geofield? :)

What I am after is a modular HTML5 Geolocation, not geofield_map or Openlayers. Also, it seems HTML5 Gelocation never happened for Openlayers #587824: getCurrentPosition help integrating with this module

PS: That issue may be old, and I found this sample for Openlayers http://openlayers.org/dev/examples/geolocation.html. Will be taking a look at Openlayers, although it seems like an overkill for this case.

phayes’s picture

I would definitely check out using OpenLayers module - it's really quite awesome.

Despite the fact that I'm leary about complicating geofield_map, I'm more than happy to accept a patch to add in this functionality.

giorgio79’s picture

Component: GeoFied Map » Code
Status: Active » Closed (duplicate)