On Sun, Mar 16, 2008 at 2:40 PM, Eric Lemoine <[EMAIL PROTECTED]> wrote:
> On Sat, Mar 15, 2008 at 3:17 PM, Xin <[EMAIL PROTECTED]> wrote:
> > Ghastly. I get the same error.
> >
> > A hackaround.
> >
> > I have changed
> >
> > return this.multiple || this.handler.evt[this.multipleKey];
> >
> > to
> >
> > return this.multiple;
>
> I guess I understand the problem. In the regular case clickFeature is
> called as a result of a DOM event, this causes this.handler.evt to be
> set. In your case: no event so this.handler.evt isn't set.
Can you give the attached patch a try.
If the patch works for you and you care about this stuff, feel free to
open a ticket [*] and attach my patch to the ticket.
Thanks,
[*] http://trac.openlayers.org/wiki/FilingTickets
--
Eric
Index: lib/OpenLayers/Control/SelectFeature.js
===================================================================
--- lib/OpenLayers/Control/SelectFeature.js (revision 6534)
+++ lib/OpenLayers/Control/SelectFeature.js (working copy)
@@ -187,7 +187,7 @@
* {Boolean} Allow for multiple selected features.
*/
multipleSelect: function() {
- return this.multiple || this.handler.evt[this.multipleKey];
+ return this.multiple || (this.handler.evt && this.handler.evt[this.multipleKey]);
},
/**
@@ -199,7 +199,7 @@
* {Boolean} Toggle the selected state of a feature.
*/
toggleSelect: function() {
- return this.toggle || this.handler.evt[this.toggleKey];
+ return this.toggle || (this.handler.evt && this.handler.evt[this.toggleKey]);
},
/**
_______________________________________________
Users mailing list
[email protected]
http://openlayers.org/mailman/listinfo/users