google-code-export / sandy-disaster-recovery

Automatically exported from code.google.com/p/sandy-disaster-recovery
2 stars 2 forks source link

Patch for /trunk/sandy-disaster-recovery/site_ajax_handler.py #125

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
In form.js, added ajax to check for duplicates by searching lat/lng.
If there are duplicates, the update returns a json_array, to be processed 
within form.js

Original issue reported on code.google.com by andy.n.g...@gmail.com on 10 Jan 2013 at 11:59

Attachments:

GoogleCodeExporter commented 9 years ago
404 probably isn't the best error code to return in case of missing lat/lng, 
since this is a bad request, use that error code instead.

Also, doing an exact lat/lng match is a bit problematic and will fail in the 
case of apartment buildings and so forth. Also, the Google geocoder could allow 
these lat/lngs to shift slightly or encode things differently. Perhaps it would 
be better to use lat/lng ranges instead.

Overall this looks fine though. Feel free to check it in.

Original comment by rostovp...@gmail.com on 11 Jan 2013 at 5:39

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
This handles the issue of apartment buildings, by presenting a list of all 
addresses associated with that lat/lng. I thought this might work because the 
apt 3e and 3E for a single building would come up as separate entities. With 
this solution, you are shown a list of all Sites at that address, and can pick 
the appropriate apt number, if one exists. Let me know if you would still 
rather it not be associated with lat/lng.

Original comment by andy.n.g...@gmail.com on 12 Jan 2013 at 1:10