map3d_test.html 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <html>
  2. <head>
  3. <meta charset="utf-8" />
  4. <meta name="viewport" content="initial-scale=1,maximum-scale=1,user-scalable=no" />
  5. <title></title>
  6. <style>
  7. html,
  8. body,
  9. .map {
  10. padding: 0;
  11. margin: 0;
  12. height: 100%;
  13. width: 100%;
  14. }
  15. </style>
  16. <script src="http://10.101.35.50/arcgis_js_api/library/4.19/init.js"></script>
  17. <script>
  18. require([
  19. "esri/Map",
  20. "esri/views/MapView",
  21. "esri/views/SceneView",
  22. "esri/layers/TileLayer",
  23. "esri/layers/SceneLayer",
  24. "esri/geometry/Extent",
  25. "esri/geometry/SpatialReference",
  26. ],
  27. (Map, MapView,SceneView,TileLayer,SceneLayer,Extent,SpatialReference) => {
  28. window.map = new Map({
  29. ground: {
  30. //surfaceColor: 'white'
  31. }
  32. });
  33. window.sceneView = new SceneView({
  34. container: 'myMap',
  35. viewingMode: 'local',
  36. spatialReference: SpatialReference.WebMercator,
  37. alphaCompositingEnabled: true,
  38. map: window.map,
  39. camera: {
  40. heading: 359.9997942848389,
  41. tilt: 0.55612228690971334,
  42. fov: 55,
  43. position: {
  44. latitude: 0.04018104720226873,
  45. longitude: 0.01576215129235358,
  46. z: 250000.11710326429
  47. }
  48. },
  49. environment: {
  50. // atmosphere:null,
  51. background: {
  52. type: "color",
  53. color: '#002F47'
  54. },
  55. starsEnabled: false,
  56. atmosphereEnabled: false,
  57. lighting: {
  58. date: new Date("August 1, 2019 12:00:00 GMT +0000"),
  59. directShadowsEnabled: true,
  60. ambientOcclusionEnabled: true,
  61. }
  62. },
  63. popup: {
  64. defaultPopupTemplateEnabled: true
  65. }
  66. });
  67. const sceneLayer = new SceneLayer({
  68. url:"http://10.101.35.56//i3s_svc/baimo/SceneServer/layers/0",
  69. visible: true,
  70. });
  71. window.map.layers.add(sceneLayer)
  72. });
  73. </script>
  74. </head>
  75. <body>
  76. <div id="myMap" class="map"></div>
  77. </body>
  78. </html>