An PushPin whose size is incremented in zoom in

Jun 9, 2009 at 2:16 PM
Edited Jun 9, 2009 at 2:27 PM

Hi

Is there any support to build a pushpin whose size is incremented vs decrement in the zoom operations over the globe?

Huge thanks

Javier

Coordinator
Jun 10, 2009 at 2:38 AM

There is no current support to do that, but it would not be difficult for you to create a class that derives from VEPushPin (or SurfaceVEPushPin) and adds this behavior.

You would need properties for the altitude (>=0) at which the control is the default (unscaled) size, and some way to set the rate at which it gets smaller as the altitude increases. Maybe you set a rate direction, or you set an altitude at which the pushpin will be zero size and calculate the rate from there.

Create a function that takes the altitude (double) as input and returns a ScaleTransform according to the formula you come up with.

Override UpdatePosition similar to this:

public override void UpdatePosition(VEMap map)
{
base.UpdatePosition(map);

if (map != null)
{
this.Transform = GetScaleTransformFromAltitude(map.Altitude);
}
}

I know the Silverlight VE control has a feature for setting the size of an object in terms of lat/long and it auto scales. You could also do that but it would require more calculations than this method I outlined.

Hope that helps.
Jun 10, 2009 at 1:17 PM

Ok, huge thanks