Wednesday, June 27, 2012 11:04 PM
I'm having two issues with the WPF Control.
I'm using the MapPolygon class to visualise the country borders. As basis for this I use the database from this site: http://rbrundritt.wordpress.com/2012/06/08/entity-framework-5-bing-maps-wpf/ My issue is the incorrect projection / cut of the polygon as you can see in the picture. The SPATIAL DATABASE VIEWER of SQL Server Management Studio Express confirmed me that the data basis is correct. As Conversion from the SQL Data to the MapPolygon I'm using the approach introduced in the mentioned blog.
The second issue is regarding the BoundingRectangle Property of the MapCore Class that should gets "the rectangle that defines the boundaries of the map view". As I understood it correctly it shoud return a rectangle with Long/Lat Coordinates that defines which part of the world is visible in the view. For the case in the picture I would assume something like +/-180 for east and west and +/- 90 for north and south. But the rectangle is as following after the ViewChangeEnd Event: East ~ -136, North ~ 82, South ~ -63, West ~ -0,19
Could someone help me with these issues? It would also be nice to know if it is possible to show the world only once and not in the continuous way (horizontal) as it is now.
Many Thanks in advance
Thursday, June 28, 2012 11:27 AMOwner
The issue with the rednering is due to the polygons crossing the 180/-180 longitude border and the world wrap is taking effect on the shape. Note that the code sample in that article did not have true support for complex polygons and was noted as such in the comments of the code.
As for the rectangle question the bounds being returned are the true bounds of the viewable map. Again this is related to world wrap when zoomed out at high levels.