0

GMaps Tooltip (popup) problem.

asked 2014-09-17 15:05:58 +0800

Stoichkoff gravatar image Stoichkoff
1

updated 2014-09-18 15:59:18 +0800

chillworld gravatar image chillworld flag of Belgium
5337 4 9
https://github.com/chillw...

Hi all!

I have to display tooltip (popup) on every Gmarker on my map, when you click on the marker.I want to add markers to a Gmaps map. And I want them to have multiline information on their tooltip, but whatever I try to display it, it throws me null pointer exception at: window.appendChild(popup); Any ideas why I can't display it?

All classes used are from org.zkoss.zul package.

Popup popup = new Popup(); 
window.appendChild(popup); 
Vlayout vlayout = new Vlayout();
Label labelLine = new Label("ID: " + ccp.getParkPlace().getId()); 
vlayout.appendChild(labelLine); 
popup.appendChild(vlayout); 
gM.setTooltip(popup);

ZK Version used: 6.0.5

Viewmodel :

@VariableResolver(DelegatingVariableResolver.class)
public class MyViewModelVM {

    @Wire("#win")
    private Window window;

zul :

<window id="win" title="Gmaps Demo" border="normal" width="100%" height="100%"
delete flag offensive retag edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2014-09-18 16:03:05 +0800

chillworld gravatar image chillworld flag of Belgium
5337 4 9
https://github.com/chillw...

Here is the solution :

public class MyViewModelVM {

    private Window win;

    @Init
    public void init (@SelectorParam("#win") Window window) {
        win = window;
    }

Note : if the original code is in a command, use the selectorParam there.

Greetz chill.

link publish delete flag offensive edit
Your answer
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
1 follower

RSS

Stats

Asked: 2014-09-17 15:05:58 +0800

Seen: 7 times

Last updated: Sep 18 '14

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