Advertisement
iqnaul

Untitled

Jul 26th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.21 KB | None | 0 0
  1. <!doctype html>
  2. <html lang="en">
  3. <head>
  4. <title>Simple Leaflet example</title>
  5. <meta charset="utf-8">
  6. <meta name="viewport"content="width=device-width,initial-scale=1">
  7. <link rel="stylesheet" href="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.css" />
  8. <script src="http://cdn.leafletjs.com/leaflet-0.7.3/leaflet.js"></script>
  9. <style>
  10. * {
  11. margin: 0;
  12. padding: 0;
  13. }
  14.  
  15. #map {
  16. position: absolute;
  17. width: 100%;
  18. height: 100%;
  19. }
  20.  
  21. .leaflet-container {
  22. background-color: #959190;
  23. }
  24. </style>
  25. </head>
  26. <body>
  27. </header>
  28. <div id="map"></div>
  29. <script>
  30. //var tileUrl = 'http://localhost:8080/geoserver/gwc/service/tms/1.0.0/test:test1@EPSG:4326@png/{z}/{x}/{y}.png',
  31. var wmsLayer = L.tileLayer.wms('http://localhost:8080/geoserver/ows?', {
  32. layers: 'test:test1'
  33. }),
  34. map = L.map('map', {
  35. center: new L.LatLng(32.9211,35.50538), crs: L.CRS.EPSG4326,
  36. maxZoom: 18
  37. });
  38.  
  39. wmsLayer.addTo(map);
  40. //L.tileLayer(tileUrl, {tms: true}).addTo(map);
  41. map.setView([32.9211, 35.50538], 18);
  42. </script>
  43. </body>
  44. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement