Javascript ARCGIS API - KML layer not working - Big Red X where an image should be

3036
3
06-23-2015 08:22 AM
stephenmoser
New Contributor

Why is it that the KML layer works very intermittently with my project? I have a web folder using Spideroak and have two publicly shared files. There is a KML in there with an HREF tag which links to a PNG in the same for so I use the file name within the HREF tag. Funny thing is, I got this working before and stopped looking at it for a few weeks and when I go back to this it no longer works. I wish ESRI could provide more description of how to get this crap working in their documentation or troubleshooting methods.

Tags (1)
0 Kudos
3 Replies
KellyHutchins
Esri Frequent Contributor

The best way to troubleshoot this issue is to use the developer tools available in the browser. All browsers, Chrome, Firefox, IE etc have developer tools available. Here are the basic steps for how I'd test this issue in Chrome to try and figure out what was going on.

1. Open your app in Chrome.

2. Open the Chrome Dev Tools (menu icon > tools > developer tools).

3. In the developer tools click the Network section then reload your app.

The network section shows a list of all requests your page has  made.  You can use the filter text box to find a particular request. To search for the kml utility request enter kml? in the filter box.

Screen Shot 2015-06-23 at 9.12.05 AM.png

Then click the kml request to see more details including the response which may provide more info on why the request is failing.

Screen Shot 2015-06-23 at 9.13.03 AM.png

ChrisSmith7
Frequent Contributor

Also, for network traffic analysis, the OP could try using Fiddler:

Fiddler free web debugging proxy

0 Kudos
stephenmoser
New Contributor

Thank you for your suggestions.

0 Kudos