Showing posts tagged with google

in google, api, remote, open source, project

I was recently tasked with making a simple drop a pin style application that integrates with Google Maps to visually represent locations of remote team members. I started work on that project today - I've called it remote.

remote is written in Python (shocker, right?) using Flask (full of surprises here). It's backed with a standard MySQL database that consists of a single table to hold the latitude, longitude, and name for each pin.

The app its self consists of just a few endpoints, /get to get a list of existing pins, /add to add a new pin, and / which displays the index page.

The index page of a sample install

The index page is not pretty by any means, I kind of left it this way so it would be easy for you to do what you want. The City/State/Country box links right into Google's Geocoding API so its relatively smart, it will take just about any input and convert it into coordinates.

Once you hit "Add Pin" a request is fired off to /add to add the new pin to the database, and then the map is refreshed with an updated list from /get.

I'm not sure if it would be worthwhile to add the ability to delete a pin - it seems like that would be messy because I would need to track who "owns" a pin, so for the time being that hasn't been implemented.

remote is 100% open source, you can view the repo here. I'll likely be cleaning it up quite a bit in the coming days, but it works as it is, feel free to clone it and give it a whirl!