Ticket #3500 (closed enhancement: fixed)
Add a shpkml macro that outputs shape geometry in kml 2.2
| Reported by: | mraross | Owned by: | assefa |
|---|---|---|---|
| Priority: | normal | Milestone: | 6.0 release |
| Component: | Output-KML | Version: | unspecified |
| Severity: | normal | Keywords: | kml |
| Cc: |
Description
Add a shpkml macro that returns the feature's shape as a valid KML Geometry element (e.g., Point, LineString?, Polygon, Multigeometry). This will enable the use of getFeatureInfo to generate linestring and polygon placemarks with full control over the KML. Parameters are proj and precision (as per shpxy), extrude (0 or 1) and tessellate (0 or 1).
Here’s an example of a template snippet that will generate a multigeometry placemark containing a point and a polygon for each selected feature in a map layer :
[resultset layer=DBM_7H_MIL_PARK_POLY1]
<Folder>
<name>Parks</name> [feature trimlast=','] <Placemark>
<name>[ENGLISH_NAME]</name> <Snippet/> <description>
<![CDATA[
<p>Year Established: [YEAR_ESTABLISHED]</p> <p>Area: [AREA_KILOMETERS_SQUARED] sq km</p>
]]>
</description> <styleUrl>#parks_map</styleUrl> <MultiGeometry?>
<Point>
<coordinates> [shplabel proj=epsg:4326 precision=10] </coordinates>
</Point> [shpkml tessellate=1 proj=epsg:4326 precision=10]
</MultiGeometry>
</Placemark> /feature
</Folder>
