Grauw’s blog

Google Maps API

June 12th, 2006

I experimented a little with the Google Maps API to create a route description map for this year’s MSX fair in Bussum. It’s nice and interactive and all, showing the fair location and route descriptions to it from several locations.

I must say it was very easy to use. Well-documented API.

A few downsides though:

  • It doesn’t work with XHTML :(

  • I don’t get why we manually have to add this CSS to enable the path-lines in IE:

    v\:* {
       behavior:url(#default#VML);
    }

    They can just add that dynamically themselves? Same for the xmlns:v="urn:schemas-microsoft-com:vml" “namespace”.

  • They don’t provide an easy tool to add markers and points on a path and automatically generate code from that. It would have saved me a lot of time, while it would have been trivial to create.

    Yes, there are third-party tools available, however at least the one I used wasn’t really convenient, it output longitude/latitude in the order reverse of the one that Google’s API needs, and I still had to wrap the rest of the code around it (so that part it ended up being a lot of copy/paste and tweaking work).

  • It would have been nice if it were declarative XML instead of Javascript. Can you imagine?

    <gm:map>
       <gm:location long="5.178" lat="52.272"/>
       <gm:controls>
          <gm:largemapcontrol/>
          <gm:scalecontrol/>
          <gm:maptypecontrol/>
       </gm:controls>
       <gm:markers>
          <gm:location long="5.1707" lat="52.2677">Uitwijk</gm:location>
          <gm:location long="5.1628" lat="52.2662">Station Bussum-Zuid</gm:location>
          <gm:location long="5.18557" lat="52.27862">A1 exit 7</gm:location>
          <gm:location long="5.20342" lat="52.26799">A1 exit 8</gm:location>
       </gm:markers>
    </gm:map>

    Etc. That would’ve been nice. Maybe I’ll try to write a Backbase wrapper around the Google Maps API to do just that :).

But overall it’s still nice that it exists, and that we can use it for free :). And the software itself works marvelously.

Grauw

0 comments [reply]

Comments

None.

» Add a comment…