Thu, 11 Aug 2005
Adding maps to real estate application
Announcing a Firefox/Greasemonkey script to insert maps into the property listings of www.newenglandmoves.com. The script and a screenshot are here:
http://www.thrall.net/maps/nemoves.html
The interesting thing about this, IMHO, is that I'm loading the gmap
javascript files after the page has loaded. Greasemonkey scripts run
after the page has loaded so I have to catch the document.write calls
and reimplement them via javascript. The relevant code can be found below.
If you like it, feel free to click on one of my ad links ;)
function loadGmap() {
GMAP_KEY = YOUR KEY HERE;
document.write = function(s) {
var a = s.match(/<script src="(.+)" type="text.javascript">/);
if (a) {
// dodgy... need to let current script load first
setTimeout('loadScript("'+a[1]+'");', 250);
return;
}
a = s.match(/<style type="text\/css" media="(\w+)">([^<]+)<\/style>/);
if (a) {
// can do css right away
addStyle(a[1], a[2]);
return;
}
}
loadScript('http://maps.google.com/maps?file=api&v=1&key=' + GMAP_KEY);
}
window.loadScript = function(src) {
var head = document.getElementsByTagName('head')[0];
var scr = document.createElement('script');
scr.src = src;
scr.type = "text/javascript";
head.insertBefore(scr, head.lastChild.nextSibling);
}
window.addStyle = function(media, contents) {
var head = document.getElementsByTagName('head')[0];
var style = document.createElement('style');
style.type = "text/css";
style.media = media
style.innerHTML = contents;
head.insertBefore(style, head.lastChild.nextSibling);
}
(19:38) [/Maps]
#
Fri, 01 Jul 2005
MBTA Subway Maps
I've mapped the Boston subway stations using the Google Maps API.
Check it out: MBTA
Subway Maps
(20:38) [/Maps]
#
Wed, 18 May 2005
Flickr + Google maps
So, I've got most of the pieces put together on my own, but this guy has got the whole thing wrapped up with a bow. Nicely done.
See my flickr photos mapped on google maps
(09:45) [/Maps]
#
Sun, 17 Apr 2005
Google Sightseeing
What a good idea. Create a site that let's you go Google sightseeing. They
collect Google Map links to famous and/or interesting locations.
For example, I submitted links to the still under-construction
Gillette
Stadium and to Guantanamo Bay
Cuba
(19:49) [/Maps]
#
Sat, 26 Mar 2005
Gmaps: integrating Terraserver imagery
I'd wanted to hack google maps and replace the tiles with ones from
Terraserver. The idea would be to be able to switch back and forth
from street map to satellite images. It seems like this should
be doable. The 2 main problems are determining the pixels per degree
of the terra server zoom levels and dealing with UTM zone boundaries
(using terraserver tiles you cannot seamlessly display a map that
crosses UTM boundaries)
Instead I wrote a fairly simple bookmarklet that opens a window and
displays the satellite image corresponding to the current map. When
you zoom in/out or reposition the map, a new satellite image is
fetched. This uses the Terraserver
WMS which doesn't suffer from the cross UTM zone boundaries
problem (but wouldn't be useful itself as tiles due to the slow fetch
times).
Anyway, you can get the bookmarklet from my
Google Maps wiki page. And here's a little screen capture
showing the mall in DC:
(07:55) [/Maps]
#
Fri, 11 Feb 2005
All your Google Maps belong to us
Stayed up way to late, but it was worth it. I've managed to load my
own GPS trails onto the Google Maps interface. Moo haaa haaa...
Click on the screen cap for a larger version and eventually details...
(22:00) [/Maps]
#
GDrive: Driving Google Maps
Here's an updated set of bookmarklets to "drive" the Google Maps
driving directions. Just follow these steps:
- Save the following links to your bookmark bar:
GDrive: start
GDrive: stop
GDrive: reset
- Bring up some driving directions. For example Boston
to New York
- Zoom to a comfortable level. Lower is generally more fun to
watch.
- Click "GDrive: start" and you're off. You can stop and re-start
the trip. The speed is set by your current zoom level.
Have fun!
And more info can be found here on Google Maps
Hacking and Bookmarklets
Update: Added the walking man icon from the above link and pegged the
speed at the current zoom level.
(10:43) [/Maps]
#
Google Maps
Holy cool. If you haven't seen this already, go check out Google Maps. It's still in beta, but
already provides a seriously nice interface (maps as big as your
screen, smooth scrolling, turn-by-turn details on directions, keyboard
short-cuts, do-what-I-mean searchs, and more). On top of that there
are many opportunities for playing with the data.
A good collection of how-it-works details can be found onas
simple as possible, but no simpler. So far, I've written Python
scripts to pull down titles based on lat/lon/zoom, download driving
directions and then parse out the route to upload to my GPS. And check
out these little bookmarklets found in the comments of the link above:
follow route
or
follow fast
(only tested on OS X Firefox. To use, drag to your tool bar then
click on one while looking at a directions map zoomed way in. No way
to cancel before the end yet)
So many things to play with!
Update: Modified the bookmarklet so that the starting marker now
moves along with the route: follow route w/marker (starting to drag down my poor little Mac's CPU. probably will work much better on a younger-than-3-year-old computer)
(06:39) [/Maps]
#
Sun, 05 Sep 2004
The Fells
Finally made it over to the Middlesex Fells
Reservation for some mountain biking on Saturday. Click on
the image below to see the whole route:
Oh, and here is an elevation/speed profile of the trip:
And if you would like to create maps and graphs like these, just
head on over to GPS Visualizer
(20:08) [/Maps]
#
Tue, 24 Aug 2004
Eye in the sky
Cool! The
City of Cambridge GIS has high resolution aerial images of the
city. The detail to the left is of my car on April 17th, 2003
(presumably early in the morning before I went to work?). "Photo
resolution is 3 inch per pixel"... Very
cool. See the whole thing here.
(11:25) [/Maps]
#
|