summaryrefslogtreecommitdiff
path: root/libs/js/jquery-geo-1.0a4/docs/geomap/drawStyle.html
blob: ebc6df7de8e4b0315a90081c06d2c34a072ba98f (plain)
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: &quot;8px&quot;,
  color: &quot;#7f0000&quot;,
  fillOpacity: .2,
  height: &quot;8px&quot;,
  opacity: 1,
  strokeOpacity: 1,
  strokeWidth: &quot;2px&quot;,
  visibility: &quot;visible&quot;,
  width: &quot;8px&quot;
}</code></pre>
          </td>
        </tr>
        <tr>
          <th>init</th>
          <td><pre><code>$( <i>map selector</i> ).geomap( { drawStyle: { color: &quot;green&quot; } } );</code></pre></td>
        </tr>
        <tr>
          <th>get</th>
          <td><pre><code>var drawStyle = $( <i>map selector</i> ).geomap( &quot;option&quot;, &quot;drawStyle&quot; );</code></pre></td>
        </tr>
        <tr>
          <th>set</th>
          <td><pre><code>$( <i>map selector</i> ).geomap( &quot;option&quot;, &quot;drawStyle&quot;, { strokeWidth: &quot;4px&quot; } );</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>