Building a colorbar legend

4366
2
12-30-2014 04:29 PM
JerrySchultz
New Contributor III

I have manually constructed a contoured color map as an overlay with transparency. I now need to build a colorbar legend for this color map. I would like to overlay this colorbar legend in the lower right-hand corner of the map but I don't want this to move when the user zooms or pans the view. This colorbar would need to be based on screen coordinates. Does anyone have any experience with this or know of snippets available that would point me in the correct direction. I can easily "paint" it over the lower right corner of the map but then it will move or disappear when the user zooms or pans the view. Any ideas would be appreciated.

0 Kudos
2 Replies
JerrySchultz
New Contributor III

Answer: Override MapOverlay

0 Kudos
VijayGandhi
New Contributor III

Hi Jerry,

You could have a look at the source code of ScaleBarOverlay (class com.esri.toolkit.overlays.ScaleBarOverlay in the sdk/jars/ArcGIS_Runtime_Java_Toolkit-sources.jar).

If you don't really need an overlay, try the sample called Render Graphics (in Graphics Layers).

We also have a class called LocationOnMap that is used by our toolkit. That could be of some use in your application.

Vijay

0 Kudos