Extracting legend symbology from ArcGIS Server Map Services

Our user experience team were looking to do a refresh on our symbology that we use for our Map Services that we host on ArcGIS Server. They wanted to see all symbols used in the map service so they could pass it on to our graphic designer to redesign the icons. While you can see each symbol by adding /legend to the map service URL, there was no way to see all symbols on a single page. There isn’t any native way in ArcGIS Server or Desktop to be able to easily extract this either.

My first approach was to try and use Javascript to iframe each Map Service legend page into a single HTML page. But due to the same origin policy being set on the web adaptor of our ArcGIS Server machines, this wasn’t feasible.

Instead, I wrote a Node.JS script to scrape the symbols from ArcGIS Server using Puppeteer. The script handles map services that only have a single symbol vs grouped symbols, and only outputs the unique symbols.






Leave a Reply

Your email address will not be published. Required fields are marked *