Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
def kml(self): camera = "<Camera>\n" camera_params = ["latitude", "longitude", "altitude", "heading", "tilt", "roll", "altitudeMode"] for p in camera_params: val = self.__dict__[p] if val is not None: camera += " <%s>%s</%s>\n" % (p, val, p) camera += " </Camera>\n"
return """ <Placemark id="%s"> <visibility>1</visibility> <name>%s</name> <styleUrl>#%s-default</styleUrl> <ExtendedData> <Data name="descr"><value>%s</value></Data> </ExtendedData> %s </Placemark> """ % (self.uid, escape(self.name), self.model_uid(), escape(self.description), camera)
def kml_style(self): return """ <Style id="%s-default"> <!-- invisible --> <BalloonStyle> <bgColor>ffeeeeee</bgColor> <text> <![CDATA[ <h3>$[name]</h3> <p>$[descr]</p> ]]> </text> </BalloonStyle> <IconStyle> <scale>0.0</scale> </IconStyle> <LabelStyle> <scale>0.0</scale> </LabelStyle> </Style> """ % (self.model_uid())
Bookmark = register(Bookmark) |