-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improve street search with Google Maps API #24
Comments
Currently we are searching by street block and name in the database, we need to integrate with Google maps API and allow to enter free form street address (like in google maps) and get a specific coordinate. Next we need to find closest street segment to the returned coordinate. |
Looking into it a bit further, the first link I put up there wouldn't be enough to do what we want. This would be a better option, I believe. https://developers.google.com/maps/documentation/javascript/places-autocomplete We can use the Autocomplete (and pass it an option to only search Philly) to get the address, and then pull the street and house number from the autocompleted address (https://developers.google.com/maps/documentation/geocoding/intro#Types) and continue with Yury's algorithm. |
Hi! Progress on this: https://github.com/boutell/notinphilly/tree/google-autocomplete For now I'm just implementing it in the start popup controller to prove the concept. However, we're not at the finish line. It looks like the street numbers and street names reported by Google don't match what's in your database, so the API doesn't find anything. For instance, "South Galloway Street" (Google) does not match "GALLOWAY" (your data). I haven't looked at your backend yet, so I don't know yet if I could address this just by passing lat and long coordinates instead, or if the issue is more fundamental. Thoughts? |
Much improved with my latest commit: I use regular expressions to clean up street names. However issues remain. "600 S 6th St" is sending me to someplace very different. I'm not sure how your existing data deals with streets that have distinct north and south addresses. Actually I don't see most numbered streets in the database at all... not sure where to dig around that. |
@boutell Thanks for digging into that. It looks like street segment structure is far from being perfect, but i guess we need to figure out a way to work with coordinates. If we could find a closest street to a coordinate that Google api returns, that would be awesome. |
Thanks Yury... any thoughts on my question about numbered streets being One thought is to simplify this. You enter your address, and it's clear But there's no actual need to have a database of every block that exists. Just a thought! On Wed, Mar 9, 2016 at 10:01 AM, Yury Korzun [email protected]
*THOMAS BOUTELL, *DEV & OPS |
@boutell I guess that the option you suggested might work. And might be easier to build a map as people fill in the blanks. If I remember correctly, I used this as a datasource - https://www.opendataphilly.org/dataset/street-centerlines/resource/71f5a730-591c-43dc-a312-1c5a1da2da30. I developed the whole thing sporadically and I wasn't sure how it would look in the end. |
API: https://developers.google.com/maps/documentation/geocoding/intro
Use browser geolocation as well?
https://developer.mozilla.org/en-US/docs/Web/API/Geolocation/Using_geolocation
The text was updated successfully, but these errors were encountered: