Closed (fixed)
Project:
Google Maps Tools
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Jan 2009 at 23:57 UTC
Updated:
6 Apr 2010 at 12:29 UTC
I have location enabled nodes that show a map on each node page. The map just shows the one marker for that node.
I have checked the auto center and zoom to get the map to center on the nodes location.
My problem is that it is zoomed all the way in, I want to show the location in a larger context. I have tried setting the maximum zoom in the map configuration and in the node field settings, but the auto center and zoom seems to override whatever I put here.
Is there an easy way to do this?
Comments
Comment #1
xmarket commentedIn this context "auto center and zoom" desn't have any meaning, because it can work on at least two markers.
You should use "default zoom level" and/or "zoom level" if you have only one marker.
Comment #2
emersonlenon commentedIf I turn off Auto center and Zoom in the Map Configuration then the map is zoomed out the the default zoom level, but it wont center on the marker. It is centered on 0,0.
Comment #3
xmarket commentedComment #4
Sinan Erdem commentedI think this issue persists...
If I select "Auto Center and Zoom", it is fine, shows the marker at the center but I would like to have more default zoom on this.
If I disable the "Auto Center and Zoom", then I can select a zoom level, but this time, I cannot center on the marker.
Is there a solution for this?
By the way, I am talking about both Field display preset and Views preset.
Comment #5
Sinan Erdem commentedAny idea on this?? It really affects the display of content on a map...
Comment #6
xmarket commentedYou cannot set the preset's center by a marker location at this moment.
Although, You can increase the bounds of the location, which is the base of auto zoom.
Comment #7
ailgm commentedWould it be possible to separate the options into two choices: Auto Center, Auto Zoom, so that you could choose a specific zoom level but still center on the marker? This is an issue for us too.
Comment #8
srobert72 commentedSubscribe
Duplicate of this issue : #740434: Distinguish "automatic center" and "automatic zoom" methods
Comment #9
xmarket commentedAdded mode option to the method: Center and zoom, Center only, Zoom only.
Zoom behavior changed: now works only when map zoom set to Auto.
Comment #10
Sinan Erdem commentedFantastic addition. Thanks xmarket...
Comment #11
ailgm commentedTerrific. Worked for us. Thanks for adding this quickly.
Comment #13
m.sant commentedWhat you mean "map zoom set to Auto"?
I have a view with the option "Center and zoom" enabled: the center method works, but the zoom doesn't. I'm using 6.x-2.0-beta4.
I would expect a zoom level that is as close to ground level as possible, but let you see all the markers. Am I wrong?
Comment #14
Sinan Erdem commentedm.sant,
You first select your desired default zoom level as "Auto" from Earth Settings tab. Then also from this tab, you place your bounds for your desired zoom. The more you place them close to your point, the more is the zoom level.
In Methods tab, you choose Automatic Center and Zoom option, then under "Automatic Center and Zoom Setting" tab, you choose "Center only"
Hope it helps...
Comment #15
m.sant commentedetcetera9, thanks for your help.
The problem is that I do want the automatic zoom. If I set the zoom level for the map preset, so that all the markers fit in the map, what happens if I add another marker that is far away from the area covered by the map?
And also I would like to use the map preset for a view with some exposed filters, so that the zoom level depends on the number of markers selected by the filter. If I have a couple of points in the centre of the town, the zoom level should be closer to the ground than if I have many points spread all over the country.
What happens now is that, despite the automatic zoom option, with only three points in the same town, the map shows all the country.
Any thoughts?
Comment #16
m.sant commentedOK, experimenting, I sorted out the reason of my problem.
I was using a cck field of type gmaps address and point, but I disabled the option "enable bounds".
I think that bounds are needed to calculate the default zoom level (correct me if I am wrong). In case the module doesn't find any bounds, because they are disabled, it must assume some default values that may not fit your needs.
For my purposes the area bound by default around a point was too large.
I believe that, when "enable bounds" option is unchecked, it would be more reasonable to assume a smaller area surrounding a point.
Marco