Hello,

> 1. removing the console.log() - I get an error on that line
Ok, I removed them, They only work, when using Firebug. I use alert instead...

> 2. Remove the .bind(this) - I'm not sure what it's doing there.
OK, I removed it. This is from the prototype framework. It makes
"this" available in a function. Here is a link to the description in
prototype:
http://www.prototypejs.org/api/function/bind

Greetings,
Stefan Sturm

> --
> Marcelo - http://maps.forum.nu
> --
>
>
> On Oct 24, 3:09 pm, "Stefan Sturm" <[EMAIL PROTECTED]>
> wrote:
>> Hello,
>>
>> thanks for your answer.
>>
>> I included your code and now I get the div click triggered, but
>> _after_ the map click...
>> I made two console.log() outputs to show this...
>>
>> And now I get an error:
>> a is null in main.js line 269
>>
>> Attention: infobox.js is now lockated 
>> here:http://demo.tripplanner.de/scripts/tripplanner/infobox.js
>>
>> Greetings,
>> Stefan Sturm
>>
>> 2008/10/24 marcelo <[EMAIL PROTECTED]>:
>>
>>
>>
>> > You need to stop propagation of the click event onto the map.
>>
>> > Try something like this:
>>
>> > Infobox.prototype.initialize = function( map ) {
>> >  var that = this;
>> >  this.map = map;
>> >  this.container = document.createElement("div");
>> >  this.container.id = 'infobox';
>> > // ...
>> >  map.getPane(G_MAP_FLOAT_PANE).appendChild(this.container);
>>
>> >  this.container.onclick = function(ev) {
>> >    try{ev.stopPropagation()}catch(e){event.cancelBubble=true};
>> >    alert('infowindow clicked')
>> > //    var clickedInfoWindow = this;
>> > //    Your code ....
>> >  };
>>
>> > // ... etc
>>
>> > --
>> > Marcelo -http://maps.forum.nu
>> > --
>>
>> > On Oct 24, 1:58 pm, "Stefan Sturm" <[EMAIL PROTECTED]>
>> > wrote:
>> >> Hello,
>>
>> >> I made e little example to show this problem:http://demo.tripplanner.de
>>
>> >> This shows a map with some markers. Just click one marker to open the
>> >> infowindow.
>> >> Now click inside the infowindow and see, that the infowindow gets
>> >> closed. And the firebug console only show the entry "map click".
>> >> But it should show "div click"...
>>
>> >> The two Event listener still exists.
>>
>> >> > // div listener
>> >> > GEvent.addDomListener( div, "click", function() {
>> >> >        console.log( 'div click' );
>> >> > });
>>
>> >> > map listener
>> >> > GEvent.addListener( map, "click", function() {
>> >> >        console.log( 'map click' );
>> >> > });
>>
>> >> Here are the two javascript files where everything about the map 
>> >> happens:http://demo.tripplanner.de/scripts/tripplanner/googleMaps.jshttp://de...
>>
>> >> Hope somebody can help me on this :-)
>>
>> >> Greetings,
>> >> Stefan Sturm
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/Google-Maps-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to