My first adventure with programming Google Maps

I’ve been eyeing the Google Maps API for some time, but hadn’t had any time to play with it. Having come down this week with some sort of bug that’s going around, I’ve been spending a lot of time laying around with the laptop, so I decided to give it a try. My first attempt … Continue reading “My first adventure with programming Google Maps”

I’ve been eyeing the Google Maps API for some time, but hadn’t had any time to play with it. Having come down this week with some sort of bug that’s going around, I’ve been spending a lot of time laying around with the laptop, so I decided to give it a try.

My first attempt is a satellite image of where Mary Gates Hall (the building my office is in) is on the UW campus.

Everything went very smoothly, using the Google documentation. The only thing I knocked heads with for a bit was trying to set the map type to be a hybrid satellite/street map instead of a plain street map (the street map doesn’t show locations on the campus). There’s a setMapType method, but apparently the API is sensitive to where in the JavaScript that method is used – it worked when I finally thought to setMapType at the very end of my load function.

I also found Joshua Siler’s How to add a Google Map to any web page in less than 10 minutes to be useful, although his starter code didn’t work for me (but the starter code generated by Google when I registered for my API key worked just fine).

Technorati Tags: , ,

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: