AnsweredAssumed Answered

adding kml with images using new KMLLayer(kmlUrl); function

Question asked by humzarr on Jan 21, 2016

I have a small kmz file with images inside it, when I convert it to kml, the code looks like this.

 

<Placemark>

   <name>Waypoint 1</name>

   <description><![CDATA[<img width="800" src="1.jpg"/>]]></description>

   <Point>

    <coordinates>-121.825408,37.328418,0.000000</coordinates>

   </Point>

  </Placemark>

 

When I try to add it to my arcgis js api application, the waypoint appears fine but the image is not shown on click as seen below

 

 

The error on the console window is :

 

GET http://developers.arcgis.com/javascript/sandbox/1.jpg 404 (Not Found)

 

I understand the issue that the code cannot find the image path but how can I solve this problem? The image displays fine on Google Earth.

Outcomes