There's a Google Maps API v3 Visual Studio Intellisense Helper, which presumably works great for Visual Studio, but Aptana (based on Eclipse) uses a different JavaScript documentation format - ScriptDoc (.sdoc files). ScriptDoc is also the name of a VS utility to convert JS files with Intellisense comments into XML, just to confuse things.
I've tried adding the Intellisense files as file / global references in Aptana, but all this gives is completion for the word google
and no completion or documentation in the google namespace.
Possible solutions:
maps) {...} will give you a reference error if google is undefined (i.e. if the API didn't load). Instead, use if (typeof google === 'object' && typeof google. maps === 'object') {...} to check if it loaded successfully.
Go to APIs & Services → Dashboard → Enable APIs & Services at the top and Choose Maps Javascript API from the API Library. This will open up the Map JavaScript API page, and Enable it.
The API is available for developers that have a free Google Maps API key. Usage of the API is not strictly free, but they do offer $200 of free monthly usage for most users. The pricing scales to fit your particular needs and you are only charged for your API usage.
Can't you put the JS file in the Project's references ?
I'm using Aptana and ScriptDoc is the worst decision they made and they seem to be attached to it, it's the main reason I have considered switching to Eclipse. I've been thinking in using jsdoc-toolkit to generate .sdoc files from jsdoc notations (using some type of templates), but to use .sdoc files you must insert @id tags all over your code, and that discouraged me.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With