I have a javascript test page that adds a couple kml layers to a map and I can toggle them off and on. I seem to get info popups for free with KML. When I click on a point feature I get the data associated with it.
I set up an ARCGIS for Server because I want to start doing some geoprocessing. I can add a map service to my javascript as such:
var layer = new esri.layers.ArcGISDynamicMapServiceLayer("http://mywebserver/arcgis/rest/services/Test/PA_Hospitals_2000/MapServer")
However, when I do this I seem to lose the popup ability that happened with KML. So I thought I would create a KML link. For some reason the javascript api will not load the KML link when it is on ARCGIS for Server. If I browse to the URL it downloads the file but it will not display on the map in the javascript api.
This just seems wrong as you should be able to serve KML from ARCGIS for Server. I would rather have all my files on the arcgis server, from a workflow standpoint as opposed to exporting to KML for point features to get popups and other layers as a service.
How do you either serve kml files from ARCGIS for Server or retain popup data on a published service?
-
which Java script API you are using ? (ArcGIS or some other API like leaflet Or open layer? )Sunil– Sunil2013年08月23日 05:26:45 +00:00Commented Aug 23, 2013 at 5:26
-
+1 I assume that you are using AGS JSAPI 3.x version and go through KML example developers.arcgis.com/en/javascript/jssamples/layers_kml.htmlSunil– Sunil2013年08月23日 05:30:15 +00:00Commented Aug 23, 2013 at 5:30
-
+1 related question gis.stackexchange.com/questions/15826/… ,forums.arcgis.com/threads/…Sunil– Sunil2013年08月23日 05:31:01 +00:00Commented Aug 23, 2013 at 5:31
-
@Sunil Yes ArcGIS javascript API 3.6Xaxum– Xaxum2013年08月23日 05:57:20 +00:00Commented Aug 23, 2013 at 5:57
-
@Sunil yes when my url is a pulbic dropbox it works fine but as soon as I move the url to my arcgis service it is no good. I can preview in google maps and downlaod the kml but can't get it to show up in the map.Xaxum– Xaxum2013年08月23日 06:00:04 +00:00Commented Aug 23, 2013 at 6:00