Zoom level of maps in marker
Up to Plone Google Maps
Hi,
I am developing a site that has a qPloneGoogleMaps map to show a numer of dive locations. Each marker is a document that describes some details about the location. I would like to be able to set the zoom level of the map shown in the marker document. I've searched the API but I cannot find a method to do this. Will future versions of the product have a setZoom method?
(BTW: the product is really easy to use and install! I got it working in under 5 minutes, I've made a little script to export the marker locations to a POI file to use in GPS devices):
portal = container.portal_url.getPortalObject()
parent = portal.restrictedTraverse('/path/to/map')
for dir in parent.objectIds():
dirobj = portal.restrictedTraverse('/path/to/map/'+dir)
try:
print '%s , %s , "%s"' % (dirobj.getLocation()[0], dirobj.getLocation()[1], dirobj.title)
except:
pass
return printed
Previously Reinoud van Leeuwen wrote:
Hi,
I am developing a site that has a qPloneGoogleMaps map to show a numer of dive locations. Each marker is a document that describes some details about the location. I would like to be able to set the zoom level of the map shown in the marker document. I've searched the API but I cannot find a method to do this. Will future versions of the product have a setZoom method?
(BTW: the product is really easy to use and install! I got it working in under 5 minutes, I've made a little script to export the marker locations to a POI file to use in GPS devices):
portal = container.portal_url.getPortalObject()
parent = portal.restrictedTraverse('/path/to/map')
for dir in parent.objectIds():
dirobj = portal.restrictedTraverse('/path/to/map/'+dir)
try:
print '%s , %s , "%s"' % (dirobj.getLocation()[0], dirobj.getLocation()[1], dirobj.title)
except:
pass
return printed
In current version of qPloneGoogleMaps it's impossible to modify map settings on Marker's view. For now zoom always equals 6, and map's center equals marker coordinates. But in the next versions of product, I think, it will be possible.
