Create scaled marker

Oct 12, 2010 at 3:54 PM

I want to make a class similar to GMapMarkerRect with the following change, draw a border around a geographic area of a specific size measured in km or miles.

I want to be able to make the rectangle's size correspond to a certain distance, say 5 miles or 10 kilometers. I plan on adding a property to the class to do hold this value, it may change over time but stay relatively stable.

I think doing so involves setting the marker's Size property correctly but I haven't yet been able to figure out how to set the scaling appropriately. Of course as one zooms in and out the marker should appear larger and smaller. What's the best way to tweak this. I imagine it could be done by a client class such as MainForm or somehow done from within the modified marker class.

Anyone have a good way to do this?


Oct 12, 2010 at 4:13 PM
Edited Oct 13, 2010 at 4:07 PM

it's something like in wpf demo, you need to calculate pixels from coordinates expressed in meters

Oct 13, 2010 at 3:58 PM

Can you provide a more specific reference to what you're speaking about? Perhaps a specific function and class?

It sounds like what you're talking about is not WPF specific, but can you confirm this? I have an app that is Win Forms based and I am considering adding something like the Win Form demo to it.


Oct 13, 2010 at 7:57 PM

there are just a few functions to adjust the size of the circle in wpf demo, but you can make the same in win forms