Google Maps API Projects
Home · Demo Maps · Projects · Discussion Forums · Downloads · Developer Available · Google Search · Site SearchSeptember 07 2010 09:22
Navigation
Home
Demo Maps
Projects
Discussion Forums
Downloads
Useful Links
Developer Available
Contact Me
Privacy Policy
Search
Google Search
Site Search
Paypal Donate

Donations encourage developers such as myself to provide support for and develop new versions of our code.

View Thread
Google Maps API Projects | ClusterMarker | General discussion
Author Max Zoom on a Cluster
christoynbee
Member

Posts: 2
Joined: 06.05.09
Posted on 06-05-2009 16:26
Hi,

Can anyone help me enable max zoom on a clustered map?
Author RE: Max Zoom on a Cluster
martin
Super Administrator

Posts: 224
Location: Norfolk, UK.
Joined: 24.07.08
Posted on 07-05-2009 08:31
Can you be a bit more specific?

Are you trying to use the fitMapMaxZoom property?

Or do you want ClusterMarker to create cluster markers on all map zoom levels - even if fully zoomed in?

If you can then please post a link to your map - makes it much easier to answer a question smiley.

Martin.
Edited by martin on 07-05-2009 08:32
http://martinpearman.co.uk
Author RE: Max Zoom on a Cluster
christoynbee
Member

Posts: 2
Joined: 06.05.09
Posted on 07-05-2009 09:59
I can't show the map yet I'm afraid for legal reasons.

No I'm not using the fitMapMaxZoom property.

I just want to restrict the level that the map will zoom in to. This is because of privacy issues I dont want to give the impression the marker is pointing at someone's street.

Does that make sense?
Author RE: Max Zoom on a Cluster
martin
Super Administrator

Posts: 224
Location: Norfolk, UK.
Joined: 24.07.08
Posted on 07-05-2009 13:01
Hi again.

Well you could PM me a link to your map if you like and i'll keep it to myself.

Otherwise there's various ways to limit a map's maximum zoom level.

You could use some code such as this to set every map type's maximum zoom level to whatever you desire.
(The code assumes that your map is named 'map').


var map_types = map.getMapTypes();
for (var i=0; i<map_types.length; i++){
map_types[i].getMaximumResolution = function() {return 15;};
}





Executing that code after you have created and initialised your map will make each map type's maximum zoom level 15 - you can experiment with different zoom levels to achieve what you want.

Other ways would be to catch the 'zoomend' event and check the map's current zoom level.
If the map has zoomed in too much then zoom back out to an acceptable level.
This would achieve the same as the above code but is not so elegant and may be a performance hit on your map.

Post again if i still haven't answered your question.

Martin.
http://martinpearman.co.uk
Author RE: Max Zoom on a Cluster
tariq_ews
Member

Posts: 1
Joined: 30.07.10
Posted on 30-07-2010 15:57
Hi martinsmileysmileysmiley

Thanks for finding solution. i have same problem thanks again.

Jump to Forum:
Login
Username

Password



Not a member yet?
Click here to register.

Forgotten your password?
Request a new one here.
Users Online
Guests Online: 2
No Members Online

Registered Members: 237
Newest Member: Xavi
Google Maps API Projects © Martin Pearman 2010