Select to view content in your preferred language

Query/identify bing maps

1044
6
09-02-2011 02:37 PM
LisaEidson
Occasional Contributor
I'm in the processing of moving our Google map v2 to ESRI's ArcGIS javascript api - prototype here.

I've been able to successfully reproduce all of the Google map features with one exception. Google maps has a search bar on top of the map (see it on our current map here) that searches google maps so that you can, for example, type in a city and it will show you search results. I'd like to do something like this with my prototype by querying or identifying on Bing maps (I'm using roads and aerial photography as basemaps). I haven't seen any documentation on how to do queries and identifies with Bing via the ESRI ArcGIS api so far in searching and don't see any conversations on this in this forum.

Is this possible, and if so where do I start? In my prototype, I'm currently doing an identify on my map service so I'm familiar with that code and process. Thanks in advance for any assistance you can offer.
0 Kudos
6 Replies
StephenLead
Honored Contributor
...searches google maps so that you can, for example, type in a city and it will show you search results. I'd like to do something like this with my prototype by querying or identifying on Bing maps


Hi Lisa,

The closest equivalent is probably the Bing Geocoder - see documentation here.

Does that help?

Steve
0 Kudos
JeffPace
MVP Alum
If you are looking to get a location from an address the geocoder is exactly what you want.  If you are looking to get "stuff nearby" like businesses, etc, from a map click, then that functionality is not available unless you have the "stuff" in your own spatial database.
0 Kudos
StephenLead
Honored Contributor
If you are looking to get "stuff nearby" like businesses, etc, from a map click, then that functionality is not available unless you have the "stuff" in your own spatial database.


It might be possible to hook into a service like Google Places to retrieve this info (you'd need to look into the Terms of Service to see whether it's allowable to display the results on a non-Google map).
0 Kudos
LisaEidson
Occasional Contributor
Seems like either VEGeocoder or esri's locator task (using ArcGIS server locators) will work, though I'm wondering which is more effective. The VEGeocoder documentation suggests that this will find places like "disneyland," yet when I tested esri's locator task for "disneyland" it didn't find it (see sample here). Does anybody have any information on which of these options is the most versitile and will best match placenames that don't have actual addresses? Thanks much! (Sorry for the delay, I was on vacation last week)
0 Kudos
LisaEidson
Occasional Contributor
So after a little research I answered my own question. Bing's VEgeocoder is getter than ESRI's locator. VEgeocoder will find places without addresses, such as Yellowstone (finds Yellowstone National Park, WY), Absaroka-Beartooth Wilderness or Flathead National Forest. It will also find roads (no address just road like U.S. Highway 93). Essentially, it looks like if it's labeled on Bing maps roads layer, you can find it via VEgeocoder.

Locator, unfortunately, won't find any of the above examples; it will only find towns or addresses.

So for a search box on a map, VEgeocoder is a much better choices with much greater flexibility in search results.
0 Kudos
KenMorefield
Regular Contributor
You might be interested in using the geonames web service to locate places in your application.  See this link - geonames

I use it in my apps, and works great.  Occasionally it will run slowly, but so far I haven't had any real trouble with it. 

It finds place names, streams, mountains, etc.  It doesn't handle street addresses or roads though...
Ken
0 Kudos