Guest User

Untitled

a guest
Jan 20th, 2020
97
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js" integrity="sha512-gZwIG9x3wUXg2hdXF6+rVkLF/0Vi9U8D2Ntg4Ga5I5BZpVkVxlJWbSQtXPSiUTtC0TjtGOmxa1AJPuV0CPthew==" crossorigin=""></script>
  6. <link href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css">
  7. </head>
  8. <body>
  9. <div id="map"></div>
  10. <script>
  11. var bounds = [[0, 0], [1000, 1421]];
  12. var map = L.map( "map", {
  13. minZoom: 0.5,
  14. maxZoom: 5,
  15. zoomSnap: 0.05,
  16. maxBounds: bounds,
  17. crs: L.CRS.Simple,
  18. attributionControl: false
  19. } );
  20.  
  21. var image = L.imageOverlay( "https://i.imgur.com/wxVyhEi.jpg", bounds ).addTo( map );
  22.  
  23. var svgElement = document.createElementNS( "http://www.w3.org/2000/svg", "svg" );
  24. svgElement.setAttribute( "xmlns", "http://www.w3.org/2000/svg" );
  25. svgElement.setAttribute( "viewBox", "0 0 1152 1024" );
  26. svgElement.setAttribute( "width", 1152 );
  27. svgElement.setAttribute( "height", 1024 );
  28. svgElement.innerHTML = '<title></title><g id="icomoon-ignore"></g><path fill="#000" d="M160 704q66 0 113 47t47 113-47 113-113 47-113-47-47-113 47-113 113-47zM576 320q-66 0-113-47t-47-113 47-113 113-47 113 47 47 113-47 113-113 47zM512 496q0 66-47 113t-113 47-113-47-47-113 47-113 113-47 113 47 47 113zM576 704q66 0 113 47t47 113-47 113-113 47-113-47-47-113 47-113 113-47zM992 704q66 0 113 47t47 113-47 113-113 47-113-47-47-113 47-113 113-47zM960 496q0 66-47 113t-113 47-113-47-47-113 47-113 113-47 113 47 47 113z"></path></svg>';
  29. var svg = L.svgOverlay( svgElement, [[0, 0], [1024,1152]] ).addTo( map );
  30.  
  31. // fit map
  32. map.fitBounds( bounds );
  33. </script>
  34.  
  35. </body>
  36. </html>
RAW Paste Data