Mobilize the canvas hit detection exmample.
git-svn-id: http://svn.openlayers.org/trunk/openlayers@11887 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -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>
|
||||
@@ -14,6 +16,11 @@
|
||||
</p>
|
||||
<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.
|
||||
|
||||
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user