-
FEATURED COMPONENTS
First time here? Check out the FAQ!
someone has gmaps 2.0.9 or later version?
in small talk has examples using this version but can not find anywhere.
thanks in advance.
the download page zkoss just have to download the version
2.0.5 and smalltalks are demanding version 2.0.9 or
later.
I have 2.0.5 version and currently have an event that not
works fine and should be because of that.
mymap.addEventListener("onSelect", new EventListener() { public void onEvent(Event event) { try { onClickMap((SelectEvent) event); } catch (Exception ex) { Logger.getLogger(TesteGeoController.class.getName()).log(Level.SEVERE, null, ex); //alert(ex.getCause().toString()); } } }); private void onClickMap(SelectEvent event) { Component component = event.getReference(); if (component.getClass().getSimpleName().equalsIgnoreCase("Gmarker")) { alert("click on Gmarker!"); } else if (component.getClass().getSimpleName().equalsIgnoreCase("Gpolygon")) { alert("click on Gpolygon!"); } else if (component.getClass().getSimpleName().equalsIgnoreCase("Gpolyline")) { alert("click on Gpolyline!"); } }
the above event recognizes only the component GMarker and do click on the area map appears the error: Not a child: <Gmaps mymap>
This link
http://books.zkoss.org/wiki/ZK_Component_Reference/Diagrams_and_Reports/Gmaps
says it recognizes Ginf, GPolyline,
or Gpolygon.
My greatest need at the moment is to detect click or selection of different components within gmaps.
if you can help thank you very much
the link below has an example
http://www.bdcc.co.uk/Gmaps/BdccGmapBits.htm
Asked: 2011-03-02 07:18:11 +0800
Seen: 225 times
Last updated: Mar 03 '11