Friday, April 29, 2011

[Google Maps API v2] String Kml

Hi,

is possible parse a kml in var string and show with javascript in a
google maps ?. I found a method in ge (google earth) to parse the kml,
but don't found in google Masp.

The GE's code is:

addKmlFromString( '<?xml version="1.0" encoding="UTF-8"?>' + '<kml
xmlns="http://www.opengis.net/kml/2.2">' + ' <Placemark>' + '
<name>Test Placemark</name>' + ' <Point>' + '
<coordinates>' + ' -122,37' + ' </coordinates>' +
' </Point>' + ' </Placemark>' + '</kml>');


var kmlObject = ge.parseKml(kmlString);
ge.getFeatures().appendChild(kmlObject);

I need the same to google Maps.

Thanks

--
You received this message because you are subscribed to the Google Groups "Google Maps API V2" group.
To post to this group, send email to google-maps-api@googlegroups.com.
To unsubscribe from this group, send email to google-maps-api+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-api?hl=en.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate