@baidumap/mapv-three 1.0.1 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/images/fallbackIcon.png +0 -0
- package/dist/assets/images/marker_red.png +0 -0
- package/dist/assets/models/effect/diamond.glb +0 -0
- package/dist/assets/textures/imposter/tree3/base.webp +0 -0
- package/dist/assets/textures/imposter/tree3/norm_depth.webp +0 -0
- package/dist/assets/textures/imposter/tree3/orm.webp +0 -0
- package/dist/devtool/panel.js +10 -5
- package/dist/mapvthree.module.js +41964 -35175
- package/dist/mapvthree.umd.js +7 -8
- package/dist/types/Internal.d.ts +0 -2
- package/dist/types/index.d.ts +12 -8
- package/dist/types/index.open.d.ts +18 -1
- package/dist/types/threejs/controls/MapControl3D.d.ts +1 -1
- package/dist/types/threejs/geometries/line/PolylineGeometry.d.ts +1 -0
- package/dist/types/threejs/geometries/sphere/PillarGeometry.d.ts +4 -0
- package/dist/types/threejs/materials/effects/ScanMaterial.d.ts +69 -58
- package/dist/types/threejs/materials/effects/TwinkleMaterial.d.ts +56 -43
- package/dist/types/threejs/materials/effects/WindowMaterial.d.ts +37 -26
- package/dist/types/threejs/materials/heatmap/Heatmap3D.d.ts +2 -0
- package/dist/types/threejs/materials/natural/WaterMaterial.d.ts +152 -18
- package/dist/types/threejs/materials/point/Ballon.d.ts +1 -0
- package/dist/types/threejs/materials/point/Effect.d.ts +13 -0
- package/dist/types/threejs/materials/point/Icon.d.ts +4 -0
- package/dist/types/threejs/materials/polygon/PolygonMaterial.d.ts +2 -0
- package/dist/types/threejs/materials/sphere/GridMaterial.d.ts +6 -1
- package/dist/types/threejs/materials/sphere/PillarMaterial.d.ts +5 -1
- package/dist/types/threejs/objects/FadeData.d.ts +1 -0
- package/dist/types/threejs/objects/GeoInstancedMesh.d.ts +1 -2
- package/dist/types/threejs/objects/GeoObject.d.ts +24 -0
- package/dist/types/threejs/objects/ThreeObject.d.ts +4 -2
- package/dist/types/threejs/objects/element/OctahedralImpostor.d.ts +15 -21
- package/dist/types/threejs/objects/heatmap/Heatmap3D.d.ts +43 -23
- package/dist/types/threejs/objects/instance/InstancedModel.d.ts +2 -0
- package/dist/types/threejs/objects/line/FatLine.d.ts +3 -245
- package/dist/types/threejs/objects/line/FatLineInternal.d.ts +246 -0
- package/dist/types/threejs/objects/line/Polyline.d.ts +53 -76
- package/dist/types/threejs/objects/line/PolylineInternal.d.ts +85 -0
- package/dist/types/threejs/objects/line/SimpleLine.d.ts +1 -1
- package/dist/types/threejs/objects/line/TrafficLink.d.ts +2 -2
- package/dist/types/threejs/objects/natural/BillboardTree.d.ts +1 -0
- package/dist/types/threejs/objects/point/ActiveMesh.d.ts +0 -1
- package/dist/types/threejs/objects/point/BallonPoint.d.ts +54 -7
- package/dist/types/threejs/objects/point/BubblePoint.d.ts +8 -1
- package/dist/types/threejs/objects/point/Circle.d.ts +0 -9
- package/dist/types/threejs/objects/point/DOMPoint.d.ts +4 -4
- package/dist/types/threejs/objects/point/EffectModelPoint.d.ts +55 -27
- package/dist/types/threejs/objects/point/EffectPoint.d.ts +70 -0
- package/dist/types/threejs/objects/point/GeoInstancedPointMesh.d.ts +10 -0
- package/dist/types/threejs/objects/point/Icon.d.ts +1 -1
- package/dist/types/threejs/objects/point/Label.d.ts +142 -30
- package/dist/types/threejs/objects/point/ShapePoint.d.ts +0 -1
- package/dist/types/threejs/objects/point/Spark.d.ts +37 -38
- package/dist/types/threejs/objects/point/label/GeometryBufferBuilder.d.ts +41 -0
- package/dist/types/threejs/objects/point/label/TextBoxCalculator.d.ts +38 -0
- package/dist/types/threejs/objects/polygon/Polygon.d.ts +200 -66
- package/dist/types/threejs/objects/sphere/Cone.d.ts +3 -63
- package/dist/types/threejs/objects/sphere/Grid.d.ts +3 -2
- package/dist/types/threejs/objects/sphere/Pillar.d.ts +49 -7
- package/dist/types/threejs/objects/text/utils.d.ts +8 -1
- package/dist/types/threejs/particles/Fireflies.d.ts +57 -13
- package/dist/types/threejs/utils/sprite.d.ts +1 -1
- package/dist/types/threemap/3dtiles/HDMap/v2/instanceConfig.d.ts +166 -0
- package/dist/types/threemap/3dtiles/HDMap3DTiles.d.ts +2 -0
- package/dist/types/threemap/3dtiles/cesium/Cesium3DTileset.d.ts +4 -2
- package/dist/types/threemap/3dtiles/cesium/content/Mesh3DTileContent.d.ts +1 -0
- package/dist/types/threemap/3dtiles/elements/TileInstancedElementManager.d.ts +41 -9
- package/dist/types/threemap/controls/editors/EditorManager.d.ts +51 -145
- package/dist/types/threemap/controls/editors/PolygonEditor.d.ts +14 -0
- package/dist/types/threemap/controls/editors/SplineEditor.d.ts +6 -0
- package/dist/types/threemap/dataSource/DataItem.d.ts +3 -1
- package/dist/types/threemap/dataSource/DataSource.d.ts +29 -0
- package/dist/types/threemap/engine/Map.d.ts +2 -0
- package/dist/types/threemap/engine/rendering/Collision.d.ts +15 -0
- package/dist/types/threemap/engine/rendering/Label.d.ts +6 -1
- package/dist/types/threemap/engine/rendering/MicroTaskScheduler.d.ts +4 -0
- package/dist/types/threemap/mapView/baidu/TafficDataLoader.d.ts +13 -0
- package/dist/types/threemap/mapView/constants.d.ts +54 -0
- package/dist/types/threemap/mapView/geo/MapTile.d.ts +3 -0
- package/dist/types/threemap/mapView/geo/TileQuadtree.d.ts +2 -1
- package/dist/types/threemap/mapView/grid/BaiduVectorOnlineGrid.d.ts +10 -0
- package/dist/types/threemap/mapView/grid/Grid.d.ts +14 -0
- package/dist/types/threemap/mapView/map/MapView.d.ts +0 -10
- package/dist/types/threemap/mapView/mapbox/executer/fill.d.ts +2 -0
- package/dist/types/threemap/mapView/surface/MapSurface.d.ts +7 -4
- package/dist/types/threemap/mapView/surface/Placeholder.d.ts +1 -1
- package/dist/types/threemap/mapView/surface/VectorSurface.d.ts +1 -0
- package/dist/types/threemap/mapView/surface/strategy/FastTileLoaderStrategy.d.ts +3 -3
- package/dist/types/threemap/mapView/surface/strategy/HierarchicalTileLoaderStrategy.d.ts +0 -1
- package/dist/types/threemap/mapView/tileManager/RasterSurfaceTileManager.d.ts +4 -4
- package/dist/types/threemap/mapView/tileManager/SurfaceTileManager.d.ts +4 -1
- package/dist/types/threemap/mapView/tileManager/VectorSurfaceTileManager.d.ts +4 -5
- package/dist/types/threemap/mapView/tileProvider/AsyncCesiumTerrainDataLoader.d.ts +1 -1
- package/dist/types/threemap/mapView/tileProvider/AsyncDataTileLoader.d.ts +1 -0
- package/dist/types/threemap/mapView/tileProvider/BaseImageryTileProvider.d.ts +103 -0
- package/dist/types/threemap/mapView/tileProvider/TileProvider.d.ts +25 -9
- package/dist/types/threemap/mapView/tileProvider/imagery/Baidu09ImageryTileProvider.d.ts +71 -7
- package/dist/types/threemap/mapView/tileProvider/imagery/BingImageryTileProvider.d.ts +22 -3
- package/dist/types/threemap/mapView/tileProvider/imagery/GridCoordTileProvider.d.ts +2 -0
- package/dist/types/threemap/mapView/tileProvider/imagery/ImageryTileProvider.d.ts +56 -27
- package/dist/types/threemap/mapView/tileProvider/imagery/OSMImageryTileProvider.d.ts +0 -10
- package/dist/types/threemap/mapView/tileProvider/imagery/StadiaImageryTileProvider.d.ts +75 -0
- package/dist/types/threemap/mapView/tileProvider/imagery/WMSImageryTileProvider.d.ts +106 -13
- package/dist/types/threemap/mapView/tileProvider/imagery/WMTSImageryTileProvider.d.ts +114 -15
- package/dist/types/threemap/mapView/tileProvider/imagery/XYZImageryTileProvider.d.ts +53 -6
- package/dist/types/threemap/mapView/tileProvider/renderers/ImageTileLabelRenderer.d.ts +4 -0
- package/dist/types/threemap/mapView/{geo → tileProvider/renderers}/ImageryReprojector.d.ts +1 -1
- package/dist/types/threemap/mapView/tileProvider/renderers/VectorTileImageRenderer.d.ts +4 -0
- package/dist/types/threemap/mapView/tileProvider/vector/BaiduTrafficTileProvider.d.ts +165 -21
- package/dist/types/threemap/mapView/tileProvider/vector/BaiduVectorTileProvider.d.ts +3 -1
- package/dist/types/threemap/mapView/tileProvider/vector/GeoJSONVectorTileProvider.d.ts +1 -1
- package/dist/types/threemap/mapView/tileProvider/vector/HDTrafficTileProvider.d.ts +159 -24
- package/dist/types/threemap/mapView/tileProvider/vector/MapboxVectorTileProvider.d.ts +264 -40
- package/dist/types/threemap/mapView/tileProvider/vector/PlaneVectorTileProvider.d.ts +1 -1
- package/dist/types/threemap/mapView/tileProvider/vector/VectorTileProvider.d.ts +6 -4
- package/dist/types/threemap/mapView/utils/projectVertices.d.ts +1 -1
- package/dist/types/threemap/model/AnimationModel.d.ts +86 -6
- package/dist/types/threemap/natural/DynamicWeather.d.ts +92 -0
- package/dist/types/threemap/natural/EmptySky.d.ts +1 -0
- package/dist/types/threemap/natural/StaticSky.d.ts +32 -5
- package/dist/types/threemap/projections/BaiduMercatorProjection.d.ts +14 -0
- package/dist/types/threemap/projections/CoordTransformer.d.ts +13 -0
- package/dist/types/threemap/projections/GenericDefinedProjection.d.ts +10 -0
- package/dist/types/threemap/projections/Projection.d.ts +24 -7
- package/dist/types/threemap/projections/ScreenPixelProjection.d.ts +26 -7
- package/dist/types/threemap/projections/WebMercatorProjection.d.ts +16 -0
- package/dist/types/threemap/projections/extendCoordinate.d.ts +2 -0
- package/dist/types/threemap/projections/projections.d.ts +11 -0
- package/dist/types/util/LRUCacheNew.d.ts +1 -0
- package/dist/types/util/coordProjection.d.ts +0 -2
- package/dist/types/util/geojsonUtils.d.ts +1 -0
- package/dist/types/util/gradientMap.d.ts +25 -0
- package/dist/types/util/graphics/bezier.d.ts +8 -1
- package/package.json +2 -1
- package/dist/assets/models/hdmap/SM_Big-Pier_2.glb +0 -0
- package/dist/assets/models/hdmap/SM_Cone_Barrel.glb +0 -0
- package/dist/assets/models/hdmap/SM_Fence1-0.glb +0 -0
- package/dist/assets/models/hdmap/SM_Fence1-8.glb +0 -0
- package/dist/assets/models/hdmap/SM_Fence2-5.glb +0 -0
- package/dist/assets/models/hdmap/SM_Fence7-0.glb +0 -0
- package/dist/assets/models/hdmap/SM_Fence7-2.glb +0 -0
- package/dist/assets/models/hdmap/SM_Fence7-3.glb +0 -0
- package/dist/assets/models/hdmap/SM_Road_facility2.glb +0 -0
- package/dist/assets/models/hdmap/SM_Signboard_8.glb +0 -0
- package/dist/assets/models/hdmap/SM_fence1-5.glb +0 -0
- package/dist/assets/models/hdmap/tunnel_light.glb +0 -0
- package/dist/types/addons/highwaymap/Viewer.d.ts +0 -164
- package/dist/types/addons/highwaymap/index.d.ts +0 -3
- package/dist/types/addons/highwaymap/map/Map.d.ts +0 -59
- package/dist/types/addons/highwaymap/map/MapControl.d.ts +0 -57
- package/dist/types/addons/highwaymap/service/index.d.ts +0 -3
- package/dist/types/addons/highwaymap/utils/eventTypes.d.ts +0 -15
- package/dist/types/addons/index.d.ts +0 -4
- package/dist/types/addons/traffic/config/assets.d.ts +0 -78
- package/dist/types/addons/traffic/config/element.d.ts +0 -23
- package/dist/types/addons/traffic/handler/AbstractLoadPolicy.d.ts +0 -13
- package/dist/types/addons/traffic/handler/DefaultLoadPolicy.d.ts +0 -5
- package/dist/types/addons/traffic/handler/ModelCreator.d.ts +0 -69
- package/dist/types/addons/traffic/handler/ModelHandler.d.ts +0 -131
- package/dist/types/addons/traffic/handler/assets.d.ts +0 -365
- package/dist/types/addons/traffic/handler/ceilManager.d.ts +0 -16
- package/dist/types/addons/traffic/handler/tools.d.ts +0 -17
- package/dist/types/addons/traffic/handler/trafficLight.d.ts +0 -253
- package/dist/types/addons/traffic/index.d.ts +0 -16
- package/dist/types/addons/traffic/objects/BasicLabel.d.ts +0 -226
- package/dist/types/addons/traffic/objects/Diamond.d.ts +0 -61
- package/dist/types/addons/traffic/objects/DynamicModel.d.ts +0 -129
- package/dist/types/addons/traffic/objects/InstancedModel.d.ts +0 -91
- package/dist/types/addons/traffic/objects/LineMesh.d.ts +0 -6
- package/dist/types/addons/traffic/objects/Model.d.ts +0 -169
- package/dist/types/addons/traffic/objects/TrafficGroup.d.ts +0 -16
- package/dist/types/addons/traffic/objects/TrafficInstancedObject.d.ts +0 -7
- package/dist/types/addons/traffic/objects/TrafficObject.d.ts +0 -14
- package/dist/types/addons/traffic/objects/curveLineMesh.d.ts +0 -29
- package/dist/types/addons/traffic/objects/shaders/Line2dShader.d.ts +0 -1
- package/dist/types/addons/traffic/objects/shaders/RingCircle.d.ts +0 -19
- package/dist/types/addons/traffic/objects/shaders/WaveCircle2.d.ts +0 -13
- package/dist/types/addons/traffic/objects/shaders/WaveCircle4.d.ts +0 -17
- package/dist/types/addons/traffic/objects/shaders/WaveCircle5.d.ts +0 -17
- package/dist/types/addons/traffic/service/assets.d.ts +0 -50
- package/dist/types/addons/traffic/utils/BasicLabel.d.ts +0 -3
- package/dist/types/addons/traffic/utils/MapMath.d.ts +0 -78
- package/dist/types/addons/traffic/utils/assets.d.ts +0 -108
- package/dist/types/addons/traffic/utils/freeTag.d.ts +0 -71
- package/dist/types/addons/traffic/utils/hooks.d.ts +0 -1
- package/dist/types/addons/traffic/utils/index.d.ts +0 -26
- package/dist/types/addons/traffic/utils/trafficLight.d.ts +0 -73
- package/dist/types/addons/traffic/utils/ws.d.ts +0 -23
- package/dist/types/addons/visual/core/LRU.d.ts +0 -27
- package/dist/types/addons/visual/core/defines.d.ts +0 -55
- package/dist/types/addons/visual/core/global.d.ts +0 -29
- package/dist/types/addons/visual/extension/AnimatePolygon.d.ts +0 -108
- package/dist/types/addons/visual/extension/DoubleLine.d.ts +0 -137
- package/dist/types/addons/visual/extension/FlyLineLayer.d.ts +0 -140
- package/dist/types/addons/visual/extension/MeshLine.d.ts +0 -61
- package/dist/types/addons/visual/extension/TubeLine.d.ts +0 -93
- package/dist/types/addons/visual/extension/Water/Reflector.d.ts +0 -26
- package/dist/types/addons/visual/extension/Water/Refractor.d.ts +0 -26
- package/dist/types/addons/visual/extension/Water/Water.d.ts +0 -60
- package/dist/types/addons/visual/extension/Water/WaterFive.d.ts +0 -20
- package/dist/types/addons/visual/extension/Water/WaterFour.d.ts +0 -17
- package/dist/types/addons/visual/extension/Water/WaterOne.d.ts +0 -10
- package/dist/types/addons/visual/extension/Water/WaterSix.d.ts +0 -15
- package/dist/types/addons/visual/extension/Water/WaterThree.d.ts +0 -14
- package/dist/types/addons/visual/extension/Water/WaterTwo.d.ts +0 -14
- package/dist/types/addons/visual/extension/specialEffect/LateralScan.d.ts +0 -32
- package/dist/types/addons/visual/extension/specialEffect/LineGradient.d.ts +0 -28
- package/dist/types/addons/visual/extension/specialEffect/TwinkleEffect.d.ts +0 -30
- package/dist/types/addons/visual/index.d.ts +0 -17
- package/dist/types/addons/visual/map/Fence.d.ts +0 -121
- package/dist/types/addons/visual/map/Polyline.d.ts +0 -178
- package/dist/types/addons/visual/mapTile/MapLayer.d.ts +0 -50
- package/dist/types/addons/visual/mapTile/MapLayerLoader.d.ts +0 -15
- package/dist/types/addons/visual/mapTile/MapLodLayer.d.ts +0 -15
- package/dist/types/addons/visual/mapTile/MapRequest.d.ts +0 -69
- package/dist/types/addons/visual/mapTile/MapTile.d.ts +0 -131
- package/dist/types/addons/visual/mapTile/MapTileLoader.d.ts +0 -26
- package/dist/types/addons/visual/mapTile/config.d.ts +0 -381
- package/dist/types/addons/visual/mapTile/workers/WorkerService.d.ts +0 -9
- package/dist/types/addons/visual/mapTile/workers/WorkerServiceManager.d.ts +0 -8
- package/dist/types/addons/visual/utils/AdaptedThree.d.ts +0 -22
- package/dist/types/addons/visual/utils/CombinePositions.d.ts +0 -23
- package/dist/types/addons/visual/utils/Extrude.d.ts +0 -92
- package/dist/types/addons/visual/utils/GenerateObject.d.ts +0 -32
- package/dist/types/addons/visual/utils/GeoJSONUtil.d.ts +0 -10
- package/dist/types/addons/visual/utils/MapMath.d.ts +0 -66
- package/dist/types/addons/visual/utils/MergeGeometries.d.ts +0 -13
- package/dist/types/addons/visual/utils/OrganizedGeometry.d.ts +0 -33
- package/dist/types/addons/visual/utils/OrganizedMaterial.d.ts +0 -5
- package/dist/types/addons/visual/utils/lines/Line2.d.ts +0 -7
- package/dist/types/addons/visual/utils/lines/LineDashShaderMaterial.d.ts +0 -4
- package/dist/types/addons/visual/utils/lines/LineGeometry.d.ts +0 -7
- package/dist/types/addons/visual/utils/lines/LineMaterial.d.ts +0 -4
- package/dist/types/addons/visual/utils/lines/LineSegments2.d.ts +0 -9
- package/dist/types/addons/visual/utils/lines/LineSegmentsGeometry.d.ts +0 -17
- package/dist/types/addons/visual/utils/util.d.ts +0 -269
- package/dist/types/threemap/mapView/BaiduVImageryMap.d.ts +0 -40
- package/dist/types/threemap/mapView/QuadMap.d.ts +0 -287
- package/dist/types/threemap/mapView/geo/TileManager.d.ts +0 -68
- package/dist/types/threemap/mapView/geo/globe.d.ts +0 -6
- package/dist/types/threemap/mapView/tileLoader/AsyncBinaryTileLoader.d.ts +0 -20
- package/dist/types/threemap/mapView/tileLoader/BaiduTrafficVectorTileLoader.d.ts +0 -13
- package/dist/types/threemap/mapView/tileLoader/BaiduVImageryTileLoader.d.ts +0 -59
- package/dist/types/threemap/mapView/tileLoader/BaiduVectorTileLoader.d.ts +0 -23
- package/dist/types/threemap/mapView/tileLoader/BinaryTileLoader.d.ts +0 -7
- package/dist/types/threemap/mapView/tileLoader/CesiumTerrainTileLoader.d.ts +0 -21
- package/dist/types/threemap/mapView/tileLoader/CompositionTileLoader.d.ts +0 -15
- package/dist/types/threemap/mapView/tileLoader/DebugTileLoader.d.ts +0 -4
- package/dist/types/threemap/mapView/tileLoader/HDTrafficTileLoader.d.ts +0 -16
- package/dist/types/threemap/mapView/tileLoader/ImageTileLoader.d.ts +0 -7
- package/dist/types/threemap/mapView/tileLoader/MapboxTerrainTileLoader.d.ts +0 -14
- package/dist/types/threemap/mapView/tileLoader/TileLoader.d.ts +0 -19
- package/dist/types/threemap/projections/EqualEarthProjection.d.ts +0 -11
- package/dist/types/threemap/projections/UTMProjection.d.ts +0 -21
- /package/dist/types/threemap/{mapView/tileLoader/worker/BaiduTrafficParser.worker.d.ts → 3dtiles/HDMap/v2/yaml_to_json.d.ts} +0 -0
- /package/dist/types/threemap/mapView/{tileLoader/worker → baidu}/binaryDecoder.d.ts +0 -0
- /package/dist/types/threemap/mapView/{terrainData → geo/terrainData}/QuantizedMeshTerrainData.d.ts +0 -0
- /package/dist/types/threemap/mapView/{terrainData → geo/terrainData}/TerrainMesh.d.ts +0 -0
- /package/dist/types/threemap/mapView/{materials → materialManager}/CustomMVTMaterialManager.d.ts +0 -0
- /package/dist/types/threemap/mapView/{materials → materialManager}/DarkMVTMaterialManager.d.ts +0 -0
- /package/dist/types/threemap/mapView/{materials → materialManager}/DefaultQuadMapMaterialManager.d.ts +0 -0
- /package/dist/types/threemap/mapView/{tileLoader/worker/BaiduVectorParser.worker.d.ts → tileProvider/worker/BaiduTrafficParser.worker.d.ts} +0 -0
- /package/dist/types/threemap/mapView/{tileLoader/worker/CesiumTerrainParser.worker.d.ts → tileProvider/worker/BaiduVectorParser.worker.d.ts} +0 -0
- /package/dist/types/threemap/mapView/{tileLoader/worker/GeoJSONVectorParser.worker.d.ts → tileProvider/worker/CesiumTerrainParser.worker.d.ts} +0 -0
- /package/dist/types/threemap/mapView/{tileLoader/worker/HDTrafficParser.worker.d.ts → tileProvider/worker/GeoJSONVectorParser.worker.d.ts} +0 -0
- /package/dist/types/threemap/mapView/{tileLoader/worker/LaCesiumTerrainParser.worker.d.ts → tileProvider/worker/HDTrafficParser.worker.d.ts} +0 -0
- /package/dist/types/threemap/mapView/{tileLoader → tileProvider}/worker/MVTParser.worker.d.ts +0 -0
- /package/dist/types/threemap/mapView/{tileLoader → tileProvider}/worker/MapboxTerrainParser.worker.d.ts +0 -0
|
@@ -6,21 +6,28 @@
|
|
|
6
6
|
* - 支持Bing地图影像瓦片加载
|
|
7
7
|
* - 支持Web墨卡托和地理坐标投影
|
|
8
8
|
* - 支持瓦片URL的自动生成
|
|
9
|
+
* - 支持动态切换地图样式
|
|
9
10
|
*
|
|
10
11
|
* @category MapView
|
|
11
12
|
* @example
|
|
12
13
|
* ```javascript
|
|
13
14
|
* // 创建Bing影像瓦片提供者
|
|
14
|
-
* const provider = new BingImageryTileProvider({
|
|
15
|
-
*
|
|
15
|
+
* const provider = new mapvthree.BingImageryTileProvider({
|
|
16
|
+
* style: mapvthree.mapViewConstants.BING_MAP_STYLE_AERIAL,
|
|
16
17
|
* });
|
|
18
|
+
*
|
|
19
|
+
* // 动态切换地图样式
|
|
20
|
+
* provider.style = mapvthree.mapViewConstants.BING_MAP_STYLE_ROAD;
|
|
17
21
|
* ```
|
|
18
22
|
*/
|
|
19
23
|
export class BingImageryTileProvider extends ImageryTileProvider {
|
|
20
24
|
/**
|
|
21
25
|
* @param {object} options 配置选项
|
|
26
|
+
* @param {string} [options.style] 地图样式,支持 {@link mapViewConstants.BING_MAP_STYLE_AERIAL}、{@link mapViewConstants.BING_MAP_STYLE_AERIAL_WITH_LABELS}、{@link mapViewConstants.BING_MAP_STYLE_ROAD},默认为 {@link mapViewConstants.BING_MAP_STYLE_AERIAL}
|
|
22
27
|
*/
|
|
23
|
-
constructor(options
|
|
28
|
+
constructor(options?: {
|
|
29
|
+
style?: string | undefined;
|
|
30
|
+
});
|
|
24
31
|
/**
|
|
25
32
|
* 瓦片提供者名称
|
|
26
33
|
* @readonly
|
|
@@ -41,6 +48,18 @@ export class BingImageryTileProvider extends ImageryTileProvider {
|
|
|
41
48
|
* @private
|
|
42
49
|
*/
|
|
43
50
|
private _defaultMaxLevel;
|
|
51
|
+
/**
|
|
52
|
+
* URL生成函数
|
|
53
|
+
* @private
|
|
54
|
+
*/
|
|
55
|
+
private _urlGenerator;
|
|
56
|
+
_style: string;
|
|
57
|
+
set style(style: string);
|
|
58
|
+
/**
|
|
59
|
+
* 获取或设置地图样式
|
|
60
|
+
* @type {string}
|
|
61
|
+
*/
|
|
62
|
+
get style(): string;
|
|
44
63
|
/**
|
|
45
64
|
* 获取瓦片URL
|
|
46
65
|
* @internal
|
|
@@ -4,33 +4,62 @@
|
|
|
4
4
|
*
|
|
5
5
|
* @category Internal
|
|
6
6
|
*/
|
|
7
|
-
export class ImageryTileProvider extends
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
*
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*
|
|
20
|
-
|
|
21
|
-
|
|
7
|
+
export class ImageryTileProvider extends BaseImageryTileProvider {
|
|
8
|
+
/**
|
|
9
|
+
* 瓦片提供者名称
|
|
10
|
+
* @readonly
|
|
11
|
+
*/
|
|
12
|
+
readonly name: "ImageryTileProvider";
|
|
13
|
+
/**
|
|
14
|
+
* 是否为影像瓦片提供者
|
|
15
|
+
* @readonly
|
|
16
|
+
*/
|
|
17
|
+
readonly isImageryTileProvider: true;
|
|
18
|
+
/**
|
|
19
|
+
* 是否使用扩展目标边界框
|
|
20
|
+
* @private
|
|
21
|
+
*/
|
|
22
|
+
private useExtendTargetBoundingBox;
|
|
23
|
+
/**
|
|
24
|
+
* 获取瓦片URL
|
|
25
|
+
* 子类必须重写此方法以提供具体的瓦片URL
|
|
26
|
+
* @param {number} z 缩放级别
|
|
27
|
+
* @param {number} x 瓦片X坐标
|
|
28
|
+
* @param {number} y 瓦片Y坐标
|
|
29
|
+
* @param {object} tile 瓦片对象
|
|
30
|
+
* @returns {string} 瓦片URL
|
|
31
|
+
* @abstract
|
|
32
|
+
*/
|
|
33
|
+
getTileURL(z: number, x: number, y: number, tile: object): string;
|
|
34
|
+
/**
|
|
35
|
+
* 判断是否需要进行投影变换
|
|
36
|
+
* 取中心点的像素坐标,计算变换后的像素坐标,判断是否有明显的偏移
|
|
37
|
+
* @param {object} sourceProjection 源投影
|
|
38
|
+
* @param {object} targetProjection 目标投影
|
|
39
|
+
* @param {object} tile 瓦片对象
|
|
40
|
+
* @param {object} terrainTile 地形瓦片对象
|
|
41
|
+
* @returns {boolean} 是否需要重投影
|
|
42
|
+
*/
|
|
43
|
+
shouldReproject(sourceProjection: object, targetProjection: object, tile: object, terrainTile: object): boolean;
|
|
22
44
|
/**
|
|
23
45
|
* 请求瓦片数据
|
|
24
|
-
*
|
|
25
|
-
* @param {
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
46
|
+
* 加载影像瓦片纹理,并根据需要进行投影变换
|
|
47
|
+
* @param {object} tile 瓦片对象
|
|
48
|
+
* @param {object} surfaceTile 表面瓦片对象
|
|
49
|
+
* @returns {Promise<Texture>} 瓦片纹理
|
|
50
|
+
*/
|
|
51
|
+
doRequestImageTileData(tile: object, surfaceTile: object): Promise<Texture>;
|
|
52
|
+
/**
|
|
53
|
+
* 错误回退处理
|
|
54
|
+
* 当瓦片加载失败时返回透明纹理
|
|
55
|
+
* @returns {DataTexture} 透明纹理
|
|
56
|
+
*/
|
|
57
|
+
errorFallback(): DataTexture;
|
|
58
|
+
/**
|
|
59
|
+
* 瓦片销毁时的回调
|
|
60
|
+
* 释放瓦片纹理资源
|
|
61
|
+
* @param {object} tile 瓦片对象
|
|
62
|
+
*/
|
|
63
|
+
onTileDispose(tile: object): void;
|
|
35
64
|
}
|
|
36
|
-
import {
|
|
65
|
+
import { BaseImageryTileProvider } from '../BaseImageryTileProvider';
|
|
@@ -42,15 +42,5 @@ export class OSMImageryTileProvider extends ImageryTileProvider {
|
|
|
42
42
|
* @private
|
|
43
43
|
*/
|
|
44
44
|
private _defaultMaxLevel;
|
|
45
|
-
/**
|
|
46
|
-
* 获取瓦片URL
|
|
47
|
-
* @internal
|
|
48
|
-
* @param {number} z 缩放级别
|
|
49
|
-
* @param {number} x 瓦片X坐标
|
|
50
|
-
* @param {number} y 瓦片Y坐标
|
|
51
|
-
* @param {object} tile 瓦片对象
|
|
52
|
-
* @returns {string} 瓦片URL
|
|
53
|
-
*/
|
|
54
|
-
getTileURL(z: number, x: number, y: number, tile: object): string;
|
|
55
45
|
}
|
|
56
46
|
import { ImageryTileProvider } from './ImageryTileProvider';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Stamen影像瓦片提供者,用于加载和渲染Stamen地图的影像瓦片数据。
|
|
3
|
+
* 支持Web墨卡托和地理坐标两种投影方式。
|
|
4
|
+
*
|
|
5
|
+
* 主要功能:
|
|
6
|
+
* - 支持Stamen地图影像瓦片加载
|
|
7
|
+
* - 支持Web墨卡托和地理坐标投影
|
|
8
|
+
* - 支持瓦片URL的自动生成
|
|
9
|
+
* - 支持动态切换地图样式
|
|
10
|
+
*
|
|
11
|
+
* @category MapView
|
|
12
|
+
* @example
|
|
13
|
+
* ```javascript
|
|
14
|
+
* // 创建Stamen影像瓦片提供者
|
|
15
|
+
* const provider = new mapvthree.StadiaImageryTileProvider({
|
|
16
|
+
* style: mapvthree.mapViewConstants.STADIA_MAP_STYLE_STAMEN_WATERCOLOR,
|
|
17
|
+
* });
|
|
18
|
+
*
|
|
19
|
+
* // 动态切换地图样式
|
|
20
|
+
* provider.style = mapvthree.mapViewConstants.STADIA_MAP_STYLE_STAMEN_TONER;
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export class StadiaImageryTileProvider extends ImageryTileProvider {
|
|
24
|
+
/**
|
|
25
|
+
* @param {object} options 配置选项
|
|
26
|
+
* @param {string} [options.style] 地图样式,支持 {@link mapViewConstants.STADIA_MAP_STYLE_STAMEN_WATERCOLOR}、{@link mapViewConstants.STADIA_MAP_STYLE_STAMEN_TONER}、{@link mapViewConstants.STADIA_MAP_STYLE_ALIDE_SMOOTH}、{@link mapViewConstants.STADIA_MAP_STYLE_ALIDE_SMOOTH_DARK}、{@link mapViewConstants.STADIA_MAP_STYLE_OUTDOORS},默认为 {@link mapViewConstants.STADIA_MAP_STYLE_STAMEN_WATERCOLOR}
|
|
27
|
+
*/
|
|
28
|
+
constructor(options?: {
|
|
29
|
+
style?: string | undefined;
|
|
30
|
+
});
|
|
31
|
+
/**
|
|
32
|
+
* 瓦片提供者名称
|
|
33
|
+
* @readonly
|
|
34
|
+
*/
|
|
35
|
+
readonly name: "StadiaImageryTileProvider";
|
|
36
|
+
/**
|
|
37
|
+
* 支持的投影方式
|
|
38
|
+
* @private
|
|
39
|
+
*/
|
|
40
|
+
private _supportedTargetProjectionNames;
|
|
41
|
+
/**
|
|
42
|
+
* 默认起始缩放级别
|
|
43
|
+
* @private
|
|
44
|
+
*/
|
|
45
|
+
private _defaultStartLevel;
|
|
46
|
+
/**
|
|
47
|
+
* 默认最大缩放级别
|
|
48
|
+
* @private
|
|
49
|
+
*/
|
|
50
|
+
private _defaultMaxLevel;
|
|
51
|
+
_style: string;
|
|
52
|
+
_replaceStr: {
|
|
53
|
+
x: string;
|
|
54
|
+
y: string;
|
|
55
|
+
z: string;
|
|
56
|
+
reverseY: string;
|
|
57
|
+
};
|
|
58
|
+
set style(style: string);
|
|
59
|
+
/**
|
|
60
|
+
* 获取或设置地图样式
|
|
61
|
+
* @type {string}
|
|
62
|
+
*/
|
|
63
|
+
get style(): string;
|
|
64
|
+
/**
|
|
65
|
+
* 获取瓦片URL
|
|
66
|
+
* @internal
|
|
67
|
+
* @param {number} z 缩放级别
|
|
68
|
+
* @param {number} x 瓦片X坐标
|
|
69
|
+
* @param {number} y 瓦片Y坐标
|
|
70
|
+
* @param {object} tile 瓦片对象
|
|
71
|
+
* @returns {string|boolean} 瓦片URL,如果缩放级别为0则返回false
|
|
72
|
+
*/
|
|
73
|
+
getTileURL(z: number, x: number, y: number, tile: object): string | boolean;
|
|
74
|
+
}
|
|
75
|
+
import { ImageryTileProvider } from './ImageryTileProvider';
|
|
@@ -1,11 +1,43 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WMS影像瓦片提供者,用于加载和渲染WMS服务的影像瓦片数据。
|
|
3
|
+
* 支持Web墨卡托和地理坐标两种投影方式。
|
|
4
|
+
*
|
|
5
|
+
* 主要功能:
|
|
6
|
+
* - 支持WMS 1.1.1和1.3.0版本
|
|
7
|
+
* - 支持多种投影系统
|
|
8
|
+
* - 自动处理BBOX坐标顺序
|
|
9
|
+
* - 支持透明度和样式设置
|
|
10
|
+
* - 支持不同服务器类型的HiDPI处理
|
|
11
|
+
*
|
|
12
|
+
* @category MapView
|
|
13
|
+
* @example
|
|
14
|
+
* ```javascript
|
|
15
|
+
* // 创建WMS影像瓦片提供者
|
|
16
|
+
* const provider = new WMSImageryTileProvider({
|
|
17
|
+
* url: 'https://example.com/geoserver/wms',
|
|
18
|
+
* params: {
|
|
19
|
+
* LAYERS: 'layer1,layer2',
|
|
20
|
+
* SRS: 'EPSG:3857',
|
|
21
|
+
* VERSION: '1.1.0',
|
|
22
|
+
* },
|
|
23
|
+
* });
|
|
24
|
+
* ```
|
|
25
|
+
*/
|
|
1
26
|
export class WMSImageryTileProvider extends ImageryTileProvider {
|
|
2
|
-
constructor(options
|
|
27
|
+
constructor(options?: {});
|
|
28
|
+
name: string;
|
|
3
29
|
/** @private */
|
|
4
30
|
private _supportedTargetProjectionNames;
|
|
5
31
|
/** @private */
|
|
6
32
|
private _defaultMaxLevel;
|
|
7
33
|
/** @private */
|
|
8
34
|
private _url;
|
|
35
|
+
/** @private */
|
|
36
|
+
private _serverType;
|
|
37
|
+
/** @private */
|
|
38
|
+
private _hidpi;
|
|
39
|
+
/** @private */
|
|
40
|
+
private _devicePixelRatio;
|
|
9
41
|
_replaceStr: {
|
|
10
42
|
x: string;
|
|
11
43
|
y: string;
|
|
@@ -15,17 +47,78 @@ export class WMSImageryTileProvider extends ImageryTileProvider {
|
|
|
15
47
|
};
|
|
16
48
|
_baseUrl: any;
|
|
17
49
|
_params: any;
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
50
|
+
/**
|
|
51
|
+
* 设置WMS参数
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
54
|
+
private _setWmsParams;
|
|
55
|
+
/**
|
|
56
|
+
* 获取HiDPI参数
|
|
57
|
+
* @private
|
|
58
|
+
*/
|
|
59
|
+
private getHiDPIParams;
|
|
60
|
+
/**
|
|
61
|
+
* 获取大写键名的参数对象
|
|
62
|
+
* @param {Object} obj 参数对象
|
|
63
|
+
* @returns {Object} 大写键名的参数对象
|
|
64
|
+
* @private
|
|
65
|
+
*/
|
|
66
|
+
private _getUppercaseKeys;
|
|
67
|
+
/**
|
|
68
|
+
* 标准化投影名称
|
|
69
|
+
* @param {string} projectionName 投影名称
|
|
70
|
+
* @returns {string} 标准化后的投影名称
|
|
71
|
+
* @private
|
|
72
|
+
*/
|
|
73
|
+
private _normalizeProjectionName;
|
|
74
|
+
/**
|
|
75
|
+
* 比较版本号
|
|
76
|
+
* @param {string} version1 版本1
|
|
77
|
+
* @param {string} version2 版本2
|
|
78
|
+
* @returns {number} 比较结果:-1(version1<version2), 0(version1=version2), 1(version1>version2)
|
|
79
|
+
* @private
|
|
80
|
+
*/
|
|
81
|
+
private _compareVersions;
|
|
82
|
+
/**
|
|
83
|
+
* 格式化BBOX字符串
|
|
84
|
+
* @param {Object} boundingBox 边界框对象
|
|
85
|
+
* @param {boolean} isGeo 是否为地理坐标
|
|
86
|
+
* @param {string} version WMS版本
|
|
87
|
+
* @returns {string} 格式化的BBOX字符串
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
private _formatBbox;
|
|
91
|
+
/**
|
|
92
|
+
* 拼接params到url
|
|
93
|
+
* @param {string} uri 基础URL
|
|
94
|
+
* @param {Object} params 参数对象
|
|
95
|
+
* @returns {string} 拼接后的URL
|
|
96
|
+
*/
|
|
97
|
+
appendParams(uri: string, params: Object): string;
|
|
98
|
+
/**
|
|
99
|
+
* 解析URL参数
|
|
100
|
+
* @param {string} url URL字符串
|
|
101
|
+
* @returns {Object} 参数对象
|
|
102
|
+
*/
|
|
103
|
+
getUrlParams(url: string): Object;
|
|
104
|
+
/**
|
|
105
|
+
* 获取瓦片URL
|
|
106
|
+
* @param {number} z 缩放级别
|
|
107
|
+
* @param {number} x 瓦片X坐标
|
|
108
|
+
* @param {number} y 瓦片Y坐标
|
|
109
|
+
* @param {Object} tile 瓦片对象
|
|
110
|
+
* @returns {string} 瓦片URL
|
|
111
|
+
*/
|
|
112
|
+
getTileURL(z: number, x: number, y: number, tile: Object): string;
|
|
113
|
+
/**
|
|
114
|
+
* 设置WMS参数
|
|
115
|
+
* @param {Object} params 新的参数对象
|
|
116
|
+
*/
|
|
117
|
+
setParams(params: Object): void;
|
|
118
|
+
/**
|
|
119
|
+
* 获取当前WMS参数
|
|
120
|
+
* @returns {Object} 当前参数对象
|
|
121
|
+
*/
|
|
122
|
+
getParams(): Object;
|
|
30
123
|
}
|
|
31
124
|
import { ImageryTileProvider } from './ImageryTileProvider';
|
|
@@ -1,11 +1,66 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* WMTS影像瓦片提供者,用于加载和渲染WMTS服务的影像瓦片数据。
|
|
3
|
+
* 支持Web墨卡托和地理坐标两种投影方式。
|
|
4
|
+
*
|
|
5
|
+
* 主要功能:
|
|
6
|
+
* - 支持WMTS 1.0.0版本
|
|
7
|
+
* - 支持多种投影系统和TileMatrixSet
|
|
8
|
+
* - 自动处理瓦片坐标转换
|
|
9
|
+
* - 支持透明度和样式设置
|
|
10
|
+
* - 支持不同服务器类型的HiDPI处理
|
|
11
|
+
* - 支持RESTful和KVP两种请求方式
|
|
12
|
+
* - 支持自定义瓦片矩阵ID映射
|
|
13
|
+
*
|
|
14
|
+
* @category MapView
|
|
15
|
+
* @example
|
|
16
|
+
* ```javascript
|
|
17
|
+
* // 创建WMTS影像瓦片提供者 - 使用默认TILEMATRIX模板
|
|
18
|
+
* const provider1 = new WMTSImageryTileProvider({
|
|
19
|
+
* url: 'https://example.com/geoserver/gwc/service/wmts',
|
|
20
|
+
* params: {
|
|
21
|
+
* LAYER: 'layer1',
|
|
22
|
+
* TILEMATRIXSET: 'EPSG:900913',
|
|
23
|
+
* TILEMATRIX: 'EPSG:900913:{z}',
|
|
24
|
+
* VERSION: '1.0.0',
|
|
25
|
+
* },
|
|
26
|
+
* });
|
|
27
|
+
*
|
|
28
|
+
* // 创建WMTS影像瓦片提供者 - 使用自定义matrixIds
|
|
29
|
+
* const provider2 = new WMTSImageryTileProvider({
|
|
30
|
+
* url: 'https://example.com/geoserver/gwc/service/wmts',
|
|
31
|
+
* params: {
|
|
32
|
+
* LAYER: 'layer1',
|
|
33
|
+
* TILEMATRIXSET: 'EPSG:3857',
|
|
34
|
+
* VERSION: '1.0.0',
|
|
35
|
+
* },
|
|
36
|
+
* matrixIds: ['EPSG:3857:0', 'EPSG:3857:1', 'EPSG:3857:2'],
|
|
37
|
+
* });
|
|
38
|
+
*
|
|
39
|
+
* // 创建WMTS影像瓦片提供者 - 使用REST请求方式
|
|
40
|
+
* const provider3 = new WMTSImageryTileProvider({
|
|
41
|
+
* url: 'https://example.com/wmts/{layer}/{style}/{tilematrixset}/{tilematrix}/{tilerow}/{tilecol}.png',
|
|
42
|
+
* params: {
|
|
43
|
+
* LAYER: 'layer1',
|
|
44
|
+
* STYLE: 'default',
|
|
45
|
+
* TILEMATRIXSET: 'EPSG:3857',
|
|
46
|
+
* },
|
|
47
|
+
* requestEncoding: 'REST',
|
|
48
|
+
* });
|
|
49
|
+
* ```
|
|
50
|
+
*/
|
|
1
51
|
export class WMTSImageryTileProvider extends ImageryTileProvider {
|
|
2
|
-
constructor(options
|
|
52
|
+
constructor(options?: {});
|
|
53
|
+
name: string;
|
|
3
54
|
/** @private */
|
|
4
55
|
private _supportedTargetProjectionNames;
|
|
5
56
|
/** @private */
|
|
6
57
|
private _defaultMaxLevel;
|
|
7
58
|
/** @private */
|
|
8
59
|
private _url;
|
|
60
|
+
/** @private */
|
|
61
|
+
private _requestEncoding;
|
|
62
|
+
/** @private */
|
|
63
|
+
private _matrixIds;
|
|
9
64
|
_replaceStr: {
|
|
10
65
|
x: string;
|
|
11
66
|
y: string;
|
|
@@ -14,19 +69,63 @@ export class WMTSImageryTileProvider extends ImageryTileProvider {
|
|
|
14
69
|
};
|
|
15
70
|
_baseUrl: any;
|
|
16
71
|
_params: any;
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
72
|
+
/**
|
|
73
|
+
* 设置WMTS参数
|
|
74
|
+
* @private
|
|
75
|
+
*/
|
|
76
|
+
private _setWmtsParams;
|
|
77
|
+
/**
|
|
78
|
+
* 获取大写键名的参数对象
|
|
79
|
+
* @param {Object} obj 参数对象
|
|
80
|
+
* @returns {Object} 大写键名的参数对象
|
|
81
|
+
* @private
|
|
82
|
+
*/
|
|
83
|
+
private _getUppercaseKeys;
|
|
84
|
+
/**
|
|
85
|
+
* 标准化投影名称
|
|
86
|
+
* @param {string} projectionName 投影名称
|
|
87
|
+
* @returns {string} 标准化后的投影名称
|
|
88
|
+
* @private
|
|
89
|
+
*/
|
|
90
|
+
private _normalizeProjectionName;
|
|
91
|
+
/**
|
|
92
|
+
* 拼接params到url
|
|
93
|
+
* @param {string} uri 基础URL
|
|
94
|
+
* @param {Object} params 参数对象
|
|
95
|
+
* @returns {string} 拼接后的URL
|
|
96
|
+
*/
|
|
97
|
+
appendParams(uri: string, params: Object): string;
|
|
98
|
+
/**
|
|
99
|
+
* 解析URL参数
|
|
100
|
+
* @param {string} url URL字符串
|
|
101
|
+
* @returns {Object} 参数对象
|
|
102
|
+
*/
|
|
103
|
+
getUrlParams(url: string): Object;
|
|
104
|
+
/**
|
|
105
|
+
* 获取瓦片URL
|
|
106
|
+
* @param {number} z 缩放级别
|
|
107
|
+
* @param {number} x 瓦片X坐标
|
|
108
|
+
* @param {number} y 瓦片Y坐标
|
|
109
|
+
* @param {Object} tile 瓦片对象
|
|
110
|
+
* @returns {string} 瓦片URL
|
|
111
|
+
*/
|
|
112
|
+
getTileURL(z: number, x: number, y: number, tile: Object): string;
|
|
113
|
+
/**
|
|
114
|
+
* 获取TILEMATRIX值
|
|
115
|
+
* @param {number} z 缩放级别
|
|
116
|
+
* @returns {string|number} TILEMATRIX值
|
|
117
|
+
* @private
|
|
118
|
+
*/
|
|
119
|
+
private _getTileMatrixValue;
|
|
120
|
+
/**
|
|
121
|
+
* 设置WMTS参数
|
|
122
|
+
* @param {Object} params 新的参数对象
|
|
123
|
+
*/
|
|
124
|
+
setParams(params: Object): void;
|
|
125
|
+
/**
|
|
126
|
+
* 获取当前WMTS参数
|
|
127
|
+
* @returns {Object} 当前参数对象
|
|
128
|
+
*/
|
|
129
|
+
getParams(): Object;
|
|
31
130
|
}
|
|
32
131
|
import { ImageryTileProvider } from './ImageryTileProvider';
|
|
@@ -1,16 +1,63 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* XYZ影像瓦片提供者,用于加载和渲染符合XYZ瓦片规范的影像瓦片数据。
|
|
3
|
+
* 支持Web墨卡托和地理坐标两种投影方式,兼容标准的XYZ瓦片服务。
|
|
4
|
+
*
|
|
5
|
+
* 主要功能:
|
|
6
|
+
* - 支持标准XYZ瓦片服务
|
|
7
|
+
* - 支持Web墨卡托和地理坐标投影
|
|
8
|
+
* - 自动处理Y坐标反转(TMS vs Google瓦片规范)
|
|
9
|
+
* - 支持自定义瓦片URL模板
|
|
10
|
+
*
|
|
11
|
+
* @category MapView
|
|
12
|
+
* @example
|
|
13
|
+
* ```javascript
|
|
14
|
+
* // 创建XYZ影像瓦片提供者(Web墨卡托投影)
|
|
15
|
+
* const provider = new mapvthree.XYZImageryTileProvider({
|
|
16
|
+
* url: 'https://tile.openstreetmap.org/{z}/{x}/{y}.png',
|
|
17
|
+
* projection: mapvthree.constants.PROJECTION_WEB_MERCATOR
|
|
18
|
+
* });
|
|
19
|
+
*
|
|
20
|
+
* // 创建XYZ影像瓦片提供者(地理坐标投影)
|
|
21
|
+
* const geoProvider = new mapvthree.XYZImageryTileProvider({
|
|
22
|
+
* url: 'https://example.com/tiles/{z}/{x}/{y}.png',
|
|
23
|
+
* projection: mapvthree.constants.PROJECTION_GEO
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
1
27
|
export class XYZImageryTileProvider extends ImageryTileProvider {
|
|
2
|
-
|
|
3
|
-
|
|
28
|
+
/**
|
|
29
|
+
* @param {object} options 配置选项
|
|
30
|
+
* @param {string} options.url 瓦片URL模板,必须包含 {x}、{y}或{reverseY}、{z} 占位符
|
|
31
|
+
* @param {string} [options.projection] 投影方式,支持 {@link PROJECTION_WEB_MERCATOR} 和
|
|
32
|
+
* {@link PROJECTION_GEO},默认为 {@link PROJECTION_WEB_MERCATOR}
|
|
33
|
+
* @param {number} [options.maxLevel] 最大缩放级别,默认为18
|
|
34
|
+
*/
|
|
35
|
+
constructor(options: {
|
|
36
|
+
url: string;
|
|
37
|
+
projection?: string | undefined;
|
|
38
|
+
maxLevel?: number | undefined;
|
|
39
|
+
});
|
|
40
|
+
/**
|
|
41
|
+
* 瓦片提供者名称
|
|
42
|
+
* @readonly
|
|
43
|
+
*/
|
|
44
|
+
readonly name: "XYZImageryTileProvider";
|
|
45
|
+
/**
|
|
46
|
+
* 支持的投影方式
|
|
47
|
+
* @private
|
|
48
|
+
*/
|
|
4
49
|
private _supportedTargetProjectionNames;
|
|
5
|
-
/**
|
|
50
|
+
/**
|
|
51
|
+
* 瓦片URL模板
|
|
52
|
+
* @private
|
|
53
|
+
*/
|
|
6
54
|
private _url;
|
|
7
55
|
_replaceStr: {
|
|
8
56
|
x: string;
|
|
9
|
-
y: string;
|
|
10
57
|
z: string;
|
|
58
|
+
y: string;
|
|
11
59
|
reverseY: string;
|
|
12
60
|
};
|
|
13
|
-
_defaultXYZProjectionName:
|
|
14
|
-
getTileURL(z: any, x: any, y: any, tile: any): any;
|
|
61
|
+
_defaultXYZProjectionName: string;
|
|
15
62
|
}
|
|
16
63
|
import { ImageryTileProvider } from './ImageryTileProvider';
|
|
@@ -21,4 +21,4 @@ export class ImageryReprojector {
|
|
|
21
21
|
export namespace ImageryReprojector {
|
|
22
22
|
let DEFAULT: ImageryReprojector;
|
|
23
23
|
}
|
|
24
|
-
import { ImageryReprojectMaterial } from '
|
|
24
|
+
import { ImageryReprojectMaterial } from '../../material/ImageryReprojectMaterial';
|