ThinkGeo.com    |     Documentation    |     Premium Support

Current Extent Initialize False Coordinates

Hello , i’ve made a function that focus into a certain rectangle of the map with CurrentExtent:

Public Sub MyCurrentExtent()
wpfMap.CurrentExtent = New ThinkGeo.MapSuite.Shapes.RectangleShape(2018042.17380401, 5134294.601809, 3717141.987822, 4273310.06864)
wpfMap.Refresh()
End Sub

and i have a problem,when i assign that fuction to a button it works alright and focus my program over the place i gave like the picture:


but when i put the function in the start of the program to focus there in initialization instead of the center of the world (0,0) it focus on a different place like this:

it focuses on bigger longitude and smaller lattitude,does anyone knows what’s happening? It’s the same function in both cases.
Thanks!

Hi Marios,

Our WPF map have a snap feature, the extent will snap to nearest zoomlevel, please try my sample here and you can found it. The blue rectangle is the bounding box you set, but you can see the map snap to the zoomlevel so it scale up.

9630.zip (10.6 KB)

Regards,

Ethan