Ask A Cartographer

Legend colors and Definition queries

December 20 2010 | 0 comments
Categories: Map Elements, Publishing

I am currently running ArcGIS 10 ArcEditor and am creating a map book. I am working with vegetation types and am using definition queries to limit my legend to just contain the vegetation type in a current extent and not show all veg types for the whole map book. I have to change definition queries for each page of the map book and by doing this new default colors are applied to my vegetation classes each time. I created a layer package to try and maintain the colors I have chosen for each veg class but when I select a definition query and apply it, I then have to go to the symbology tab and say add all values which limits the veg classes to those I put in the query. Once this is done I keep getting different default colors for my legend. I created a layer package to try and overcome this but find that once I say add all values it reverts back to default. Is there anyway to lock colors so that they stay the same? Please I need your help.

Mapping Center Answer:

You have three choices. One, you can wait for 10.1 since a dynamic legend that filters items based on the page will be introduced. You probably can’t afford to wait but soon this functionality will become available. Two, there is a tool in the Production Mapping extension (formerly called PLTS) taht is called the Graphic Table Element and it will allow you to build dynamic legends that only show the classes in the current map. Three, you can do something with Python scripting. In this case, if you are OK with setting up layer files for each page, then you can call those layer files in a Python script and use them to make the map book. The python script can step through each data driven page and update the layer with the new layer file and then export each page to make the map book.

Here is a blog post on combining data driven pages with Python, and it has a few samples that should point you in the right direction.

If you would like to post a comment, please login.

Contact Us | Legal | Privacy |