codefordc/ancfinder — pull request #121 by JKesMc9tqIQe9M (2014-11-06 21:58:12+00:00)
Title: Use MAR "findLocation2" endpoint for SMD lookups

This PR relates to the ongoing work on #96. A couple notes:

1 Seems like the MAR endpoint cannot be accessed directly from a browser (cross-site problem, no JSONP), so I added a Django view to proxy the requests through the ancfinder. Let me know if I'm missing something obvious, though, if this step was unnecessary. Note also that this required adding the Python 'requests' package to the list of dependencies.

2 To keep the "use my current location" functionality working, I made it so that it continues to use the GovTrack endpoint. I see that the MAR APIs have a 'reverseGeocoding2' endpoint ( http://citizenatlas.dc.gov/newwebservices/locationverifier.asmx?op=reverseGeocoding ) where you can provide coordinates and get back an address, but it looks like they use the Maryland State Plane system instead of the WGS84 (normal?) one. So I'm not sure how feasible it would be to make use of that.