shape.html 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: directive: shape</title>
  6. <script src="scripts/prettify/prettify.js"> </script>
  7. <script src="scripts/prettify/lang-css.js"> </script>
  8. <!--[if lt IE 9]>
  9. <script src="//html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  10. <![endif]-->
  11. <link type="text/css" rel="stylesheet" href="styles/prettify-tomorrow.css">
  12. <link type="text/css" rel="stylesheet" href="styles/jsdoc-default.css">
  13. </head>
  14. <body>
  15. <div id="main">
  16. <h1 class="page-title">directive: shape</h1>
  17. <section>
  18. <header>
  19. <h2>
  20. shape
  21. </h2>
  22. </header>
  23. <article>
  24. <div class="container-overview">
  25. <dt>
  26. <a href="shape.js.html#line1" class="name-link"><h4 class="name" id="shape"><span class="type-signature"></span>shape<span class="signature">(centered, &lt;OPTIONS>, &lt;MapEvent>)</span><span class="type-signature"></span></h4></a>
  27. </dt>
  28. <dd>
  29. <div class="description">
  30. <p>Initialize a Google map shape in map with given options and register events<br> The shapes are:
  31. . circle
  32. . polygon
  33. . polyline
  34. . rectangle
  35. . groundOverlay(or image)</p>
  36. <p> Requires: map directive</p>
  37. <p> Restrict To: Element</p>
  38. </div>
  39. <h5>Parameters:</h5>
  40. <table class="params">
  41. <thead>
  42. <tr>
  43. <th>Name</th>
  44. <th>Type</th>
  45. <th class="last">Description</th>
  46. </tr>
  47. </thead>
  48. <tbody>
  49. <tr>
  50. <td class="name"><code>centered</code></td>
  51. <td class="type">
  52. <span class="param-type">Boolean</span>
  53. </td>
  54. <td class="description last"><p>if set, map will be centered with this marker</p></td>
  55. </tr>
  56. <tr>
  57. <td class="name"><code>&lt;OPTIONS></code></td>
  58. <td class="type">
  59. <span class="param-type">String</span>
  60. </td>
  61. <td class="description last"><p>For circle, <a href="https://developers.google.com/maps/documentation/javascript/reference#CircleOptions">any circle options</a><br> For polygon, <a href="https://developers.google.com/maps/documentation/javascript/reference#PolygonOptions">any polygon options</a><br> For polyline, <a href="https://developers.google.com/maps/documentation/javascript/reference#PolylineOptions">any polyline options</a><br> For rectangle, <a href="https://developers.google.com/maps/documentation/javascript/reference#RectangleOptions">any rectangle options</a><br> For image, <a href="https://developers.google.com/maps/documentation/javascript/reference#GroundOverlayOptions">any groundOverlay options</a></p></td>
  62. </tr>
  63. <tr>
  64. <td class="name"><code>&lt;MapEvent></code></td>
  65. <td class="type">
  66. <span class="param-type">String</span>
  67. </td>
  68. <td class="description last"><p>Any Shape events, https://developers.google.com/maps/documentation/javascript/reference</p></td>
  69. </tr>
  70. </tbody>
  71. </table>
  72. <dl class="details">
  73. <dt class="tag-source">Source:</dt>
  74. <dd class="tag-source"><ul class="dummy"><li>
  75. <a href="shape.js.html">directives/shape.js</a>, <a href="shape.js.html#line1">line 1</a>
  76. </li></ul></dd>
  77. </dl>
  78. <h5>Requires:</h5>
  79. <ul>
  80. <li>module:Attr2Options</li>
  81. </ul>
  82. <h5>Example</h5>
  83. <pre class="prettyprint"><code>Usage:
  84. &lt;map MAP_ATTRIBUTES>
  85. &lt;shape name=SHAPE_NAME ANY_SHAPE_OPTIONS ANY_SHAPE_EVENTS">&lt;/MARKER>
  86. &lt;/map>
  87. Example:
  88. &lt;map zoom="11" center="[40.74, -74.18]">
  89. &lt;shape id="polyline" name="polyline" geodesic="true" stroke-color="#FF0000" stroke-opacity="1.0" stroke-weight="2"
  90. path="[[40.74,-74.18],[40.64,-74.10],[40.54,-74.05],[40.44,-74]]" >&lt;/shape>
  91. &lt;/map>
  92. &lt;map zoom="11" center="[40.74, -74.18]">
  93. &lt;shape id="polygon" name="polygon" stroke-color="#FF0000" stroke-opacity="1.0" stroke-weight="2"
  94. paths="[[40.74,-74.18],[40.64,-74.18],[40.84,-74.08],[40.74,-74.18]]" >&lt;/shape>
  95. &lt;/map>
  96. &lt;map zoom="11" center="[40.74, -74.18]">
  97. &lt;shape id="rectangle" name="rectangle" stroke-color='#FF0000' stroke-opacity="0.8" stroke-weight="2"
  98. bounds="[[40.74,-74.18], [40.78,-74.14]]" editable="true" >&lt;/shape>
  99. &lt;/map>
  100. &lt;map zoom="11" center="[40.74, -74.18]">
  101. &lt;shape id="circle" name="circle" stroke-color='#FF0000' stroke-opacity="0.8"stroke-weight="2"
  102. center="[40.70,-74.14]" radius="4000" editable="true" >&lt;/shape>
  103. &lt;/map>
  104. &lt;map zoom="11" center="[40.74, -74.18]">
  105. &lt;shape id="image" name="image" url="https://www.lib.utexas.edu/maps/historical/newark_nj_1922.jpg"
  106. bounds="[[40.71,-74.22],[40.77,-74.12]]" opacity="0.7" clickable="true" >&lt;/shape>
  107. &lt;/map>
  108. For full-working example, please visit
  109. [shape example](https://rawgit.com/allenhwkim/angularjs-google-maps/master/build/shape.html)</code></pre>
  110. </dd>
  111. </div>
  112. <h3 class="subsection-title">Requires</h3>
  113. <ul>
  114. <li>module:Attr2Options</li>
  115. </ul>
  116. </article>
  117. </section>
  118. </div>
  119. <nav>
  120. <h2><a href="index.html">Index</a></h2><h3>service</h3><ul><li><a href="Attr2Options.html">Attr2Options</a></li><li><a href="GeoCoder.html">GeoCoder</a></li><li><a href="NavigatorGeolocation.html">NavigatorGeolocation</a></li><li><a href="StreetView.html">StreetView</a></li></ul><h3>directive</h3><ul><li><a href="bicycling-layer.html">bicycling-layer</a></li><li><a href="cloud-layer.html">cloud-layer</a></li><li><a href="custom-control.html">custom-control</a></li><li><a href="drawing-manager.html">drawing-manager</a></li><li><a href="dynamic-maps-engine-layer.html">dynamic-maps-engine-layer</a></li><li><a href="fusion-tables-layer.html">fusion-tables-layer</a></li><li><a href="heatmap-layer.html">heatmap-layer</a></li><li><a href="info-window.html">info-window</a></li><li><a href="kml-layer.html">kml-layer</a></li><li><a href="lazy-load.html">lazy-load</a></li><li><a href="map.html">map</a></li><li><a href="map-data.html">map-data</a></li><li><a href="map-type.html">map-type</a></li><li><a href="MapController.html">MapController</a></li><li><a href="maps-engine-layer.html">maps-engine-layer</a></li><li><a href="marker.html">marker</a></li><li><a href="overlay-map-type.html">overlay-map-type</a></li><li><a href="shape.html">shape</a></li><li><a href="traffic-layer.html">traffic-layer</a></li><li><a href="transit-layer.html">transit-layer</a></li><li><a href="weather-layer.html">weather-layer</a></li></ul>
  121. </nav>
  122. <br clear="both">
  123. <footer>
  124. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
  125. and <a href="https://github.com/allenhwkim/angular-jsdoc">angular-jsdoc</a>
  126. </footer>
  127. <script> prettyPrint(); </script>
  128. <script src="scripts/linenumber.js"> </script>
  129. <script>
  130. var href=window.location.href.match(/\/([^\/]+$)/)[1];
  131. document.querySelector("nav a[href='"+href+"']").scrollIntoView(true);
  132. if (window.location.hash == "")
  133. document.querySelector("body").scrollIntoView(true);
  134. </script>
  135. </body>
  136. </html>