Newer
Older
www-root / osm / olEx10.html
@Hayashi.yuu Hayashi.yuu on 3 May 2017 3 KB append 'osm' folder
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <html>
  3. <head>
  4. <meta name="viewport" content="initial-scale=1.0, user-scalable=no">
  5. <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  6. <meta http-equiv="content-style-type" content="text/css">
  7. <meta http-equiv="content-script-type" content="text/javascript">
  8. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  9. <link rel="stylesheet" href="http://openlayers.org/en/v3.7.0/css/ol.css" type="text/css">
  10. <script src="http://openlayers.org/en/v3.7.0/build/ol.js" type="text/javascript"></script>
  11. <style type="text/css">
  12. div.fill {width: 100%; height: 100%;}
  13.  
  14. body {padding: 0; margin: 0;}
  15. html, body, #map {height: 100%; width: 100%;}
  16. .ol-attribution {
  17. padding: 3px; position: absolute; background-color:#ffffff;
  18. background-color:rgba(230,255,255,0.7);
  19. right: 3px; bottom:5px; font-size:12px;
  20. }
  21. .ol-attribution ul { padding: 0px; line-height: 14px; margin: 0px; }
  22. .ol-attribution li { line-height: inherit; display: inline; list-style: none outside none; }
  23.  
  24. .ol-zoom .ol-zoom-out { margin-top: 202px; }
  25. .ol-zoomslider { background-color: transparent; top: 2.3em; }
  26. .ol-touch .ol-zoom .ol-zoom-out { margin-top: 212px; }
  27. .ol-touch .ol-zoomslider { top: 2.75em; }
  28.  
  29. .ol-popup { display: none; position: absolute; background-color: white;
  30. -moz-box-shadow: 0 1px 4px rgba(0,0,0,0.2);
  31. -webkit-filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
  32. filter: drop-shadow(0 1px 4px rgba(0,0,0,0.2));
  33. padding: 5px; border-radius: 10px; border: 1px solid #cccccc; bottom: 24px; left: -51px; }
  34. .ol-popup:after, .ol-popup:before { top: 100%; border: solid transparent; content: " ";
  35. height: 0; width: 0; position: absolute; pointer-events: none; }
  36. .ol-popup:after { border-top-color: white; border-width: 10px; left: 48px; margin-left: -10px; }
  37. .ol-popup:before { border-top-color: #cccccc; border-width: 11px; left: 48px; margin-left: -11px; }
  38. .ol-popup-closer { text-decoration: none; position: absolute; top: 2px; right: 8px; }
  39. .ol-popup-closer:after { content: " ✖ "; }
  40. </style>
  41. <title>OpenLayers 3 Example: KML Layer Popup</title>
  42. <script src="ol3ex10.js" type="text/javascript"></script>
  43. <script src="../jquery.min.js" type="text/javascript"></script>
  44. </head>
  45.  
  46. <body onload="init_map()">
  47. <div id="map_canvas" style="width: 100%; height: 97%; position:absolute; top:25px; left:0px; font-size:100%;">
  48. <div id="popup" class="ol-popup">
  49. <a href="#" id="popup-closer" class="ol-popup-closer"></a>
  50. <div id="popup-content"></div>
  51. </div>
  52. </div>
  53.  
  54. <div style="font-size:85%"> 不透明度:<a title="decrease opacity" href="javascript: directSetOpacity(0.1);">0.1</a> 
  55. <a title="decrease opacity" href="javascript: directSetOpacity(0.5);">0.5</a> 
  56. <a title="decrease opacity" href="javascript: directSetOpacity(1.0); ">1.0</a>  
  57. <b>&nbsp;不透明度・0.2ずつ変更:
  58. <a title="decrease opacity" href="javascript: changeOpacity(-0.2);">&lt;&lt;</a>
  59. <span id="opacity_control">0.5</span>
  60. <a title="increase opacity" href="javascript: changeOpacity(0.2);">&gt;&gt;</a></b>
  61. </div>
  62.  
  63. </body>
  64. </html>