changes to WMSGetFeatureInfo so requests can be sent on click,
rightclick, and dblclick, r=bartvde (closes #2528) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10117 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -23,7 +23,7 @@
|
||||
* - <OpenLayers.Control>
|
||||
*/
|
||||
OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
|
||||
|
||||
/**
|
||||
* APIProperty: hover
|
||||
* {Boolean} Send GetFeatureInfo requests when mouse stops moving.
|
||||
@@ -46,6 +46,13 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
* requests.
|
||||
*/
|
||||
maxFeatures: 10,
|
||||
|
||||
/** APIProperty: clickCallback
|
||||
* {String} The click callback to register in the
|
||||
* {<OpenLayers.Handler.Click>} object created when the hover
|
||||
* option is set to false. Default is "click".
|
||||
*/
|
||||
clickCallback: "click",
|
||||
|
||||
/**
|
||||
* Property: layers
|
||||
@@ -192,8 +199,10 @@ OpenLayers.Control.WMSGetFeatureInfo = OpenLayers.Class(OpenLayers.Control, {
|
||||
'delay': 250
|
||||
}));
|
||||
} else {
|
||||
this.handler = new OpenLayers.Handler.Click(this,
|
||||
{click: this.getInfoForClick}, this.handlerOptions.click || {});
|
||||
var callbacks = {};
|
||||
callbacks[this.clickCallback] = this.getInfoForClick;
|
||||
this.handler = new OpenLayers.Handler.Click(
|
||||
this, callbacks, this.handlerOptions.click || {});
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
Reference in New Issue
Block a user