Hi everyone, I'm using GMap as part of an events and listing site that I'm developing.
I'm using two main map views - one for all the venues overall in Liverpool, and one map view showing the area around an individual Liverpool venue.
The overall map view is more zoomed out than the individual map as it will have to show all the markers in a whole region.
The macro for the overal view is:
[gmap zoom=12 | width=100% |height=600px |control=Large |type=Map]
The macro for the individual view is:
[gmap zoom=15|width=100% |height=600px |control=Large |type=Map]
Both are expressed in the basic settings section of the Views interface.
However, both are shown at the same zoom level, despite one macro being set at 12 and the other at 15.
The macros don't seem to be overriding the 'maxiumum initial zoom' setting at admin/settings/gmap which is set to 15. If I set this to 12 then I have the same issue but reversed, the individual map is too far zoomed out but the overall map is perfect.
Any ideas on fixing this anyone? Thanks.
Comments
Comment #1
Phil Wolstenholme commentedDoes anyone have any comments on this? Has anyone acheived different zoom levels for different maps - I may be doing something wrong!
Comment #2
j0k3z commentedI have this issue as well. Dont want gmap to auto zoom
Comment #3
j0k3z commentedAny ideas how to fix this?
Comment #4
Phil Wolstenholme commentedUnfortunately I don't, I was hoping one of the maintainers or long time users would be able to contribute their own experiences of having different zoom levels. If there is any more information we can provide then please let us know.
Comment #5
kesmeby commentedI don't know if you got through to someone but the original code in the post worked for me--at least the "zoom=12" part. I was setting it in the block settings for node level maps, so maybe it works differently elsewhere.
Comment #6
Phil Wolstenholme commentedMaybe it's a Map Views issue? I'll experiment more with the settings...
Comment #7
marqpdx commentedi had a similar issue, and my resolution came when i unselected this setting in admin/settings/gmap :
autozoom : Use AutoZoom (Automatically zoom the map to fit all markers when markers are added.)
that might help!
best,
m
Comment #8
c-c-m commentedit worked for me! Thanks!
Comment #9
marcushenningsen commentedI confirm this bug, both in the 1.0 and the dev version. It's not really an option to remove the autozoom function (though it does work) because that function is important to me and other maps.
Did someone find out what could be done about it? I could try to take a look at the code, but I would like to hear if someone else found a solution.
Marcus
Comment #10
fabianx commentedHi,
This is by design so, because maxzoom is used when autozoom usage is specified.
Easy way out:
You can specify maxzoom=level in your gmap macro like zoom=.
That is not documented and does not work with default macro generation (you do not have the option to specify maxzoom), but works really well.
Best Wishes,
Fabian (LionsAd)
Comment #11
maur commentedK, not sure if you're still looking for this but I found a little piece of Gmap Macro Builder from another issue where they wanted the autozoom to work on one map and all the rest to be hard coded.
behavior=+autozoom
I needed 1 of my maps to not autozoom but be a set distance. The rest needed to autozoom because in some cases you might only have 1 pin showing and you don't want to have to click in 10 times to see it. So, simply put a - in and it removes the autozoom behavior from that specific map. behavior=-autozoom. I'm guessing that this little trick would work for the other options as long as you know what the call for it was, gonna look into these since this could clear up some other weird work a rounds I've been doing. Also "behavior=-autozoom" was the first thing i put in the gmap macro.
Hope this helps!
Comment #12
summit commentedHi, Post #10 helped me a lot! maxzoom was the key! thanks!
Greetings, Martijn
Comment #13
aerozeppelin commented#10 worked for me, Thank you.
Comment #14
airme1019 commentedThere is a default zoom setting in the Gmap configuration. And i think if you choose something there, the one in the gmap location will not work.