Closed GoogleCodeExporter closed 8 years ago
Thanks for this, I will take a look and see if I can reproduce it.
OOI are you always passing in "_ge.getGlobe()" or are you perhaps using a
variable to hold a reference to the globe?
Thanks,
Fraser
Original comment by fraser.c...@gmail.com
on 17 May 2013 at 10:09
Hi again,
yes I'm always passing "_ge.getGlobe()".
I've tried to store geGlobe in a var when the plugin is ready and using the var
adding/removing the events - And I haven't been able to reproduce the error yet.
/TKM
Original comment by tho...@gmail.com
on 17 May 2013 at 11:29
Hey,
Thanks for getting back to me - unfortunately I can't seem to reproduce the
error - although I will keep an eye on it and leave this issue open for now...
Original comment by fraser.c...@gmail.com
on 17 May 2013 at 10:53
Original comment by fraser.c...@gmail.com
on 18 Jul 2013 at 1:46
Hi Fraser,
I've noticed that when adding the click event to the globe, all existing
placemarks(added with no event) "gets" the click event.
I can then click the placemarks and the _geWb_KmlEvent(object sender,
GEEventArgs e) is fired.(eventType: Click, Message: KmlMouseEvent, mapObject:
KmlPlacemark).
Is this to be expected?
/TKM
Original comment by tho...@gmail.com
on 3 Sep 2013 at 12:35
Hi,
Yes, if you are "adding the click event to the globe" and then all clicks will
be captured. That is how the API works.
If you want specific placemarks to have specific events then you would need to
either
a) screen the objects in a generic globe click handler and act accordingly for
placemarks.
geWebBrowser1.AddEventListener(ge.getGlobe(), EventId.Click);
geWebBrowser1.KmlEvent += (o, e) =>
{
// screen for the objects here
}
b) attach specific handlers to specific objects
geWebBrowser1.AddEventListener(myPlacemark, EventId.Click);
geWebBrowser1.KmlEvent += (o, e) =>
{
// handle myPlacemark click
}
Original comment by fraser.c...@gmail.com
on 5 Sep 2013 at 3:33
Thanks for clarifying that. I was under the impression that:
geWebBrowser1.AddEventListener(ge.getGlobe(), EventId.Click); only would add a
surface click.
Original comment by tho...@gmail.com
on 13 Sep 2013 at 12:31
Well strictly speaking it does. It is just that if a placemark is on the globe
then it's click event is also triggered as a target in the capturing phase.
Just to note you can also control the capturing/bubbling behavior if required
using the optional `setCapture` parameter on AddEventListener.
If you are not sure about capturing/bubbling then this should help
http://www.quirksmode.org/js/events_order.html
Original comment by fraser.c...@gmail.com
on 14 Sep 2013 at 5:06
Original issue reported on code.google.com by
tho...@gmail.com
on 17 May 2013 at 9:28