Friday, July 13, 2012 11:00 AM
i am new with Bing and have a Question. I'd like to develop a geographic metro app with bing .
How can i calculate the distance between two points on the bing map?
Ist it possible to check whether a point is inside or outside of polygons?
Thank's a lot for your answer :)
Friday, July 13, 2012 1:33 PMOwner
There are a couple of ways to calculate distances. If you just want the straight line distance you can use the Haversine formula:
Alternatively if you want the driving distance you can use the Bing Maps REST services to calculate the route.
As for checking if a point is in a polygon you can do one of two things. The first is to follow the algorithm outlined here: http://msdn.microsoft.com/en-us/library/cc451895.aspx
The second is to use the SQL Spatial libraries in your application.
Saturday, July 14, 2012 12:40 PM
Thank's a lot for your help.
I'd like to use the Spatial Library of SQL Server. I found it in the Feature Pack of SQL Server. Is this the correct Library?
I didn't found a documentation or something else to use the library but i know the datatype's from SQL 2008 :)
Do you know a Documentation or anything else to use the Spatial Library assembly ?
Thanks for every answer
Monday, July 16, 2012 11:27 AMOwnerThat's the correct library. Take a look at the documentation found here: http://msdn.microsoft.com/en-us/library/microsoft.sqlserver.types%28SQL.105%29.aspx
- Marked As Answer by Richard_BrundrittMicrosoft Employee, Owner Monday, July 16, 2012 11:27 AM