GeoQuerySet.kml(**kwargs)
Deprecated since version 1.9: Use the AsKML
function instead.
Availability: PostGIS, SpatiaLite
Attaches a kml
attribute to every model in the queryset that contains the Keyhole Markup Language (KML) representation of the geometry fields. It should be noted that the contents of the KML are transformed to WGS84 if necessary.
Example:
>>> qs = Zipcode.objects.all().kml() >>> print(qs[0].kml) <Polygon><outerBoundaryIs><LinearRing><coordinates>-103.04135,36.217596,0 ... -103.04135,36.217596,0</coordinates></LinearRing></outerBoundaryIs></Polygon>
Keyword Argument | Description |
---|---|
precision | This keyword may be used to specify the number of significant digits for the coordinates in the KML representation – the default value is 8. |
Please login to continue.