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 ( from JavaScript resources I changed 

this line --> //var kmlUrl = "";

to this --> var kmlUrl = "";


to this --> var kmlUrl = "";

and got this error: 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?