I've wanted to try out Google's maps APIs since I started working on BARcode and I finally got a chance this weekend.
Now, BARcode calculates the distance between members when equipment is marked as ready and includes this information to help nudge folks to exchange items.
This was a real quest in engineering. For starters, the location fields are free-form and allow you to enter anything you want. This is not great for software, so I added a list of California localities, which I had to derive from an online database of CA "Census Designated Places". Thanks to @Reefinglens I learned that such things exist - because "Crockett" is not a city or town, but is a CDP. The list was too long, so I shrunk it down by choosing an artificial lat/long box to limit it. Then, I used a fuzzy search engine to try and match these locations to what users enter. I had to figure out how to use Google's APIs to get what I want. It turns out that if you give the reverse Geo-coding API a lat/long, it returns all the things that exist there...when all we want is a CDP/locality. Finally, I had to work out how to use their distance matrix API. Fun!
Now, BARcode calculates the distance between members when equipment is marked as ready and includes this information to help nudge folks to exchange items.
This was a real quest in engineering. For starters, the location fields are free-form and allow you to enter anything you want. This is not great for software, so I added a list of California localities, which I had to derive from an online database of CA "Census Designated Places". Thanks to @Reefinglens I learned that such things exist - because "Crockett" is not a city or town, but is a CDP. The list was too long, so I shrunk it down by choosing an artificial lat/long box to limit it. Then, I used a fuzzy search engine to try and match these locations to what users enter. I had to figure out how to use Google's APIs to get what I want. It turns out that if you give the reverse Geo-coding API a lat/long, it returns all the things that exist there...when all we want is a CDP/locality. Finally, I had to work out how to use their distance matrix API. Fun!