Opened 13 years ago

Closed 13 years ago

#3728 closed enhancement (fixed)

KML: use ExtendedData and use kml_name_item

Reported by: assefa Owned by: assefa
Priority: normal Milestone: 6.0 release
Component: Output-KML Version: unspecified
Severity: normal Keywords:
Cc: armin.burger@…

Description

reported on the mailing list

Currently the fields/items of the layers (defined under map file METADATA KML_INCLUDE_ITEMS) are exported to a KML tag "<description>" and inserted as HTML table. While this is of course possible, a cleander way would be how GDAL/OGR exports the attributes:

GDAL/OGR uses the tag <ExtendedData> and places the attribute values in <SimpleData> tags, like <Placemark>

... <ExtendedData><SchemaData schemaUrl="#cities">

<SimpleData name="Name">Berlin</SimpleData> <SimpleData name="GEONAMEID">3899412</SimpleData> <SimpleData name="ISO2_CODE">DE</SimpleData>

<ExtendedData>

This leads to a much better display in Google Earth.

In addition to the KML_INCLUDE_ITEMS, another possibility to define a field/item used in KML for the <name> tag would be useful, like OGR allows this via the NameField option. So maybe a METADATA definition like KML_NAME_FIELD could do this.

Change History (3)

comment:1 by assefa, 13 years ago

Milestone: 6.0 release

added the KML_NAME_ITEM r11152

comment:2 by assefa, 13 years ago

Component: MapServer C LibraryOutput-KML

comment:3 by assefa, 13 years ago

Resolution: fixed
Status: newclosed

Added support for <ExtendedData> using the <Data> sub tag (http://code.google.com/apis/kml/documentation/extendeddata.html) r11352 The ExtendedData is created by default if the KML_INCLUDE_ITEMS are defined. The description tag can still be used if the layer defined specifically a kml_description.

Note: See TracTickets for help on using tickets.