PageRenderTime 38ms CodeModel.GetById 13ms RepoModel.GetById 0ms app.codeStats 0ms

/tests/com/google/caja/apitaming/maps/overlay-symbol-dashed.html

http://google-caja.googlecode.com/
HTML | 53 lines | 47 code | 6 blank | 0 comment | 0 complexity | 1e31d5d02093ebb54086ccbddc67f5ff MD5 | raw file
Possible License(s): BSD-2-Clause, AGPL-3.0, BSD-3-Clause, CPL-1.0, GPL-2.0, GPL-3.0, Apache-2.0, MPL-2.0-no-copyleft-exception
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
  5. <meta charset="utf-8">
  6. <title>Google Maps JavaScript API v3 Example: Symbols on a Polyline</title>
  7. <link href="standard.css" rel="stylesheet">
  8. <script src="https://www.google.com/jsapi"></script>
  9. <script>
  10. function initialize() {
  11. var myLatLng = new google.maps.LatLng(20.291, 153.027);
  12. var mapOptions = {
  13. zoom: 6,
  14. center: myLatLng,
  15. mapTypeId: google.maps.MapTypeId.TERRAIN
  16. };
  17. var map = new google.maps.Map(document.getElementById('map_canvas'), mapOptions);
  18. var lineCoordinates = [
  19. new google.maps.LatLng(22.291, 153.027),
  20. new google.maps.LatLng(18.291, 153.027)
  21. ];
  22. var lineSymbol = {
  23. path: 'M 0,-1 0,1',
  24. strokeOpacity: 1,
  25. scale: 4
  26. };
  27. var line = new google.maps.Polyline({
  28. path: lineCoordinates,
  29. strokeOpacity: 0,
  30. icons: [{
  31. icon: lineSymbol,
  32. offset: '0',
  33. repeat: '20px'
  34. }],
  35. map: map
  36. });
  37. }
  38. google.load('maps', '3.0', {
  39. callback: initialize,
  40. other_params: 'sensor=false',
  41. });
  42. </script>
  43. </head>
  44. <body>
  45. <div id="map_canvas" style="height:300px; width: 300px"></div>
  46. </body>
  47. </html>