Replace Google’s Aerial Imagery with USGS/Terraserver
So, you want to replace Google’s aerial imagery with USGS/Terraserver/Microsoft aerial imagery, do you now? Well… I did. For Ann Arbor, Michigan at least, USGS has three extra levels of zoom (on Google’s zoom scale) when compared to what Google offers. So, I just made a javascript file which you can include after you include the Google Maps API to simply replace the imagery. Easy as that.
Please copy this javascript to your own server, and include it just after you include the Google Maps API javascript file.
GMap_USGS.js
Here’s an example page with and without this javascript included.
February 7th, 2006 at 11:44 am
I really enjoy your work. I am a complete newbie at Google Maps but I am customizing a basic map to suite my needs.
I added the GMap_USGS.js script to my code and it works great. How could I go about adding some additional buttons so that I could choose the topo maps from USGS instead of the DOQ maps. I read your blog entry on adding custom maps but as easy as you replaced the Google aerial maps with the USGS, I thought there must be an easy way to add additional buttons to call the Topo maps.
Thanks and keep up the good work.
February 10th, 2006 at 12:58 pm
Thanks Donnie. Check out the javascript for the imagery comparison map I made:
http://maps.kylemulka.com/satcompare.php
March 13th, 2006 at 8:54 pm
Hey Kyle, this is the bomb! Hope this will be up for awhile, sooo much better than TS and its fast!
March 14th, 2006 at 7:09 am
Not really sure what you mean, because the Terraserver imagery is taken directly from Terraserver, so I can’t imagine it is any faster. Even if my server goes down, if you are using a local copy of the Javascript file, it will still work.
April 13th, 2006 at 11:39 am
This is awesome. I have one request: Can you provide easy instructions on how to add a Terraserver button *in addition* to the google satellite button? Seems that just including the javascript will replace the google satellite functions, but I’d like to give users the option of switching back and forth to see which one shows them the best detail.
Thanks!
April 13th, 2006 at 11:47 am
Yes, I can do that. It will have to wait until at least the end of the month because I’m pretty busy with final projects for school and I want to switch over to v2 of the API.
-Kyle
April 17th, 2006 at 1:42 pm
Thanks Kyle! BTW, I also just noticed The new Yahoo Maps Beta (http://maps.yahoo.com/beta/) has aerial images, (and a quick check shows that the images are more up to date than both Google and Terraserver… At least where I looked…) So I may end up using Yahoo’s mapping api instead…