Loading TOC...

geokml.toKml

geokml.toKml(
   $region as cts.region[],
   [$namespace as String]
) as Sequence

Summary

Construct KML elements from cts:region values.

Parameters
$region Zero or more cts:region values.
$namespace An optional KML namespace URI indicating the version of KML to use when generating output. Default: KML 2.2 (http://www.opengis.net/kml/2.2).

Example

var geokml = require('/MarkLogic/geospatial/kml');

geokml.toKml(
  cts.polygon([
    cts.point(5.0,1.0),cts.point(8.0,1.0),cts.point(8.0,6.0),cts.point(5.0,7.0)
  ])
);

/* Returns a KML polygon similar to the following:
<Polygon xmlns="http://www.opengis.net/kml/2.2">
  <outerBoundaryIs>
    <LinearRing>
      <coordinates>1,5 1,8 6,8 7,5 1,5</coordinates>
    </LinearRing>
  </outerBoundaryIs>
</Polygon>
*/
  

Comments

    Powered by MarkLogic Server 7.0-4.1 and rundmc | Terms of Use | Privacy Policy