Search code examples
google-mapsbing-mapsarea

Rectangular area search in google or bing map


I need to know if it is possible to have one search box and a map in the page. Then, I would like to add search term in the search box (Like "Restaurant") and then highlight the drag-gable rectangular area in the map and click search button. The map then searches the restaurants in that particular area only.

Area Search


Solution

  • Yes, this can be done with Bing Maps. To do the bounding box search for restaurants use the Bing Spatial Data Services with the NAVTEQ EU (Europe) or NA (north America) data source. Using the Query API you can then pass in a bounding box to search within and an entity type ID to filter on (i.e. 5800 for restaurant). Here are some useful links on how to do this.

    http://msdn.microsoft.com/en-us/library/hh478189.aspx

    http://msdn.microsoft.com/en-us/library/gg585133.aspx