简体   繁体   中英

Bing Maps Bounding box for UWP

According to this MSDN page, there was a nice way of finding the coordinates of corners of the bounding box for Bing Maps until Windows 8. The function mentioned in the link is LocationRectangle .

We're developing a Universal application for Windows 10 and there seems to be no way to get the bounding box. Is there a library or plugin that enables us to do so? Or is there a function that we are missing?

You can use the GetLocationFromOffset function. Using this for each corner of the view will give you the same result.

See MSDN link

What is wrong with following? ( Area being a GeoBoundingBox )

area.NorthwestCorner.Latitude,
area.NorthwestCorner.Longitude,
area.SoutheastCorner.Latitude,
area.SoutheastCorner.Longitude

https://msdn.microsoft.com/en-us/library/windows/apps/windows.devices.geolocation.geoboundingbox.northwestcorner.aspx

Or is that not enough?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM