Personal tools
You are here: Home Forums Plone Google Maps Zoom level of maps in marker
Document Actions

Zoom level of maps in marker

Up to Plone Google Maps

Zoom level of maps in marker

Posted by Reinoud van Leeuwen at November 27. 2006

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




Re: Zoom level of maps in marker

Posted by Vitaliy Podoba at January 04. 2007

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.
Powered by Ploneboard