map.html 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="utf-8">
  5. <title>JSDoc: directive: map</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: map</h1>
  17. <section>
  18. <header>
  19. <h2>
  20. map
  21. </h2>
  22. </header>
  23. <article>
  24. <div class="container-overview">
  25. <dt>
  26. <a href="map.js.html#line1" class="name-link"><h4 class="name" id="map"><span class="type-signature"></span>map<span class="signature">(geo-fallback-center, init-event, &lt;MapOption>, &lt;MapEvent>)</span><span class="type-signature"></span></h4></a>
  27. </dt>
  28. <dd>
  29. <div class="description">
  30. <p>Implementation of <a href="MapController.html"><code>MapController</code></a>
  31. Initialize a Google map within a <code>&lt;div&gt;</code> tag with given options and register events
  32. It accepts children directives; marker, shape, or marker-clusterer</p>
  33. <p> It initialize map, children tags, then emits message as soon as the action is done
  34. The message emitted from this directive is;
  35. . mapInitialized</p>
  36. <p> Restrict To:
  37. 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>geo-fallback-center</code></td>
  51. <td class="type">
  52. <span class="param-type">Array</span>
  53. </td>
  54. <td class="description last"><p>The center of map incase geolocation failed. i.e. [0,0]</p></td>
  55. </tr>
  56. <tr>
  57. <td class="name"><code>init-event</code></td>
  58. <td class="type">
  59. <span class="param-type">String</span>
  60. </td>
  61. <td class="description last"><p>The name of event to initialize this map.
  62. If this option is given, the map won't be initialized until the event is received.
  63. To invoke the event, use $scope.$emit or $scope.$broacast.
  64. i.e. <map init-event="init-map" ng-click="$emit('init-map')" center=... ></map></p></td>
  65. </tr>
  66. <tr>
  67. <td class="name"><code>&lt;MapOption></code></td>
  68. <td class="type">
  69. <span class="param-type">String</span>
  70. </td>
  71. <td class="description last"><p>Any Google map options,
  72. https://developers.google.com/maps/documentation/javascript/reference?csw=1#MapOptions</p></td>
  73. </tr>
  74. <tr>
  75. <td class="name"><code>&lt;MapEvent></code></td>
  76. <td class="type">
  77. <span class="param-type">String</span>
  78. </td>
  79. <td class="description last"><p>Any Google map events,
  80. https://rawgit.com/allenhwkim/angularjs-google-maps/master/build/map_events.html</p></td>
  81. </tr>
  82. </tbody>
  83. </table>
  84. <dl class="details">
  85. <dt class="tag-source">Source:</dt>
  86. <dd class="tag-source"><ul class="dummy"><li>
  87. <a href="map.js.html">directives/map.js</a>, <a href="map.js.html#line1">line 1</a>
  88. </li></ul></dd>
  89. </dl>
  90. <h5>Requires:</h5>
  91. <ul>
  92. <li>module:Attr2Options</li>
  93. </ul>
  94. <h5>Example</h5>
  95. <pre class="prettyprint"><code>Usage:
  96. &lt;map MAP_OPTIONS_OR_MAP_EVENTS ..>
  97. ... Any children directives
  98. &lt;/map>
  99. Example:
  100. &lt;map center="[40.74, -74.18]" on-click="doThat()">
  101. &lt;/map>
  102. &lt;map geo-fallback-center="[40.74, -74.18]">
  103. &lt;/map></code></pre>
  104. </dd>
  105. </div>
  106. <h3 class="subsection-title">Requires</h3>
  107. <ul>
  108. <li>module:Attr2Options</li>
  109. </ul>
  110. <h3 class="subsection-title">Methods</h3>
  111. <dl>
  112. <dt>
  113. <a href="map.js.html#line64" class="name-link"><h4 class="name" id="link"><span class="type-signature">(static) </span>link<span class="signature">(scope, element, attrs)</span><span class="type-signature"></span></h4></a>
  114. </dt>
  115. <dd>
  116. <div class="description">
  117. <p>Initialize map and events</p>
  118. </div>
  119. <h5>Parameters:</h5>
  120. <table class="params">
  121. <thead>
  122. <tr>
  123. <th>Name</th>
  124. <th>Type</th>
  125. <th class="last">Description</th>
  126. </tr>
  127. </thead>
  128. <tbody>
  129. <tr>
  130. <td class="name"><code>scope</code></td>
  131. <td class="type">
  132. <span class="param-type">$scope</span>
  133. </td>
  134. <td class="description last"></td>
  135. </tr>
  136. <tr>
  137. <td class="name"><code>element</code></td>
  138. <td class="type">
  139. <span class="param-type">angular.element</span>
  140. </td>
  141. <td class="description last"></td>
  142. </tr>
  143. <tr>
  144. <td class="name"><code>attrs</code></td>
  145. <td class="type">
  146. <span class="param-type">Hash</span>
  147. </td>
  148. <td class="description last"></td>
  149. </tr>
  150. </tbody>
  151. </table>
  152. <dl class="details">
  153. <dt class="tag-source">Source:</dt>
  154. <dd class="tag-source"><ul class="dummy"><li>
  155. <a href="map.js.html">directives/map.js</a>, <a href="map.js.html#line64">line 64</a>
  156. </li></ul></dd>
  157. </dl>
  158. </dd>
  159. </dl>
  160. </article>
  161. </section>
  162. </div>
  163. <nav>
  164. <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>
  165. </nav>
  166. <br clear="both">
  167. <footer>
  168. Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.3.0-alpha9</a>
  169. and <a href="https://github.com/allenhwkim/angular-jsdoc">angular-jsdoc</a>
  170. </footer>
  171. <script> prettyPrint(); </script>
  172. <script src="scripts/linenumber.js"> </script>
  173. <script>
  174. var href=window.location.href.match(/\/([^\/]+$)/)[1];
  175. document.querySelector("nav a[href='"+href+"']").scrollIntoView(true);
  176. if (window.location.hash == "")
  177. document.querySelector("body").scrollIntoView(true);
  178. </script>
  179. </body>
  180. </html>