Wednesday, September 3, 2008

First App Engine Application - Static Map Maker

Over the past couple weeks I have been "working" on a newer project idea related to geo/gis data and mapping. In working on and thinking about the project it became clear that it would be useful to be able to generate static map images for specific lat/long coordinates on Earth. Basically, I wanted Google Maps images without Google Maps so that I could use the map images as references in my app (to be outlined in future posts).

Thus ... I bring you Static Map Maker!
(the link goes to the live app which anyone can currently try after logging into their Google Account)

Being my first real venture into the land of Google App Engine applications and something that I was proud of and able to throw together in about an hour of work (plus a bit more research prior) ... I present to you this quick rundown of what I did and how I did it:

After a small bit of research I found that Google had opened up some of its mapping data in the form of a Static Map API which allows for the retrieval of specific static map images based on the given http url. Perfect. The only things needed were a Google Maps API Key (free with registration) and the specifics of the map you want.

I had downloaded the Mac GoogleAppEngineLauncher previously but needed to updated to the latest SDK version before I could upload any code. With the launcher's GUI, its quite simple to create a new app and get something very fast and dirty running in no time. After a few minutes of flipping through the Getting Started tutorial I had a index page which showed my desired form, a result page, and a couple controllers to do the heavy lifting.

After a bit of testing where the map key for localhost came in very handy, I had a very limited but working none-the-less application that would allow me to enter new parameters and see the resulting map. The current app has no data validation and lacks any sort of formal tests or great coding standards but its functional (I am not a Python man by trade).

I then registered the application on the app engine site (SMS verification of your intent to create a new application) and used the launcher to one-click upload my code. Viola! Finished!

** I will probably post the code either on code.google.com or github, but that can wait until tomorrow **

2 comments:

Jeff Scudder said...

Very cool. I'm interested to see what this mystery project is all about :)

Benjamin P Lee said...

thanks. I am hoping to have more later this week.