0

I am trying to use the map to kml conversion tool in a python script. The mxd I provide as input, contains data coming from map service layers. I have no security enabled to that particular layers. I also try to run the specific tool in ArcMap providing mxds that contain layers coming from a map service but I get the same error:

Unable to open MXD - The document contains secure (password-protected) layers.

If I run the same tool with an mxd that contains data coming from a local geodatabase, but not from a published service, it works properly.

Can anybody tell me why the map to kml tool does not work with map service layers?

1 Answer 1

1

The tool doesn't support map services. A map service does not serve the actual data, it serves image exports of the data. The tool converts features into KML. These two ideas don't mesh.

I did a quick test: I didn't get that error (not sure how/why you're getting the error), but it did put "something" inside the output KML. I have a mapservice of the entire United States. The tool got a snapshot of Alaska and put that in. However, this was just a snapshot, not the entire dataset, nor a link to the mapservice.

ArcGIS Server has a KML capability. If you have to consume a mapservice through KML, the workflow would be to enable KML on that service and consume that KML endpoint.

3
  • I have thought of using the KML capability. However it does not help in the case you have placed the graphics on the map as graphics generated from a featureSet.
    – Smalis
    Commented Mar 17, 2015 at 15:27
  • Also, I would be grateful if you could provide a rough description of your testing implementation, in case I get any ideas . THanks
    – Smalis
    Commented Mar 17, 2015 at 15:29
  • I added a map service from an AGS connection I made to here: sampleserver6.arcgisonline.com/arcgis/services , saved the MXD and ran the tool.
    – KHibma
    Commented Mar 17, 2015 at 15:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.