[itr@pointcarbon.com: [OpenLayers-Trac] Error in Marker.js]

3 messages Options
Embed this post
Permalink
Christopher Schmidt-2

[itr@pointcarbon.com: [OpenLayers-Trac] Error in Marker.js]

Reply Threaded More More options
Print post
Permalink
Sent to the wrong list.

----- Forwarded message from Ian Trotter <[hidden email]> -----

From: Ian Trotter <[hidden email]>
To: "[hidden email]" <[hidden email]>
Date: Mon, 26 Oct 2009 17:31:12 +0100
Subject: [OpenLayers-Trac] Error in Marker.js
Reply-To: [hidden email]

Hi,

The resolution of http://trac.openlayers.org/ticket/2258 seems to have introduced a bug with the event-handling for markers. It seems that the Marker.events property is no longer being set when a marker is initialised.

As an example, you can see that http://openlayers.org/dev/examples/georss-markers.html no longer shows the markers, with an error message that marker.events is null.

- Ian


_______________________________________________
Trac mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/trac


----- End forwarded message -----

--
Christopher Schmidt
MetaCarta
_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
Andreas Hocevar-2

Re: [itr@pointcarbon.com: [OpenLayers-Trac] Error in Marker.js]

Reply Threaded More More options
Print post
Permalink
Hi,

reverted that change due to lack of a better solution.

Regards,
Andreas.

Christopher Schmidt wrote:

> Sent to the wrong list.
>
> ----- Forwarded message from Ian Trotter <[hidden email]> -----
>
> From: Ian Trotter <[hidden email]>
> To: "[hidden email]" <[hidden email]>
> Date: Mon, 26 Oct 2009 17:31:12 +0100
> Subject: [OpenLayers-Trac] Error in Marker.js
> Reply-To: [hidden email]
>
> Hi,
>
> The resolution of http://trac.openlayers.org/ticket/2258 seems to have introduced a bug with the event-handling for markers. It seems that the Marker.events property is no longer being set when a marker is initialised.
>
> As an example, you can see that http://openlayers.org/dev/examples/georss-markers.html no longer shows the markers, with an error message that marker.events is null.
>
> - Ian
>
>
> _______________________________________________
> Trac mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/trac
>
>
> ----- End forwarded message -----
>
>  


--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev
avlee

Re: [itr@pointcarbon.com: [OpenLayers-Trac] Error in Marker.js]

Reply Threaded More More options
Print post
Permalink
If attach events to the marker element really can cause performance problems, we can create the events object in the marker's constructor without attach the events to the DOM element, and than attach the events to the DOM element in the draw method.

initialize: function(lonlat, icon) {
        ....

        this.events = new OpenLayers.Events(this, null, null);
    },

draw: function(px) {
        var div = this.icon.draw(px);
       
        this.events.attachToElement(div);
       
        return div;
    },

BTW: May be need allow events to fall through, otherwise, the map element can not capture the mouseup event when using the box handler and release mouse on the marker element.

Li XinGang
EMail: [hidden email]
Blog:   avlee.cnblogs.com
Site:    www.mapboost.org


On Tue, Oct 27, 2009 at 4:42 AM, Andreas Hocevar <[hidden email]> wrote:
Hi,

reverted that change due to lack of a better solution.

Regards,
Andreas.

Christopher Schmidt wrote:
> Sent to the wrong list.
>
> ----- Forwarded message from Ian Trotter <[hidden email]> -----
>
> From: Ian Trotter <[hidden email]>
> To: "[hidden email]" <[hidden email]>
> Date: Mon, 26 Oct 2009 17:31:12 +0100
> Subject: [OpenLayers-Trac] Error in Marker.js
> Reply-To: [hidden email]
>
> Hi,
>
> The resolution of http://trac.openlayers.org/ticket/2258 seems to have introduced a bug with the event-handling for markers. It seems that the Marker.events property is no longer being set when a marker is initialised.
>
> As an example, you can see that http://openlayers.org/dev/examples/georss-markers.html no longer shows the markers, with an error message that marker.events is null.
>
> - Ian
>
>
> _______________________________________________
> Trac mailing list
> [hidden email]
> http://openlayers.org/mailman/listinfo/trac
>
>
> ----- End forwarded message -----
>
>


--
Andreas Hocevar
OpenGeo - http://opengeo.org/
Expert service straight from the developers.

_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev


_______________________________________________
Dev mailing list
[hidden email]
http://openlayers.org/mailman/listinfo/dev