Kml google extensions not in schema

The jurisdiction in which I live in published data using the Google Globe. The kml file they point to contains

<?xml version='1.0' encoding='UTF-8'?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2"> <gx:GoogleMapsEngineLink> <href>http://globe.information.qld.gov.au/qldglobe</href> </gx:GoogleMapsEngineLink> </kml> 

I can not find the link to gx: GoogleMapsEngineLink in any public documentation, and I had problems using it with another standard kml, like Place. I would like kml to launch this government globe as well as add a place.

I would like to add this place to the above kml (i.e. one kml file)

 <?xml version='1.0' encoding='UTF-8'?> <kml xmlns="http://www.opengis.net/kml/2.2" <Placemark> <description>Some nice place</description> <Point> <coordinates>153.0064595002,-27.4811714996,0</coordinates> </Point> <Style> <LabelStyle> <color>ff7fffff</color> </LabelStyle> </Style> </Placemark> </kml> 
+4
source share
2 answers

Google KML extensions can be found in the Google KML documentation: https://developers.google.com/kml/documentation/kmlreference#kmlextensions

The full XML schema for elements in this extension namespace is at http://developers.google.com/kml/schema/kml22gx.xsd .

gx: GoogleMapsEngineLink is not the documented part of the Google KML extension as defined in the http://www.google.com/kml/ext/2.2 namespace.

Why don't you create a KMZ file with the root KML and gx file: GoogleMapsEngineLink loaded in KML, embedded in the KMZ file as an auxiliary file.

KML root doc.kml file:

 <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2"> <Document> <NetworkLink> <Link> <href>engine.kml</href> </Link> </NetworkLink> <Placemark> <description>Some nice place</description> <Point> <coordinates>153.0064595002,-27.4811714996,0</coordinates> </Point> <Style> <LabelStyle> <color>ff7fffff</color> </LabelStyle> </Style> </Placemark> </Document> </kml> 

And the Google KML engine (engine.kml) looks like this:

engine.kml:

 <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2"> <gx:GoogleMapsEngineLink> <href>http://globe.information.qld.gov.au/qldglobe</href> </gx:GoogleMapsEngineLink> </kml> 

Update: Since <gx:GoogleMapsEngineLink> is special and undocumented, it does not work like other KML elements, so it cannot be displayed as a child of a <Document> or as a target for <NetworkLink> . Similarly, if this item appears at the root level with a document or label following those that are ignored.

Google announced the discontinuation of Google Maps Engine in January 2016.

+3
source

I couldn’t get my KML in Validate as valid XML "because my KML includes the gx (Google Extension) tag (for example, <gx:Tour> ), and www.google.com/kml/ext/2.2/- error 404 Here is what I finally got to check after an hour of trial and error:

 <?xml version="1.0" encoding="UTF-8"?> <kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2" xmlns:kml="http://www.opengis.net/kml/2.2" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.google.com/kml/ext/2.2 http://developers.google.com/kml/schema/kml22gx.xsd"> 

I really don’t know what I’m doing exactly, so I can’t say that it’s a kosher or legal fix or that it’s all necessary. But this is the only way to make him check.

0
source

All Articles