We are seeing strange behavior when setting the current extent for the map display. Our map control is displayed as a square, 475 X 475. We have some code that takes in a top left and bottom right points and sets the current extent of the map display:
(.ToThinkGeoPointShape() is an extension method on our internal LatLong struct)
Dim rect = New RectangleShape(topLeft.ToThinkGeoPointShape(), bottomRight.ToThinkGeoPointShape())
Me.CurrentExtent = rect
Me.Refresh()
The visible boundaries of the map is not always set as we have specified. For example, if we set the top left and bottom right corners to 47.78/-124.4 and 40.0899/-116.7043, the visible map is set correctly. But if we specify the top left and bottom right as 46.5036/-124.11524 and 41.372696/-116.98986, the visible boundary corners are actually 47.5/-124.055 and 40.43546/-117.0198. The aspect ratio of the display is also skewed. The difference is the first set of coordinates has a height/width ratio of roughly 1, whereas the second set of coordinates has a height/width ratio of .72, which is COS(Latitude).
Can you shed some light on what happens when the CurrentExtent is set? Or more specifically, under what circumstance would the CurrentExtent be changed and what is the algorithm for computing the change?
Thanks,
pk