1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
<!doctype html>
<html lang="en" class="no-js">
<head>
<meta charset="utf-8">
<title>drawStyle | geomap</title>
<meta name="description" content="geomap drawStyle option">
<meta name="author" content="Ryan Westphal">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet" href="../css/style.css?v=2">
<link rel="stylesheet" href="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.css" />
</head>
<body>
<div id="drawStyle" data-role="page">
<div data-role="header" data-theme="f">
<h1>drawStyle</h1>
</div>
<div data-role="content">
<table>
<tr>
<th>type</th>
<td>Object ( geomap style )</td>
</tr>
<tr>
<th>default</th>
<td><pre><code>{
borderRadius: "8px",
color: "#7f0000",
fillOpacity: .2,
height: "8px",
opacity: 1,
strokeOpacity: 1,
strokeWidth: "2px",
visibility: "visible",
width: "8px"
}</code></pre>
</td>
</tr>
<tr>
<th>init</th>
<td><pre><code>$( <i>map selector</i> ).geomap( { drawStyle: { color: "green" } } );</code></pre></td>
</tr>
<tr>
<th>get</th>
<td><pre><code>var drawStyle = $( <i>map selector</i> ).geomap( "option", "drawStyle" );</code></pre></td>
</tr>
<tr>
<th>set</th>
<td><pre><code>$( <i>map selector</i> ).geomap( "option", "drawStyle", { strokeWidth: "4px" } );</code></pre></td>
</tr>
</table>
<p>The drawStyle option retrieves or updates the style of incomplete lines and polygons <b>as they are being drawn</b>. This differs from the shapeStyle option which updates the style of shapes that you've appended to the map.</p>
<p>This option affects both the draw modes (drawPoint, drawLineString, and drawPolygon) and the measure modes (measureLength, and measureArea).</p>
<p>This option changes specific properties of the internal style object. If you init or set an incomplete style object, only the style properties you reference are updated.</p>
<p>Please see the style section at the bottom of the <a href="#" onclick="javascript:window.history.back();">geomap widget</a> page for more information about the style object.</p>
</div>
</div> <!-- end of #container -->
<script src="http://code.jquery.com/jquery-1.7.1.min.js"></script>
<script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>
<script src="../js/script.js"></script>
<script src="http://code.jquery.com/mobile/1.0/jquery.mobile-1.0.min.js"></script>
</body>
</html>
|