mtrichardson


Introducing JSONP-USGS

Entry posted on August 26, 2009.

I've been playing around with Google Maps a bit. It got to the point where I needed elevation data, so I went looking and came across a wonderful API put out by the United States Geological Survey - it's basically a simple API for elevation. Give it a latitude and a longitude and out spits out the elevation of that point. It makes me happy that it exists.

Unfortunately, it doesn't do JSONP, which means I can't really have an interactive application that uses the elevation data - so I made a quick little Werkzeug-powered Google App Engine-hosted wrapper around it. Introducing, http://jsonpusgs.appspot.com/. Pass it a lat and lng and it'll return the elevation data in JSON. Add a callback and you have JSONP. All very, very basic.

Here's an example - click anywhere on the map and you'll get the (astoundingly precise) elevation.

Feel free to use and all feedback welcome.