Skip to main content

Configure apikey for google.mappopup does not work

5 replies [Last post]
chanchitodata
Offline
Joined: 2007-01-05
Points: 0

Hi,

I have been trying to configure the correct api key to be used with google.mappoup widget. I have tried almost everything and I cant manage to do it correctly.

This is what I have,

JDK 1.5.0_09 and Apache Tomcat/5.0.28
I project in Eclipse 3.2.x only including the JMaki stuff.
The version of JMaki is the lastest version found on (beta 2) on the JMaki project page
I have changed the config.json with a key generated for the url "http://localhost:8080/TestJMaki". I can see that this is the webRoot, cause this is the url that appears in the generated html page.
I have also configured config.json with the same key but with the url as "*", this should work after examining the AjaxCommon.java source file.
The jsp page is a copy of the goole mappopup example in the gallery on the JMaki project pages

Ths script tag generated in the page is always

What I am I doing wrong?? Its really weird and I have spent almost 2 days on this, please help.
I can send the Eclipse project if somebody needs it. I did not found a way to upload the project with this post.

Regards,
Rodrigo Alvarez

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
chanchitodata
Offline
Joined: 2007-01-05
Points: 0

Thanks,

It works now, thanks for the quick reply its always a pleasure to get a quick answer, that is a proof of a living open source project

Regards,
Rodrigo Alvarez

gmurray71
Offline
Joined: 2003-07-31
Points: 0

We really appreciate you reporting this. It is critical we support our users and I would hope you would let us know if you have any other problems or feature requests.

Thank you again.

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Rodrigo,

I've dug down and found this is a much more serious bug.

https://ajax.dev.java.net/issues/show_bug.cgi?id=80

I plan to due a refresh release .8.1 which will contain a fix for this.

The only work around involves unziping the ajax-component.jar file and removing the /META-INF/resources/config.json and reziping up the file. Please check the bug status and for jMaki version .8.1 for a change.

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Alright the problem has been fixed in jMaki and the latest jMaki plugin version 1.6.4 has the update.

You can get the plugin by running the update center from netbeans or download the latest jmaki from https://ajax.dev.java.net/download.html

Sorry about the problems and thank you for reporting this.

gmurray71
Offline
Joined: 2003-07-31
Points: 0

Hi Rordrigo,

I'm sorry for all the trouble you have gone through. I'm looking at the document at: https://ajax.dev.java.net/widget-developer.html#config and I don't see the trailing slashes which I think is your problem.

The key link needs an exact match and I suepect all you need to do is add a slash to the end of the key mapping in your config.json file.

jMaki is going to look in the API keys for:

http://localhost:8080/TestJMaki/

Using "*" doesn't work with Goolge as they need unqiue API keys for every directory level URL. "*" is for use with application keys which are used by Yahoo. Yahoo allows you to use a key that is not bound to a URL.

So try the the following in the "goolge" portion of the API keys:

"apikeys" : [
{"id": "google", "keys": [
{"url": "http://localhost:8080/TestJMaki/",
"key": "YOUR_GOOGLE_KEY"
}
]

You will of course need to go to google and generate a key using the URL http://localhost:8080/TestJMaki/

I'm going to add an issue to jMaki to allow for either http://localhost:8080/TestJMaki or http://localhost:8080/TestJMaki/ but for now please use http://localhost:8080/TestJMaki/

If you are still having problems I might need to see a war file for your application (or Eclipse project) but lets start with the API keys.

-Greg