Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Searching for an address without "Chicago" appended yields results outside of it #135

Closed
EricTendian opened this issue Jan 20, 2016 · 3 comments
Assignees

Comments

@EricTendian
Copy link
Contributor

image

Searching for an address such as "222 n lasalle" without the city, state, or ZIP code appended will show results from anywhere in the world. To make searches more accurate, the geocoding bounding box should be limited to Chicago-area addresses.

Possible Solution

ArcGIS uses the parameter "bbox" in their API to allow a bounding box to be passed in to make geocoding more accurate: https://developers.arcgis.com/rest/geocode/api-reference/geocoding-find.htm#ESRI_SECTION3_24A68CF5D6E54FDE810E243227052A0A

I'm not sure what the bounding box should be exactly, but the lat/long points 41.617,-87.524 and 42.015,-87.928 form a rectangle that roughly covers all of Chicago.

To actually implement this in the API, here's what a sample API call would look like: https://geocode.arcgis.com/arcgis/rest/services/World/GeocodeServer/find?outSr=4326&forStorage=false&outFields=*&maxLocations=20&bbox=-87.524,41.617,-87.928,42.015&text=222%20n%20lasalle&magicKey=GST7YMc0AM9UOsE3GY8tIS9GOghnYnwZGPTp7P9PCZc0YiD7DsKGCZyAOh5-Dn47Z5Et1bWtHghnCbWQ&f=json (note bbox=-87.524,41.617,-87.928,42.015)

It seems the API call is being made on this line of Place.js. I'm not too familiar with the codebase so perhaps there is a better place to add the parameter, but it seems like adding that parameter would fix the issue described.

@rladines
Copy link
Collaborator

Thanks for the suggestion. A similar issue has been raised before (See #44) but got closed after some internal discussions. There was also a future plan to switch to Google Places for address and place resolution and so this became a lower priority issue.

We'll most likely end up implementing what you suggested as that seems to be a quick change. And you are correct, it is on that line of the Place quicksearch plug-in you referenced above where this is invoked.

@tomschenkjr
Copy link
Contributor

A fix has been deployed to branch iss135 and is being tested.

@tomschenkjr
Copy link
Contributor

From conversation in #148. We now have a fix deployed to this issue in the dev branch and will be integrated into our v1.0.1 release. Need a couple pieces of documentation.

  • @rladines - Can you add documentation for administrators/developers in the docs/ to let them know where to configure bbox?
  • @reve0716 - Can you update the user documentation in docs/ that a POI search will, by default, return 20 results whereas an address search returns 1 result?

@rladines rladines mentioned this issue Feb 5, 2016
Merged
rladines added a commit that referenced this issue Feb 5, 2016
Merging with fixes to isse #135 and doc changes
# for free to join this conversation on GitHub. Already have an account? # to comment
Projects
None yet
Development

No branches or pull requests

4 participants