Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get Aptana's code assist to work with Google Maps API v3?

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:

  • Find someone who's already done this for Aptana. I've Google'd quite a bit already but couldn't find anything.
  • Convert the Visual Studio Intellisense Helper into a format Aptana can understand.
  • Scrape the API page and convert it into a format Aptana can understand.
like image 582
dave1010 Avatar asked Apr 23 '10 09:04

dave1010


People also ask

How do you check if Google Maps API is loaded?

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.

How do I get data from Google Maps API?

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.

Is Google API key free?

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.


2 Answers

Can't you put the JS file in the Project's references ?

like image 90
3rgo Avatar answered Oct 01 '22 05:10

3rgo


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.

like image 20
Benja Avatar answered Oct 01 '22 04:10

Benja