- Where Developers Learn, Share, & Build Careers


I am using the new Windows Phone 8 map control but have run into a problem: I want to get the location map of the map In other words of the boundary, the latitude and longitude period.

With Bing Maps control, you can:

  LocationRect bounds = map.Bounds;   

... However, this new control does not find any relevant fields. Can anyone help or do I need to reverse engineer the different zoom levels and work it on the basis of the center point, zoom level, and pixel height / width?

You can use viewport convert methods, such as:

  GeoCoordinate topLeft = yourMapInstance.ConvertViewportPointToGeoCoordinate (new point (0, 0)); GeoCordinate border right = yourMapInstance.ConvertViewportPointToGeoCoordinate (new point (mapSize.Width, mapSize.Height)); Return Locations Cutte Boundingrectengel (new [] (top lift, bottom right)); Perhaps you can use renderSize directly in the mapControl example, but to make sure about the correct dimensions on the runtime, I will suggest listening for the "SizeChanged" event. And should not check the map values ​​0 or infinite is also probably a good idea.   

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -