Package muntjac :: Package addon :: Package google_maps :: Package overlay :: Module basic_marker
[hide private]
[frames] | no frames]

Source Code for Module muntjac.addon.google_maps.overlay.basic_marker

  1  # Copyright (C) 2012 Vaadin Ltd.  
  2  # Copyright (C) 2012 Richard Lincoln 
  3  #  
  4  # Licensed under the Apache License, Version 2.0 (the "License");  
  5  # you may not use this file except in compliance with the License.  
  6  # You may obtain a copy of the License at  
  7  #  
  8  #     http://www.apache.org/licenses/LICENSE-2.0  
  9  #  
 10  # Unless required by applicable law or agreed to in writing, software  
 11  # distributed under the License is distributed on an "AS IS" BASIS,  
 12  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.  
 13  # See the License for the specific language governing permissions and  
 14  # limitations under the License. 
 15   
 16  from muntjac.addon.google_maps.overlay.info_window_tab \ 
 17      import InfoWindowTab 
 18   
 19  from muntjac.addon.google_maps.overlay.marker \ 
 20      import IMarker 
 21   
 22   
23 -class BasicMarker(IMarker):
24
25 - def __init__(self, Id, latLng, title):
26 self._id = Id 27 self._latLng = latLng 28 self._title = title 29 self._visible = True 30 self._iconUrl = None 31 self._iconAnchor = None 32 self._infoWindowContent = None 33 self._draggable = True
34 35
36 - def getId(self):
37 return self._id
38 39
40 - def setId(self, Id):
41 self._id = Id
42 43
44 - def isVisible(self):
45 return self._visible
46 47
48 - def setVisible(self, visible):
49 self._visible = visible
50 51
52 - def getLatLng(self):
53 return self._latLng
54 55
56 - def setLatLng(self, latLng):
57 self._latLng = latLng
58 59
60 - def getIconUrl(self):
61 return self._iconUrl
62 63
64 - def setIconUrl(self, imageUrl):
65 self._iconUrl = imageUrl
66 67
68 - def getIconAnchor(self):
69 return self._iconAnchor
70 71
72 - def setIconAnchor(self, iconAnchor):
73 self._iconAnchor = iconAnchor
74 75
76 - def getTitle(self):
77 return self._title
78 79
80 - def setTitle(self, title):
81 self._title = title
82 83
84 - def getInfoWindowContent(self):
85 return self._infoWindowContent
86 87
88 - def setInfoWindowContent(self, tabs_or_parent, component=None):
89 if component is None: 90 tabs = tabs_or_parent 91 self._infoWindowContent = tabs 92 else: 93 parent = tabs_or_parent 94 self._infoWindowContent = [InfoWindowTab(parent, component)]
95 96
97 - def isDraggable(self):
98 return self._draggable
99 100
101 - def setDraggable(self, draggable):
102 self._draggable = draggable
103