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>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<title>OpenLayers Canvas Hit Detection Example</title>
|
<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/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">
|
<link rel="stylesheet" href="style.css" type="text/css">
|
||||||
<script src="../lib/OpenLayers.js"></script>
|
<script src="../lib/OpenLayers.js"></script>
|
||||||
</head>
|
</head>
|
||||||
@@ -14,6 +16,11 @@
|
|||||||
</p>
|
</p>
|
||||||
<div id="map" class="smallmap"></div>
|
<div id="map" class="smallmap"></div>
|
||||||
<div id="docs">
|
<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>
|
<p>
|
||||||
View the <a href="canvas-hit-detection.js" target="_blank">canvas-hit-detection.js</a>
|
View the <a href="canvas-hit-detection.js" target="_blank">canvas-hit-detection.js</a>
|
||||||
source to see how this is done.
|
source to see how this is done.
|
||||||
|
|||||||
@@ -25,7 +25,7 @@ var Rule = OpenLayers.Rule;
|
|||||||
var Filter = OpenLayers.Filter;
|
var Filter = OpenLayers.Filter;
|
||||||
var style = new OpenLayers.Style({
|
var style = new OpenLayers.Style({
|
||||||
pointRadius: 10,
|
pointRadius: 10,
|
||||||
strokeWidth: 2,
|
strokeWidth: 3,
|
||||||
strokeOpacity: 0.7,
|
strokeOpacity: 0.7,
|
||||||
strokeColor: "navy",
|
strokeColor: "navy",
|
||||||
fillColor: "#ffcc66",
|
fillColor: "#ffcc66",
|
||||||
@@ -83,6 +83,6 @@ var map = new OpenLayers.Map({
|
|||||||
zoom: 0
|
zoom: 0
|
||||||
});
|
});
|
||||||
|
|
||||||
var select = new OpenLayers.Control.SelectFeature(layer, {hover: true});
|
var select = new OpenLayers.Control.SelectFeature(layer);
|
||||||
map.addControl(select);
|
map.addControl(select);
|
||||||
select.activate();
|
select.activate();
|
||||||
|
|||||||
Reference in New Issue
Block a user