none
Nearest vehicle/person to a geocode RRS feed

  • Question

  • Hi,

    We have several vehicles which will be sending us geoocodes.
    We save these geocodes in our database.

    If i pass a geocode, i want to get the nearest vehicle to the geocode sent.

    Is there a built in function for this in Bing Maps?

    Thanks

    • Moved by Ricky_Brundritt Saturday, March 10, 2012 12:25 PM (From:Bing Maps: Map Control and Web services Development)
    Friday, December 9, 2011 7:57 PM

Answers

All replies

  • This can be done fairly easily. You will need a web service that you can use to connect the webpage to your database. You can then send the coordinate of where you want to look nearby to the server and then look for nearby coordinates in your database. If you are using SQL 2008 or SQL azure you may find this project useful: http://ajaxmapdataconnector.codeplex.com/

    Alternatively if you are using one of those databases you simply need a simple SQL command that uses STDistance: http://msdn.microsoft.com/en-us/library/bb933808.aspx and here is an article that uses it: http://blogs.msdn.com/b/isaac/archive/2008/10/23/nearest-neighbors.aspx

    Note that this is a asset tracking application that you are creating and there are special terms of use in this regards: http://www.microsoft.com/maps/product/terms.html Basically you need a license to use Bing Maps if you are doing asset tracking. Contact the licensing department for more information here: maplic@microsoft.com


    http://rbrundritt.wordpress.com
    Saturday, December 10, 2011 8:40 AM
  • Hello Richard,

     

       We do have the licence and we are using the bing maps. 

    I was told that there is a inbuilt function in bing maps which will take geocodes of the vehicles, current geocode of the client and the anchor geocode( first location where the vehicle should go) as the parameters and the Estimated Time will be returned for that function. So that the vehicle will know, whether it should pick that client or not.

    However, I was not sure if this exists or not. Just wanted to check with you.

     

    Thanks

    Yash

    Monday, December 12, 2011 4:00 PM