Hi,
I thought I would put this out as a feature request. I would love to see built in support for powerlaw scaling in the layers so that items on the map can scale relative to their zoom ranges. I am currently using a custom layer that supports this feature but I would expect that once you have support spring animations on all of the layers then my layer won't be so appropriate. The only reason I have this custom layer is to support powerlaw scaling.
I am currently using the following but of course a more configurable version would be desirable.
Cheers,
Clint
I thought I would put this out as a feature request. I would love to see built in support for powerlaw scaling in the layers so that items on the map can scale relative to their zoom ranges. I am currently using a custom layer that supports this feature but I would expect that once you have support spring animations on all of the layers then my layer won't be so appropriate. The only reason I have this custom layer is to support powerlaw scaling.
I am currently using the following but of course a more configurable version would be desirable.
double scale = Math.Pow(0.05 * (this.MapControl.ZoomLevel + 1), 2) + 0.01; |
if (scale > 1) // Max scaling |
{ |
scale = 1; |
} |
else if (scale < 0.125) // Min scaling |
{ |
scale = 0.125; |
} |
// Set the transform origin to the center of the object. |
ScaleTransform transform = new ScaleTransform(); |
transform.ScaleX = scale; |
transform.ScaleY = scale; |
container.RenderTransformOrigin = new Point(0.5, 0.5); |
container.RenderTransform = transform; |
Cheers,
Clint