source: products/geolocation/trunk/browser/map.py

Last change on this file was 1, checked in by myroslav, 18 years ago

Building directory structure

  • Property svn:eol-style set to native
File size: 926 bytes
Line 
1# zope 3 imports
2from zope.interface import implements
3
4# Five imports
5from Products.Five.browser import BrowserView
6
7# Product imports
8from Products.geolocation.interfaces.geomap import IGEOMap, IGEOMapView
9
10class GEOMapView(BrowserView):
11
12    implements(IGEOMapView)
13
14    def __init__(self, context, request):
15        """ init view """
16        self.context = context
17        self.request = request
18        self.map = IGEOMap(self.context, None)
19
20    def editMapOptions(self, mapcenter, mapzoom, maptype):
21        """ update map options """
22        self.map.setMap(mapcenter, mapzoom, maptype)
23        self.context.reindexObject()
24
25    def getMapCenter(self):
26        """ return map center """
27        return self.map.getMapCenter()
28
29    def getMapZoom(self):
30        """ return map zoom """
31        return self.map.getMapZoom()
32
33    def getMapType(self):
34        """ return map type """
35        return self.map.getMapType()
Note: See TracBrowser for help on using the repository browser.