This example would go great with our Google Maps Mashup tutorial, allowing you to map points and boundaries together.
This example pulls data live from this LA Comptroller dataset of district boundaries.
To start, we’ll need our KML URL. We got this by right-clicking and selecting “Copy Link Address” on the
KML link in the Export sidebar:
Then we initialize our map and center it on Los Angeles:
Then we’ll add our KML layer:
The whole thing then get’s wrapped in jQuery’s
$(window).load function so that it gets run when the DOM is done loading. The full code listing is below:
There you go! If you’ve got a walk-through of your own that you’d like to share, we’ll gladly accept your contribution.