0

gmaps tag error

asked 2009-12-17 07:56:00 +0800

alguineirojunior gravatar image alguineirojunior
18 2

updated 2013-06-28 03:50:08 +0800

jimyeh gravatar image jimyeh
2047 1 4
ZK Team

Hi,

I updated my Zk to 5.0.0-RC2 and when i try to use gmaps tag Im getting this error:
org.zkoss.zk.ui.metainfo.DefinitionNotFoundException: Component definition not found: gmaps in [LanguageDefinition: xul/html], [SYS file:/E:/workspace-csii/csii/WebContent/index.zul

My code in index.zul is

<zk>
<script src="http://maps.google.com/maps?file=api&v=2&key=ABQIAAAA7_PRET95fDhQgNtQtC58aRSPajjBwEPeUe64LiuWG4sH29NvDhQ9em2x4twWaUu-JLOYaNxXqabRCQ"
type="text/javascript"></script>
<gmaps width="500px" height="300px"></gmaps>
</zk>


Could you Help me please?

João Alguineiro

delete flag offensive retag edit

14 Replies

Sort by » oldest newest

answered 2013-07-10 05:59:36 +0800

nsharma gravatar image nsharma flag of India
917 1 11

I changed the key ,everything is working fine.

link publish delete flag offensive edit

answered 2013-06-26 11:01:21 +0800

nsharma gravatar image nsharma flag of India
917 1 11

Hii,I am facing the same issue...did anyone found the way to do this.Its really important.

link publish delete flag offensive edit

answered 2010-01-12 03:48:46 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

Please follow this bug tracker. https://sourceforge.net/tracker/index.php?func=detail&aid=2930482&group_id=152762&atid=785191

link publish delete flag offensive edit

answered 2010-01-11 10:07:03 +0800

timo18146 gravatar image timo18146
189

updated 2010-01-11 10:07:43 +0800

Henri,
i wrote pmail to you with instructions, URL and passwords. hope henrichen@thisdomain was right. ;)

link publish delete flag offensive edit

answered 2010-01-11 09:30:48 +0800

timo18146 gravatar image timo18146
189

Henri,

I am sorry. I was wrong. It worked in IE8 the first time. but after 2 page refresh it did not work anymore.

i will provide you a login to alpha test server where you can look at it. I'll do this via email.

link publish delete flag offensive edit

answered 2010-01-11 09:20:04 +0800

timo18146 gravatar image timo18146
189

updated 2010-01-11 09:22:46 +0800

on my way stripping down to a test szenario, i figured out that: MUHAHA... ^^

<script content="zk.googleAPIkey='MYKEY'" /> is not working in my complex page. at least not from within eclipse tomcat - this only when I call the page via localhost and not FQDN of the dev-pc (which of course the api-key is valid for).
when I deploy the file to a tomcat behind an apache webserver, it works. - at least for now after quick testing it seems so. IE8 problems gone.

so:
the Issue is in Eclipse-tomcat behaviour. 100% reproducable only in IE8. FF is the thing described some articles above: sometimes works, sometimes not.

any idea how to debug this? Should be possible to use the local tomcat in eclipse with zkstudio for everything - and of course also over FWDN (i do this, because I have a virtualbox with windows running for browsertests).

by the way: it seems essentially important where in the page you put <script content="zk.googleAPIkey='MYKEY'" /> ... should be somehow nearly first line.. ? how is that intended?


thankUall
Timo

link publish delete flag offensive edit

answered 2010-01-11 08:23:42 +0800

timo18146 gravatar image timo18146
189

I am sorry.. The problem still exists and becomes more and more complex.. I tried all tags. no way...

I just noticed that it only works in FF3.5.5 - but NOT in IE8 nor Safari 4.0.4..


....hmmmmmm....

i will setup a demo if you dont have any idea right now..

it must have to do with the include things and macro components. i heaviliy use this.

stay tuned... - this is unfortunatelly damn important for me to have gmaps work..

Timo

link publish delete flag offensive edit

answered 2010-01-11 04:52:14 +0800

timo18146 gravatar image timo18146
189

updated 2010-01-11 04:53:07 +0800

Hi Henri,

thanks for the reply. I found a working way. The problem is not the key or the loading mechanism itself. It is that I use includes with mode="instant" . the file with the map is instantly included by an instant included file from the top-file. when I put the key in the top-file and do not instantly include it works all the time. when it is, where it was with the old <script language...> loading tag (top of included zul) , it often produces this problem.

As I was not able to make a sample for you that reproduces the problem constantly (the page with this has a quite complex gui which seems to bring this up), i put that on my todo-list.


thank you,

Timo

link publish delete flag offensive edit

answered 2010-01-10 21:39:56 +0800

henrichen gravatar image henrichen
3869 2
ZK Team

timo,

The gmaps version 2.0_50 adapts the "Google AJAX API Loader" mechanism and thus the new way to specify the google key in ZK 5.

the sequence is like this:

1. ZK loads the "Google AJAX API Loader" script in and verify the key.
2. Then use "Google AJAX API Loader" to load google maps script in.
3. run ZK Gmaps script.

Per the firebug information (those are codes of Google AJAX API":

google.loader.KeyVerified = false;
google.loader.LoadFailure = true;

It seems that Google thinks the key is NOT "verified" and step 1 is failed.

-----
I cannot replicate your case here. Let's do some experiments.

In you page specify

<script type="text/javascript" src="http://www.google.com/jsapi?key=ABCDEFG"></script>

This virtually do the step 1.

Let's see whether this solve the issue. Otherwise, you might has to give us an access URL to check your test page directly.

link publish delete flag offensive edit

answered 2010-01-09 08:46:44 +0800

timo18146 gravatar image timo18146
189

I tried some more time. It seems that there is some problem there. Sometimes everything works like it should and 2 minutes later, you only get Errors. I am quite sure that there must be some kind of timing-problem. because the same API-Key is sometimes working and often not. The problem is in all my browsers (FF35, SF3, GC, IE8)..

but I found another bug in gmaps. I will file and make new thread.

timo

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2009-12-17 07:56:00 +0800

Seen: 2,082 times

Last updated: Jul 10 '13

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More