1

I have been rendering KML files in the google maps by the geoXML library by the following way.

var geoXml = new geoXML3.parser({
    map : map,
    singleInfoWindow : true
});
geoXml.parse('http://DomainName/GeoSystem/redrawKML');

I came to know by the following way we could render KML files in the google maps.

var ctaLayer = new google.maps.KmlLayer({
   url: 'http://gmaps-samples.googlecode.com/svn/trunk/ggeoxml/cta.kml'
});
ctaLayer.setMap(map);

These two approach made me to ask following, (If it is stupid, I will update it in appropriate way)

  1. Which is faster to render KML Files in google maps and why ?
  2. Which is providing good support for handling events (mouse click, Key press, etc.)
  3. Which is providing best support to validate the KML file which is being rendered from Server.
geocodezip
  • 158,664
  • 13
  • 220
  • 245
ArunRaj
  • 1,780
  • 2
  • 26
  • 48

1 Answers1

2

geoXML3 was created when maps API v3 did not have native KML support yet. It makes use of other API v3 objects like google.maps.Polygon, of which you can use all it event possibilities.

google.maps.KmlLayer support of events is limited. (only mouse click). There is also a limit of number of KML files which can be displayed on a map: https://developers.google.com/kml/documentation/mapsSupport

the native KML support is probably the most easy one to implement. geoXML3 however gives more possibilities.

both do the same job to validate the KML file

Ivar
  • 154
  • 5
  • 3
    Neither "validate the KML". Use a [KML validator](http://www.feedvalidator.org/) for that. KmlLayer uses tile based rendering which lowers the overhead on the client. – geocodezip Apr 08 '14 at 11:49
  • @geocodezip i was wondering how KML Layer works, and came across your comment again. So KML Layer is using tile based rendering. Is there any 'doc' for that (mentioning 'tile-based')? i couldn't see any (with quick search) – zeroflaw Apr 04 '19 at 02:43