Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Specifically into NAD83.

Google tells me that KML only supports WGS84, but I can't seem to find much info on being able to reproject KML using ESRI's Javascript API.

Basically, I've got this base map in Nad83 and I need to overlay some kml.

share|improve this question
KML is specially WGS84 you would need your base-map to accommodate the KML – Mapperz Oct 17 '11 at 17:38
I realize that, but is there no way to do the reprojection on the fly with the js api? – Carter Oct 17 '11 at 17:49
up vote 5 down vote accepted

Yes, the ArcGIS API for JavaScript's KMLLayer class relies on a hosted service that converts a KML file to JSON. To re-project, specify an outSR in the constructor options when creating your KML layer.

share|improve this answer
please update the links with latest example. – Sunil Aug 23 '13 at 5:32
@Sunil updated, thanks for the heads up – Derek Swingley Aug 23 '13 at 14:59

No, the js api cannot reproject on the fly. The KML needs to match the base service that you are using. The js api can convert WGS84 geometries to Web Mercator, but that is all it can do.

share|improve this answer
For the use case outlined by Carter, I disagree. When's the last time you saw a KML file in anything other than WGS84? With the JS API, when you create a KMLLayer, the KML file is sent to a service and converted to JSON. As part of this conversion, you can specify a spatial reference(wkid or wkt) and the features from the KML file will be returned in that spatial reference. The re-projection isn't happening client side but you do end up with re-projected features. Side note: don't forget that the JS API can also convert Web Mercator --> Geographic client side as well. – Derek Swingley Oct 18 '11 at 1:58

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.