barianet

How to add KML layer to the Web

Discussion created by barianet on Aug 29, 2013
Latest reply on Aug 29, 2013 by barianet
Hi All:

I have a Python Toolbox that generate a KML (filename.kmz) and store it in the webserver directory.
I can access the file from Google Earth.  However, when I use this example (https://developers.arcgis.com/en/javascript/jssamples/layers_kml.html) from JavaScript resources I changed 

this line --> //var kmlUrl = "http://dl.dropbox.com/u/2654618/kml/Wyoming.kml";

to this --> var kmlUrl = "http://machine.test.com/filename.kml";

or

to this --> var kmlUrl = "http://machine.test.com/filename.kmz";

and got this error:

dojo.io.script error
Error: File not found. Wrong url or out of memory.

Note:  In Google Earth I can display the two files above.
What I am doing wrong?

Thanks,
Thanh

Outcomes