[OpenLayers-Commits] r11887 - trunk/openlayers/examples
commits-20090109 at openlayers.org
commits-20090109 at openlayers.org
Thu Apr 7 15:15:46 EDT 2011
Author: tschaub
Date: 2011-04-07 12:15:45 -0700 (Thu, 07 Apr 2011)
New Revision: 11887
Modified:
trunk/openlayers/examples/canvas-hit-detection.html
trunk/openlayers/examples/canvas-hit-detection.js
Log:
Mobilize the canvas hit detection exmample.
Modified: trunk/openlayers/examples/canvas-hit-detection.html
===================================================================
--- trunk/openlayers/examples/canvas-hit-detection.html 2011-04-07 18:45:31 UTC (rev 11886)
+++ trunk/openlayers/examples/canvas-hit-detection.html 2011-04-07 19:15:45 UTC (rev 11887)
@@ -2,8 +2,10 @@
<html>
<head>
<title>OpenLayers Canvas Hit Detection Example</title>
+ <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+ <meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0;">
+ <meta name="apple-mobile-web-app-capable" content="yes">
<link rel="stylesheet" href="../theme/default/style.css" type="text/css">
- <link rel="stylesheet" href="../theme/default/google.css" type="text/css">
<link rel="stylesheet" href="style.css" type="text/css">
<script src="../lib/OpenLayers.js"></script>
</head>
@@ -15,6 +17,11 @@
<div id="map" class="smallmap"></div>
<div id="docs">
<p>
+ 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.
+ </p>
+ <p>
View the <a href="canvas-hit-detection.js" target="_blank">canvas-hit-detection.js</a>
source to see how this is done.
</p>
Modified: trunk/openlayers/examples/canvas-hit-detection.js
===================================================================
--- trunk/openlayers/examples/canvas-hit-detection.js 2011-04-07 18:45:31 UTC (rev 11886)
+++ trunk/openlayers/examples/canvas-hit-detection.js 2011-04-07 19:15:45 UTC (rev 11887)
@@ -25,7 +25,7 @@
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 @@
zoom: 0
});
-var select = new OpenLayers.Control.SelectFeature(layer, {hover: true});
+var select = new OpenLayers.Control.SelectFeature(layer);
map.addControl(select);
select.activate();
More information about the Commits
mailing list