Select to view content in your preferred language

Accessing Map Information From Within a Custom Renderer

743
2
11-16-2010 01:47 PM
WillGelden
New Contributor
I have created a custom renderer.  My implementation of the Draw method requires that I know the scale of the map that is currently being rendered.

How do I get this information?

Currently I store the Map with the renderer but this isn't a general enough solution.  If the user copies the layer using this renderer to another map, that layer would no longer be rendered properly.
0 Kudos
2 Replies
AlexanderGray
Honored Contributor
The draw method takes in the IDisplay (of the map),  The ScreenDisplay has an interface IScreenDisplay with DisplayTransformation.  IDisplayTransformation has scaleratio property which refers to the map scale.
0 Kudos
WillGelden
New Contributor
That's exactly what I was looking for.  Thanks!
0 Kudos