Closed (fixed)
Project:
Google Maps Tools
Version:
5.x-1.0
Component:
User interface
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
4 Dec 2008 at 20:03 UTC
Updated:
12 Feb 2010 at 19:13 UTC
The views are defaulting to the center of the ocean. How to get the view to default where the point or points are?
UPDATE:
I see the discussion here: http://drupal.org/node/249984
Is this default setting variable implemented?
Comments
Comment #1
mroswell commentedI've discovered the answer (after much exploration).
Check "Enable automatic center and zoom" in the map configuration. For Map 1 the URL is here:
admin/build/gmaps-map-config/1
Voila, now the geocoded point shows up almost as expected (although somewhat more zoomed in than I seek, but that's another issue.)
I'm changing this to a feature request: I recommend enabling "automatic center and zoom" by default. Having the map views show up in the ocean off the coast of Africa is not a good default.
Great module, BTW; Hopefully more folks will try it, and help iron out these kinds of issues.
Comment #2
mroswell commentedIt seems there are two default views.
- one for a new node - which is still defaulting to the equator,
- and one for a previously created node, which successfully defaults to show the point, upon choosing "automatic center and zoom," as described above.
The new node creation form still needs a setting for default map view.
I tried changing the line in gmaps.js to
var contentLoader = new GMarker(new GLatLng(39,-76), {icon: GMaps.CONTENTLOADER_ICON, clickable: false, draggable: false});
But that didn't help.
Comment #3
xmarket commentedDefault center and zoom is supported by the module but it doesn't have any UI because I had to made some decisions. (The latlon item requires an existing map configuration, but that's not yet exists in config creation time....). The UI will be added to the next release.
"Automatic center and zoom" uses the content to position the map, so it can't do anything on the node edit form at the first time... (there's no content...)
You can change the default center by hand:
Update the latitude and longitude fields in the gmaps_map_config table.
Comment #4
xmarket commentedUI added to 5.x-1.1
Comment #5
mroswell commentedI did update the latitude (39.000000) and longitude (-76.000000) in the gmaps_map_config table, but it's still starting in the ocean (0,0) at node/add/trailhead-parking. this is a hybrid map.
Alas, I'm on a very slow 'net connection for the next four days... Has this been fixed in the latest dev?
Comment #6
xmarket commentedThis has been fixed in 5.x-1.1. A UI field also added in that release, and I had to change some js code, so you should clear your "js cache", if any.
Comment #7
xmarket commented