I'm trying to publish from our public ArcGIS Server 10.3 a map service in KML format with a simple point layer and map legend.
When i load the kml with GE or other KML/KMZ client i don't see any legend..
I followed the tutorial preparing an mxd wit a layout view with the map legend object:
Authoring maps for publishing as KML—Documentation (10.3 and 10.3.1) | ArcGIS for Server
Here a link to an example of out services:
energia/impianti_biogas (MapServer)
Any suggestion?
Thank you
Best
Just curious, are you using the following URL to access the service?
Updated - I grabbed the wrong link before!
Yes I use either the raster either the vector KML format generated by rest interface from here:
Generate KML (energia/impianti_biogas) /external-link.jspa?url=http://webgis.arpa.piemonte.it/ags101free/rest/services/energia/impianti_bio...
I can't see any legend for both.
I tried pulling the kmz for review - unfortunately, I was unable to display even the kml using the ArcGIS JSAPI - here's the kml layer:
<?xml version="1.0" encoding="UTF-8"?> <kml xmlns:atom="http://www.w3.org/2005/Atom" xmlns="http://www.opengis.net/kml/2.2"> <NetworkLink> <open>1</open> <name>energia/impianti_biogas</name> <LookAt> <longitude>8.108852411473544</longitude> <latitude>45.22470127132088</latitude> <range>144615.2385434366</range> </LookAt> <Region> <LatLonBox> <north>45.61570041822</north> <south>44.32799635241058</south> <east>8.883711491697333</east> <west>7.338359921523349</west> </LatLonBox> <Lod> <minLodPixels>128</minLodPixels> <maxLodPixels>-1</maxLodPixels> </Lod> </Region> <Link> <viewRefreshMode>onStop</viewRefreshMode> <viewRefreshTime>2</viewRefreshTime> <href>http://webgis.arpa.piemonte.it/ags101free/rest/services/energia/impianti_biogas/MapServer/export</href> <viewFormat> f=kmz&bboxSR=4326&imageSR=4326&format=png24&transparent=true&bbox=[bboxWest],[bboxSouth],[bboxEast],[bboxNorth]&size=[horizPixels],[vertPixels]& </viewFormat> </Link> </NetworkLink> </kml>
I tried pulling some of my own map services this way and received something similar... I wonder if we need to flip a flag on the server...
Ok, I flipped some settings on the server - I can get my KML to render. I tried yours again and see it:
I can get the legend to render with the map service:
KML layers should be supported... I'm still not sure why it wouldn't show for the KML. I started debugging the legend.js API file and didn't hit key spots that would construct the legend, but there wasn't a clear, obvious reason why. Perhaps it's a bug in the API? Are there any examples showing this working? I couldn't find one...
Thank yo Chris,
The KML yo see it's correct. Unfortunately we ca't see the legend...
I searched the web for hours to look for anyKML with legend KML with legend exposed by ArcGIS SERVER but i didn't find nothing..
If I undestand also yours kml miss the legend. is it correct?
Anyone has sample to show?
thank you
Enrico
The legend will not render for me as a KML. I couldn't find a working sample, either - I even tried a few versions back in the API.
Unless someone can find a working sample, I'm inclined to believe there may be a bug in the API as you've followed the instructions given by Esri, and the legend works when using the map service, but not the KML.
I think too that it is a bug or something relaed to some server setting..
It is very strange that Esri has tutorial to do thie but any sample or orkaround...
Hope for Esri Support and other users samples/ experiences
Thank you very much Chris