Projects‎ > ‎

Intellisense for Google Maps v3

While working on integrating Google Maps version 3 into one of our projects at work I found it irritating that there was no intellisense there to help me. In an attempt to scratch my itch i wrote a screen scraper that transforms the Google Maps V3 API reference into a javascript intellisense file (-vsdoc.js).

It doesn't cover the entire api (I've yet to find a good way of documenting javascript dictionaries) and there may certainly be some errors hiding in it but it works on my machine in Visual Studio 2008.

Usage

  1. Grab the file (it's attached to this page, look for google.maps-v3-vsdoc.js at the bottom) 
  2. Drop it into the same directory as your script (actually you can place it wherever you like as long as you update the path accordingly).
  3. Include a reference at the top of each of the javascript files in which would like to use the maps api with intellisense.
    /// <reference path="google.maps-v3-vsdoc.js" />
Example:


The scraper

I used the wonderful open-source .net library Html Agility Pack to scrape the site (which has a fair deal of html syntax errors in it). 

Please note that I wrote the scraper in a hurry just so that I could get intellisense and then keep on coding. As such the code is far from pretty. It's poorly documented, written top-to-bottom in one single file and at one time I could swear I saw dragons in there. Horrible as it is I'll attach it anyway in case anyone might wanna have a go att covering more of the API.

Feedback

If you think is stinks or if you have a suggestion don't hesitate to contact me. There are two ways, first (and preferred) you could comment on the blog entry announcing the file and second you can write me an email.
Č
ċ
ď
GoogleMaps3VsDocGenerator.zip
(123k)
Markus Olsson,
23 nov 2009 07:50
ċ
ď
google.maps-v3-vsdoc.js
(30k)
Markus Olsson,
23 nov 2009 07:46
Comments