-
FEATURED COMPONENTS
First time here? Check out the FAQ!
I am able to catch the onMapClick event when I click on a gmap, however this event will also fire when I click the 'x' on the ginfo bubble - I wish to distinguish between gmap click and ginfo click.
How can I get the onClose event (if there is such a thing) when I click on the 'x' of a ginfo bubble?
Hi,
That sounded promising, but I am having two issues with this:-
1. onInfoChange gets called even when I click on the map, whenever i click map or ginfo, both onInfoChange and onMapClick get called.
2. gmap.getInfo() is always null, regardless whether ginfo has been open or not???
I am doing a couple of things differently, in that I do most of my work in the java controller, so I have added the onInfoChange evetn as follows:-
gmap.addForward("onInfoChange", self, "onInfoChange")
I cannot see why gmap.getInfo() is always null
Hi,
1.onInfoChange is only fired when a ginfo is closed(visible->invisible),
and onMapClick is fired when you click any one of gmap, ginfo and gmarker.
2.gmap.getInfo() is not null when a ginfo is opened(visible),
when you click on a ginfo (except the 'x' button),
it won't return null.
3.in java class, you can try
gmap.addEventListener("onInfoChange",new GmapEventListener());
public class GmapEventListener implements EventListener{ @Override public void onEvent(Event event) throws Exception { } }
thanks hideokidd, I have tried this also, still no luck
and, onInfoChange is called when you click on the map also, as the ginfo is closed when you do this.
gmap.getInfo() is always null when onInfoChange gets called
I was contemmplating using double click on map and single click on 'x' just does nothing - as none of this seems to be working for me.
I have another issue (very different) but still related to ginfo.
I am using html to display my contents in ginfo, and I have a href that when I click it I wish for it to open a modal dialog - the question is how? Alternatively I would like to set up so that when href is clicked, it will call a java method that will do some processing and then open a modal dialog. I would've thought this would be common, to put href in ginfo, ie More Info link?
Any ideas?
Hi,
1.onInfoChange is called when you click on the map also, as the ginfo is closed when you do this.
A: Yes, whatever the action you take, the event is called when ginfo is closed, it's possible that you click on gmap and ginfo is closed in the mean time.
2.gmap.getInfo() is always null when onInfoChange gets called
A:Yes, the event gets called means a ginfo is closed, so gmap.getInfo() will return null. because the method returns the active(opened or visible) ginfo. But it will return a ginfo if the ginfo appears and another ginfo get closed in the same time.
So we cannot know which ginfo is closed, we only could make a variable to store opened ginfo, thus this would help us know which ginfo is closed in the event.
3.I am using html to display my contents in ginfo, and I have a href that when I click it I wish for it to open a modal dialog - the question is how?
A:(1)use html : Let me think...
(2)use zk component : Toolbarbutton could help you to do hyperlinking, any with it you can open a window(by window.doModal()) to make this idea. Just personal suggestion.
3.I am using html to display my contents in ginfo, and I have a href that when I click it I wish for it to open a modal dialog - the question is how?
A:(1)use html : Let me think...
(2)use zk component : Toolbarbutton could help you to do hyperlinking, any with it you can open a window(by window.doModal()) to make this idea. Just personal suggestion.
I know I could use toolbarbutton in other components, but how to add toolbarbutton in ginfo? I would like to have a link in ginfo, 'More Info', this would open my modal dialog (I have already impelemented and opening this modal dialog form a button press, I just need to be able to do it from a hyperlink in ginfo.
If it is possible to add toolbarbutton to ginfo this would work, but I dont think that is possible?
Hi,
It's known bug that hyperlink in ginfo will not work on Firefox,
and ZK team has fixed it.
But the lastest version is not released.
Take zk componetns in ginfo is risky,
since that may mess up something with google API.
(And you could post the idea to zk features)
Would you develop other parts alternatively and wait for new release?
Its not really an issue with hyperlink in firefox (or it may be), I have problem even in explorer, the issue is how to call a modal dialog from a hyperlink within ginfo. I can easily open another zul window, but not sure how to call a modal dialog or for that matter a java method from hyperlink?
As for the ginfo onClose, i will modify how i do this, i will change my onMapClick functionality so that it doesn't matter what is pressed, and add a button to perform the task I was doing prev - in short - I am happy to continue.
Thanks a lot for your help and advice, this modal dialog through hyperlink in ginfo would be a good one to solve though.
Hi,
Try ths, does it work on your app?
<ginfo id="myinfo" open="true"> <attribute name="content"> <a href="JavaScript:;" onclick="window.open('http://www.google.com', '', 'width=400,height=200');"> Open a popup window </a> </attribute> </ginfo>
Asked: 2009-05-07 06:21:39 +0800
Seen: 681 times
Last updated: May 26 '09