Select to view content in your preferred language

Map Grid Display Style Properties

984
4
Jump to solution
07-10-2012 06:08 AM
CarlosColón-Maldonado
Frequent Contributor
Greetings,

The sample app that shows how to show and hide Grid lines on the map was very helpful for me. The lines display in blue with labels. Is there a way to change the color and not display labels? I can't seem to find that in the API.

Thanks,

Carlos
0 Kudos
1 Solution

Accepted Solutions
MarkBaird
Esri Regular Contributor
For the MRGS grid type, there are a set number of grid levels, starting with UTM at the top and as you zoom in it displays differerent MGRS levels.  The different levels are switched on and off internally via scale thesholds.  These scale thresholds are not exposed in the API as tweaking them can cause terrible performance problems if you are not careful.

There isn't a way of setting all of the colors in the grid.  As in the sample application you need to query the grid levels and set each one.  We beleived this gave the most flexibility.

Hope this helps

Mark

View solution in original post

0 Kudos
4 Replies
MarkBaird
Esri Regular Contributor
Hi Carlos,

At the moment the isn't a way to change the colors of the grid in the API.

We are considering this for a future release.

Regards

Mark
0 Kudos
CarlosColón-Maldonado
Frequent Contributor
Thank you for replying.

It would also be nice if the Grid spacing could also be specified, regardless of current scale.

-Carlos
0 Kudos
CarlosColón-Maldonado
Frequent Contributor
Thank you for considering improving map grid display modifications. I appreciate the support.

The setLineColor method requires an integer representing a grid level as well as a color. I printed out all grid levels from the JMap and it listed 5 levels from 0 to 4. Are these values associated with the current map scale? Will there be a time where this number of levels differ? Is there a way to set them all without having to query and set each of the existing ones (this is what the latest example does)?

Thanks in advanced.
0 Kudos
MarkBaird
Esri Regular Contributor
For the MRGS grid type, there are a set number of grid levels, starting with UTM at the top and as you zoom in it displays differerent MGRS levels.  The different levels are switched on and off internally via scale thesholds.  These scale thresholds are not exposed in the API as tweaking them can cause terrible performance problems if you are not careful.

There isn't a way of setting all of the colors in the grid.  As in the sample application you need to query the grid levels and set each one.  We beleived this gave the most flexibility.

Hope this helps

Mark
0 Kudos