From 32f70d06c297f55f8077bf0c753cbf6083a99b81 Mon Sep 17 00:00:00 2001
From: Tim Schaub Feature Hit Detection with Canvas
+ Click on the features above to see them selected. This example + uses the Canvas renderer so it only works on browsers where + canvas is supported. +
View the canvas-hit-detection.js source to see how this is done. diff --git a/examples/canvas-hit-detection.js b/examples/canvas-hit-detection.js index b45562eab0..abc6897381 100644 --- a/examples/canvas-hit-detection.js +++ b/examples/canvas-hit-detection.js @@ -25,7 +25,7 @@ var Rule = OpenLayers.Rule; var Filter = OpenLayers.Filter; var style = new OpenLayers.Style({ pointRadius: 10, - strokeWidth: 2, + strokeWidth: 3, strokeOpacity: 0.7, strokeColor: "navy", fillColor: "#ffcc66", @@ -83,6 +83,6 @@ var map = new OpenLayers.Map({ zoom: 0 }); -var select = new OpenLayers.Control.SelectFeature(layer, {hover: true}); +var select = new OpenLayers.Control.SelectFeature(layer); map.addControl(select); select.activate();