marker-symbol-custom.html 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. <!DOCTYPE html>
  2. <html ng-app="ngMap">
  3. <head>
  4. <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
  5. <script src="https://maps.google.com/maps/api/js?sensor=false"></script>
  6. <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.25/angular.min.js"></script>
  7. <script src="scripts/app.js"></script>
  8. <!-- build:js scripts/ng-map.min.js -->
  9. <script src="../app/scripts/app.js"></script>
  10. <script src="../app/scripts/directives/map_controller.js"></script>
  11. <script src="../app/scripts/directives/map.js"></script>
  12. <script src="../app/scripts/directives/marker.js"></script>
  13. <script src="../app/scripts/directives/shape.js"></script>
  14. <script src="../app/scripts/services/geo_coder.js"></script>
  15. <script src="../app/scripts/services/navigator_geolocation.js"></script>
  16. <script src="../app/scripts/services/attr2_options.js"></script>
  17. <!-- endbuild -->
  18. </head>
  19. <body>
  20. Marker Symbol Custom<br/>
  21. This example uses SVG path notation to add a vector-based symbol
  22. as the icon for a marker. The resulting icon is a star-shaped symbol
  23. with a pale yellow fill and a thick yellow border.
  24. <map center="-25.363882,131.044922" zoom="4">
  25. <marker position="-25.363882,131.044922"
  26. icon="{
  27. path: 'M 125,5 155,90 245,90 175,145 200,230 125,180 50,230 75,145 5,90 95,90 z',
  28. fillColor: 'yellow',
  29. fillOpacity: 0.8,
  30. scale: 1,
  31. strokeColor: 'gold',
  32. strokeWeight: 14
  33. }"
  34. dragglele="true"></marker>
  35. </map>
  36. </body>
  37. </html>