This might be especially good since bing accepts key-value pairs for different address components, instead of just a big mashed-together string like all the others. We might get more accurate results...
Documentation is here:
http://msdn.microsoft.com/en-us/library/ff701714.aspx
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | interdiff.txt | 743 bytes | attiks |
| #4 | i1542842-4.patch | 5.86 KB | attiks |
| #2 | i1542842-2.patch | 5.81 KB | attiks |
Comments
Comment #1
phayes commentedComment #2
attiks commentedBing support, keep in mind you need an API key
Supports free text and structured searches.
Comment #3
jtherkel commentedI quickly applied this patch in a dev environment and added a Bing API key at admin/config/content/geocoder. The lines below produced this error.
Fatal error: Cannot use object of type stdClass as array in sites/all/modules/contrib/geocoder/plugins/geocoder_handler/bing.inc on line 107I commented out the three lines below, and it appeared to work.
I see these lines present in plugins/geocoder_handler/google.inc but none of the other plugins. Should we remove them from the Bing plugin?
Comment #4
attiks commentedFixed in latest patch, I also added a check for an empty response
Comment #5
jtherkel commentedThe patch from #4 worked for me with Geocoder 7.x-1.2. Thanks!
Comment #6
retiredpro commentedtried patch on 7.x-1.2 and it didnt work for me. I signed up and entered my bing api in the configuration, changed my geofield to use bing, kept Multi-value input handling to Match Multiples(default), and entered an address into my node and saved. no error message but no geofield data populated.
I tried the following code to test :
// Geocode an address
$address = '4925 Gair Ave, Terrace, BC';
$point = geocoder('bing',$address);
$geoJSON = $point->out('json');
dpm($geoJSON);
And it does generate a coordinates for me so it looks like the api is working
{"type":"Point","coordinates":[-128.6077576,54.5362015]}
Any ideas on why it would not be saving? Thanks
Comment #7
retiredpro commentedComment #8
attiks commentedTry dpm($point); and you'll see all data. The $point->out just returns the coordinates
Comment #9
Brandonian commented#4 committed to 7.x-1.x. Thanks for the patch, @attiks!
http://drupalcode.org/project/geocoder.git/commit/aba5d28
Comment #11
duntuk commentedWhat's the deal with Bing support? it doesn't work on node creation (geocode via Bing), but does work with views geofiled promixty.
I think Bing should be priority right now, as it allows 50,000 transactions per day.
Google only allows 2500
Mapquest is pretty low too (5000?)
Comment #12
Exploratus commentedSorry to reopen.
As with #6, I followed all the proper steps and not getting any geocoding. I noticed that I removed the Key, and I didn't even get the exception, so I am wondering if its even kicking off.
Comment #13
Exploratus commentedI guess Bing only supports proximity. Would be amazing if it supported on node save, as it permits by far the most geocodings a day.
Comment #14
aaronbaumanFor anyone having trouble with Bing + addressfield, see here: #2094057: Bing geocoder doesn't work for postal address fields
Comment #14.0
aaronbaumanGg
Comment #16
polHi,
This provider is now supported in Geocoder 2.x.
I will close this thread, feel free to reopen it if needed.