Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

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?

share|improve this question
    
which Java script API you are using ? (ArcGIS or some other API like leaflet Or open layer? ) –  Sunil Aug 23 '13 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.html –  Sunil Aug 23 '13 at 5:30
    
+1 related question gis.stackexchange.com/questions/15826/… ,forums.arcgis.com/threads/… –  Sunil Aug 23 '13 at 5:31
    
@Sunil Yes ArcGIS javascript API 3.6 –  Xaxum Aug 23 '13 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 Aug 23 '13 at 6:00

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.