Hello,

Currently, when I click on a gmap to set a location, the map re-centers, zooms in, places the marker, and updates the latitude/longitude fields. Would it be possible to change this so that the map only places the marker and updates lat/lon fields? The zooming and re-centering can be confusing as they take a while and aren't necessarily expected when a user performs a single click on the map. It would be nice, in my opinion, if re-centering was done by a double-click (as it is on maps.google.com) and zooming was accomplished with the map controls.

Thanks,
Ryan

Comments

webgeer’s picture

Status: Active » Closed (works as designed)

I think it is really difficult to enter accurate locations using an interface like you propose. The automatic zooming and recentering makes it much easier to enter precise locations without having to fiddle around with recentering and zooming manually.

If you want to try it out your way open the gmap.module in a text editor and edit the function gmap_set_location. Comment out the 2 js lines: {id}.zoomIn(); and the {id}.panTo(point); line. You can do this just by placing '//' at the beginings of the lines. (The fact that the // are inside a text string is fine.)

I think you will find, as I did, that it is very fidgety to try and enter precise information. Whereas with my system you can get to street level accuracy from a world map in just a few clicks.

Interestingly, you cannot capture the 'double click' event with the Google Maps API. If you are not capturing the 'click' event then double click works as normally, but if you are capturing the 'click', it is catured as 2 single clicks.

Karin’s picture

If you're talking about the use of gmap_set_location, I've found that simply removing the two {id}.zoomIn(); accomplishes just this. With my map the marker would frequently be out of the visible area and I find the behaviour of simply placing the marker and zooming/centering the usual way much more intuitive.

smitty’s picture

Version: 4.7.x-1.x-dev » 5.x-1.x-dev

The zoomIn() seems to be in the locpick.js now.

It would be fine, if it became configurable in the settings.

Vahalaman’s picture

Is there anyway this can become a feature in gmaps?

Does anyone know if there is a way to set this in my script. js without hacking the gmap js file? Thanks.