Guest User

Untitled

a guest
Oct 18th, 2017
138
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.97 KB | None | 0 0
  1. http://localhost:8090/geoserver/geog/wms?service=WMS&version=1.1.0&request=GetMap&layers=geog:ne_10m_admin_0_countries_lakes&styles=&bbox=-179.9999999999999,-89.99999999999996,180.00000000000028,83.63410065300016&width=768&height=370&srs=EPSG:4326&format=text%2Fhtml%3B%20subtype%3Dopenlayers
  2.  
  3. <!DOCTYPE html>
  4. <html lang="en">
  5. <head>
  6. <!-- Use correct character set. -->
  7. <meta charset="utf-8">
  8. <!-- Tell IE to use the latest, best version. -->
  9. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  10. <!-- Make the application on mobile take up the full browser screen and disable user scaling. -->
  11. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no">
  12. <title>Hello World!</title>
  13. <script src="../Build/Cesium/Cesium.js"></script>
  14. <style>
  15. @import url(../Build/Cesium/Widgets/widgets.css);
  16. html, body, #cesiumContainer {
  17. width: 100%; height: 100%; margin: 0; padding: 0; overflow: hidden;
  18. }
  19. </style>
  20. </head>
  21. </head>
  22. <body>
  23. <div id="cesiumContainer"></div>
  24. <script>
  25.  
  26. var widget = new Cesium.CesiumWidget('cesiumContainer');
  27.  
  28. var url='http://localhost:8090/geoserver/geog/wms';
  29. var layers = widget.scene.globe.imageryLayers;
  30. layers.removeAll();
  31. layers.addImageryProvider(new Cesium.WebMapServiceImageryProvider({
  32. url : url,
  33. layers: 'geog:ne_10m_admin_0_countries_lakes'
  34. }));
  35.  
  36. Sandcastle.finishedLoading();
  37.  
  38. </script>
  39. </body>
  40. </html>
  41.  
  42. Uncaught ReferenceError: Sandcastle is not defined
  43. at WMS.html:34
  44.  
  45. Access to Image at 'http://localhost:8090/geoserver/geog/wms?service=WMS&version=1.1.1&request=GetMap&styles=&format=image%2Fjpeg&layers=geog%3Ane_10m_admin_0_countries_lakes&srs=EPSG%3A4326&bbox=0%2C-90%2C180%2C90&width=256&height=256' from origin 'http://localhost:8080' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin 'http://localhost:8080' is therefore not allowed access.
Add Comment
Please, Sign In to add comment