Select to view content in your preferred language

Flex 2.4 Local KML file

2266
12
08-09-2011 10:18 AM
PatrickTruitt
Deactivated User
I was hoping someone could shed some light on the needed steps to get a local KML to display on the map. I can get public KML files to load fine but I'm looking for a way to allow the user to display KML files that they may have on there local machine. Is the utility that ESRI uses to parse the public kml/kmz files available for other ArcGIS servers?
Tags (2)
0 Kudos
12 Replies
dcopple
Frequent Contributor
Try right clicking in your viewer and change flash player global settings, under the advaced tab, add you site to the trusted sites list.  This allows flash to access a file on your local drive.  At least try it and see if that works.  See picture.....
0 Kudos
IanWatkins
Emerging Contributor
I would agree, it's a real shame that the Flex API cannot deal with the KML/KMZ directly without having to use an external call.

I'm also in the same situation where I have sensitive information that cannot be used externally. In fact, the whole reason we went with the ESRI Flex API was that it didn't require internet access like the Google API does.

Yes, we could use ArcGIS Portal, but do we really want all that on the server just to deal with KML? I doubt that would fly. No all our Flex apps use an ArcGIS backend, in fact many use very lightweight webservers/webservices.

So could the developers on the API please consider this decision?

Cheers

Ian
0 Kudos
dcopple
Frequent Contributor
I have written a KML widget, and posted the compiled swf and xml at the following site:
http://www.arcgis.com/home/item.html?id=3f7a1efe5f3c4aa9bdecf59730231ffb
Still has to load a posted kml.  If you don't have a server for a kml, you can post it to Google sites, or a number of other places that allow you to post a free file.  If it is local, I think you could post the kml on your local server.  As long as it has an http:// url that is a valid url it should load.  Hope this helps someone.  KML is fully supported with the Flex Viewer yet, but hope it will support more complex KML in the future.
0 Kudos