maps.html 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. <!-- start: PAGE TITLE -->
  2. <section id="page-title">
  3. <div class="row">
  4. <div class="col-sm-8">
  5. <h1 class="mainTitle" translate="sidebar.nav.maps.MAIN">{{ mainTitle }}</h1>
  6. <span class="mainDescription">The Simplest Way of Showing A Map</span>
  7. </div>
  8. <div ncy-breadcrumb></div>
  9. </div>
  10. </section>
  11. <!-- end: PAGE TITLE -->
  12. <!-- start: BASIC MAP -->
  13. <div class="container-fluid container-fullw bg-white">
  14. <div class="row">
  15. <div class="col-sm-12">
  16. <h5 class="over-title margin-bottom-15">Basic <span class="text-bold">Map</span></h5>
  17. <p>
  18. Everything in tag and attributes.
  19. </p>
  20. <map center="-34.397, 150.644" zoom="8"></map>
  21. </div>
  22. </div>
  23. </div>
  24. <!-- end: BASIC MAP -->
  25. <!-- start: PIXEL AND TILE COORDINATES -->
  26. <div class="container-fluid container-fullw">
  27. <div class="row">
  28. <div class="col-sm-6">
  29. <h5 class="over-title margin-bottom-15">Showing <span class="text-bold">Pixel And Tile Coordinates</span></h5>
  30. <p>
  31. Showing static coordinates of Chicago
  32. </p>
  33. <!-- /// controller: 'MapCoordinatesCtrl' - localtion: assets/js/controllers/mapsCtrl.js /// -->
  34. <div ng-controller="MapCoordinatesCtrl">
  35. <baidu-map options="mapOptions" style="width: 500px; height: 500px;display: block;"></baidu-map>
  36. <map center="41.850033,-87.6500523" zoom="3">
  37. <info-window id="1" position="41.850033,-87.6500523" visible="true">
  38. <div ng-non-bindable="">
  39. Chicago, IL
  40. <br>
  41. LatLng: {{chicago.lat()}}, {{chicago.lng()}},
  42. <br>
  43. World Coordinate: {{worldCoordinate.x}}, {{worldCoordinate.y}},
  44. <br>
  45. Pixel Coordinate: {{pixelCoordinate.x}}, {{pixelCoordinate.y}},
  46. <br>
  47. Tile Coordinate: {{tileCoordinate.x}}, {{tileCoordinate.y}} at Zoom Level {{map.getZoom()}}
  48. </div>
  49. </info-window>
  50. </map>
  51. </div>
  52. </div>
  53. <div class="col-sm-6">
  54. <h5 class="over-title margin-bottom-15">Simple <span class="text-bold">Click Event</span></h5>
  55. <p>
  56. Click the marker to zoom and drag and watch it comes back after 3 seconds.
  57. </p>
  58. <!-- /// controller: 'EventSimpleCtrl' - localtion: assets/js/controllers/mapsCtrl.js /// -->
  59. <div ng-controller="EventSimpleCtrl">
  60. <map zoom="4" center="-25.363882, 131.044922" on-center-changed="centerChanged()">
  61. <marker position="-25.363882, 131.044922" on-click="click()" title="Click to zoom"></marker>
  62. </map>
  63. </div>
  64. </div>
  65. </div>
  66. </div>
  67. <!-- end: PIXEL AND TILE COORDINATES -->
  68. <!-- start: UI EVENTS -->
  69. <div class="container-fluid container-fullw bg-white">
  70. <div class="row">
  71. <div class="col-sm-6">
  72. <h5 class="over-title margin-bottom-15">Assigning <span class="text-bold">arguments in UI events</span></h5>
  73. <p>
  74. When zoom level changed, the contents of infoWindow also updates.
  75. </p>
  76. <!-- /// controller: 'EventPropertiesCtrl' - localtion: assets/js/controllers/mapsCtrl.js /// -->
  77. <div ng-controller="EventPropertiesCtrl">
  78. <map zoom="4" center="-25.363882, 131.044922" on-zoom_changed="zoomChanged()">
  79. <info-window id="1" position="-25.363882, 131.044922" visible="true">
  80. <div ng-non-bindable="">
  81. Change the zoom level
  82. </div>
  83. </info-window>
  84. </map>
  85. </div>
  86. </div>
  87. <div class="col-sm-6">
  88. <h5 class="over-title margin-bottom-15">Adding <span class="text-bold">state to controls</span></h5>
  89. <p>
  90. Adds a control to the map that returns the user to the control's defined home
  91. </p>
  92. <!-- /// controller: 'ControlCustomStateCtrl' - localtion: assets/js/controllers/mapsCtrl.js /// -->
  93. <div class="ng-scope" ng-controller="ControlCustomStateCtrl">
  94. <map center="41.850033, -87.6500523" zoom="6" pan-control="true" pan-control-options="{position:'TOP_RIGHT'}" map-type-control="true" map-type-control-options="{style:'HORIZONTAL_BAR', position:'BOTTOM_CENTER'}" zoom-control="true" zoom-control-options="{style:'LARGE', position:'LEFT_CENTER'}" scale-control="true" street-view-control="true" street-view-control-options="{position:'LEFT_TOP'}">
  95. <custom-control id="go-home" position="TOP_RIGHT" index="1" on-click="goHome()">
  96. <a href class="btn btn-primary btn-xs margin-top-15 margin-right-5">
  97. Go Home
  98. </a>
  99. </custom-control>
  100. <custom-control id="set-home" position="TOP_RIGHT" index="1" on-click="setHome()">
  101. <a href class="btn btn-primary btn-xs margin-top-15 margin-right-5">
  102. Set Home
  103. </a>
  104. </custom-control>
  105. </map>
  106. </div>
  107. </div>
  108. </div>
  109. </div>
  110. <!-- end: UI EVENTS -->
  111. <!-- start: STYLED MAP -->
  112. <div class="container-fluid container-fullw">
  113. <div class="row">
  114. <div class="col-sm-6">
  115. <h5 class="over-title margin-bottom-15">Styled <span class="text-bold">Map</span></h5>
  116. <p>
  117. Styled maps allow you to customize the presentation of the standard Google base maps.
  118. </p>
  119. <map center="40.6743890, -73.9455" zoom="12" styles="[{stylers:[{hue:'#890000'},{visibility:'simplified'},{gamma:0.5},{weight:0.5}]},{elementType:'labels',stylers:[{visibility:'off'}]},{featureType:'water',stylers:[{color:'#890000'}]}]"></map>
  120. </div>
  121. <div class="col-sm-6">
  122. <h5 class="over-title margin-bottom-15">Simple <span class="text-bold">Marker</span></h5>
  123. <p>
  124. A marker identifies a location on a map. By default, a marker uses a standard image.
  125. </p>
  126. <map center="-25.363882,131.044922" zoom="4">
  127. <marker position="-25.363882,131.044922" title="Hello World!"></marker>
  128. </map>
  129. </div>
  130. </div>
  131. </div>
  132. <!-- end: STYLED MAP -->
  133. <!-- start: ICON MARKER -->
  134. <div class="container-fluid container-fullw bg-white">
  135. <div class="row">
  136. <div class="col-sm-6">
  137. <h5 class="over-title margin-bottom-15"><span class="text-bold">Icon</span></h5>
  138. <p>
  139. In the most basic case, an icon can simply indicate an image to use instead of the default Google Maps pushpin icon.
  140. </p>
  141. <map zoom="4" center="-33, 151">
  142. <marker position="-30.890542, 158.274856" icon="assets/images/plane.png"></marker>
  143. </map>
  144. </div>
  145. <div class="col-sm-6">
  146. <h5 class="over-title margin-bottom-15">Info <span class="text-bold">Windows</span></h5>
  147. <p>
  148. This example displays a marker at the center of Australia. When the user clicks the marker, an info window opens.
  149. </p>
  150. <map center="-25.363882,131.044922" zoom="4">
  151. <marker id="foo" position="-25.363882,131.044922" on-click="showInfoWindow(event, 'bar')"></marker>
  152. <info-window id="bar" max-width="300" visible-on-marker="foo">
  153. <div ng-non-bindable="">
  154. <div id="siteNotice"></div>
  155. <h1 id="firstHeading" class="firstHeading">Uluru</h1>
  156. <div id="bodyContent">
  157. <p>
  158. <b>Uluru</b>, also referred to as <b>Ayers Rock</b>, is a large sandstone rock formation in the southern part of the Northern Territory, central Australia.
  159. </p>
  160. <p>
  161. Attribution: Uluru,
  162. <a href="//en.wikipedia.org/w/index.php?title=Uluru&amp;oldid=297882194">
  163. http://en.wikipedia.org/w/index.php?title=Uluru
  164. </a>
  165. (last visited June 22, 2009).
  166. </p>
  167. </div>
  168. </div>
  169. </info-window>
  170. </map>
  171. </div>
  172. </div>
  173. </div>
  174. <!-- end: ICON MARKER -->
  175. <!-- start: MORE EXAMPLE -->
  176. <div class="container-fluid container-fullw bg-white">
  177. <div class="row">
  178. <div class="col-sm-12">
  179. <p class="text-small">More examples at <br><a href="http://ngmap.github.io" target="_blank">http://ngmap.github.io</a></p>
  180. </div>
  181. </div>
  182. </div>
  183. <!-- end: MORE EXAMPLE -->