@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
|
@@ -1,27 +1,171 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 百度路况瓦片提供者,用于加载和渲染百度地图的路况数据。
|
|
3
|
+
* 支持在线和离线两种模式,可以处理多种投影方式。
|
|
4
|
+
*
|
|
5
|
+
* 主要功能:
|
|
6
|
+
* - 支持百度地图在线路况瓦片加载
|
|
7
|
+
* - 支持DuGIS离线环境的路况瓦片加载
|
|
8
|
+
* - 支持多种投影方式(Web墨卡托、百度墨卡托)
|
|
9
|
+
* - 支持路况数据的自动刷新,可配置关闭
|
|
10
|
+
* - 支持路况线条的样式配置
|
|
11
|
+
*
|
|
12
|
+
* @category MapView
|
|
13
|
+
* @example
|
|
14
|
+
* ```javascript
|
|
15
|
+
* // 创建在线路况瓦片提供者
|
|
16
|
+
* const provider = new BaiduTrafficTileProvider({
|
|
17
|
+
* autoRefresh: true,
|
|
18
|
+
* refreshInterval: 60000
|
|
19
|
+
* });
|
|
20
|
+
*
|
|
21
|
+
* // 创建离线路况瓦片提供者
|
|
22
|
+
* const offlineProvider = new BaiduTrafficTileProvider({
|
|
23
|
+
* isOffline: true,
|
|
24
|
+
* url: 'http://offline-traffic-server',
|
|
25
|
+
* projection: 'mapvthree.PROJECTION_WEB_MERCATOR'
|
|
26
|
+
* });
|
|
27
|
+
* ```
|
|
28
|
+
*/
|
|
1
29
|
export class BaiduTrafficTileProvider extends VectorTileProvider {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
30
|
+
/**
|
|
31
|
+
* @param {object} options 配置选项
|
|
32
|
+
* @param {string} [options.url] 离线模式下的路况服务器地址
|
|
33
|
+
* @param {object} [options.params] 请求参数
|
|
34
|
+
* @param {boolean} [options.isOffline=false] 是否为离线模式
|
|
35
|
+
* @param {string} [options.projection] 离线模式下的投影方式,默认为'mapvthree.PROJECTION_WEB_MERCATOR'
|
|
36
|
+
* @param {boolean} [options.autoRefresh=true] 是否启用自动刷新
|
|
37
|
+
* @param {number} [options.refreshInterval=60000] 自动刷新间隔,单位毫秒,最小60秒
|
|
38
|
+
* @param {object} [options.colors] 路况颜色配置
|
|
39
|
+
* @param {number} [options.lineWidth] 路况线条宽度
|
|
40
|
+
*/
|
|
41
|
+
constructor(options?: {
|
|
42
|
+
url?: string | undefined;
|
|
43
|
+
params?: object | undefined;
|
|
44
|
+
isOffline?: boolean | undefined;
|
|
45
|
+
projection?: string | undefined;
|
|
46
|
+
autoRefresh?: boolean | undefined;
|
|
47
|
+
refreshInterval?: number | undefined;
|
|
48
|
+
colors?: object | undefined;
|
|
49
|
+
lineWidth?: number | undefined;
|
|
50
|
+
});
|
|
51
|
+
/**
|
|
52
|
+
* 瓦片提供者名称
|
|
53
|
+
* @readonly
|
|
54
|
+
*/
|
|
55
|
+
readonly name: "BaiduTrafficTileProvider";
|
|
56
|
+
/**
|
|
57
|
+
* 是否为百度地图提供者
|
|
58
|
+
* @readonly
|
|
59
|
+
*/
|
|
60
|
+
readonly isBaiduProvider: true;
|
|
61
|
+
/** @private */ private _defaultStartLevel;
|
|
62
|
+
/** @private */ private _defaultMaxLevel;
|
|
63
|
+
_options: {
|
|
64
|
+
url?: string | undefined;
|
|
65
|
+
params?: object | undefined;
|
|
66
|
+
isOffline?: boolean | undefined;
|
|
67
|
+
projection?: string | undefined;
|
|
68
|
+
autoRefresh?: boolean | undefined;
|
|
69
|
+
refreshInterval?: number | undefined;
|
|
70
|
+
colors?: object | undefined;
|
|
71
|
+
lineWidth?: number | undefined;
|
|
72
|
+
};
|
|
73
|
+
_url: string | undefined;
|
|
74
|
+
params: object | undefined;
|
|
75
|
+
_isOffline: boolean | undefined;
|
|
76
|
+
_autoRefresh: any;
|
|
77
|
+
_refreshInterval: any;
|
|
78
|
+
_refreshTimer: number | null;
|
|
12
79
|
_sourceProjectionName: any;
|
|
13
80
|
_isWebMercator: boolean;
|
|
14
81
|
_defaultMinLevel: number;
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
82
|
+
/**
|
|
83
|
+
* 异步初始化方法
|
|
84
|
+
* @protected
|
|
85
|
+
*/
|
|
86
|
+
protected _asyncInit(): Promise<void>;
|
|
87
|
+
/**
|
|
88
|
+
* 设置自动刷新间隔
|
|
89
|
+
* @param {number} interval 刷新间隔,单位毫秒,最小60000ms
|
|
90
|
+
*/
|
|
91
|
+
set refreshInterval(interval: number);
|
|
92
|
+
/**
|
|
93
|
+
* 自动刷新间隔
|
|
94
|
+
* @type {number}
|
|
95
|
+
*/
|
|
96
|
+
get refreshInterval(): number;
|
|
97
|
+
/**
|
|
98
|
+
* 获取瓦片URL
|
|
99
|
+
* @param {number} z 缩放级别
|
|
100
|
+
* @param {number} x 瓦片X坐标
|
|
101
|
+
* @param {number} y 瓦片Y坐标
|
|
102
|
+
* @param {object} tile 瓦片对象
|
|
103
|
+
* @returns {string} 瓦片URL
|
|
104
|
+
*/
|
|
105
|
+
getTileURL(z: number, x: number, y: number, tile: object): string;
|
|
106
|
+
/**
|
|
107
|
+
* 获取在线瓦片URL
|
|
108
|
+
* @param {number} z 缩放级别
|
|
109
|
+
* @param {number} x 瓦片X坐标
|
|
110
|
+
* @param {number} y 瓦片Y坐标
|
|
111
|
+
* @param {object} tile 瓦片对象
|
|
112
|
+
* @returns {string} 瓦片URL
|
|
113
|
+
* @private
|
|
114
|
+
*/
|
|
115
|
+
private _getOnlineTileURL;
|
|
116
|
+
/**
|
|
117
|
+
* 获取离线瓦片URL
|
|
118
|
+
* @param {number} z 缩放级别
|
|
119
|
+
* @param {number} x 瓦片X坐标
|
|
120
|
+
* @param {number} y 瓦片Y坐标
|
|
121
|
+
* @param {object} tile 瓦片对象
|
|
122
|
+
* @returns {string} 瓦片URL
|
|
123
|
+
* @private
|
|
124
|
+
*/
|
|
125
|
+
private _getOfflineTileURL;
|
|
126
|
+
/**
|
|
127
|
+
* 获取WebWorker选项
|
|
128
|
+
* @internal
|
|
129
|
+
* @returns {object} 工作者选项
|
|
130
|
+
*/
|
|
131
|
+
getWorkerOptions(): object;
|
|
132
|
+
/**
|
|
133
|
+
* 请求矢量瓦片数据
|
|
134
|
+
* @internal
|
|
135
|
+
* @param {object} tile 瓦片对象
|
|
136
|
+
* @returns {Promise<Array<Group>>} 包含瓦片数据的Group对象数组
|
|
137
|
+
*/
|
|
138
|
+
doRequestVectorTileData(tile: object): Promise<Array<Group>>;
|
|
139
|
+
/**
|
|
140
|
+
* 启动自动刷新
|
|
141
|
+
* @private
|
|
142
|
+
*/
|
|
143
|
+
private _startAutoRefresh;
|
|
144
|
+
/**
|
|
145
|
+
* 停止自动刷新
|
|
146
|
+
* @private
|
|
147
|
+
*/
|
|
148
|
+
private _stopAutoRefresh;
|
|
149
|
+
/**
|
|
150
|
+
* 设置是否启用自动刷新
|
|
151
|
+
* @param {boolean} enabled 是否启用
|
|
152
|
+
*/
|
|
153
|
+
set autoRefresh(enabled: boolean);
|
|
154
|
+
/**
|
|
155
|
+
* 是否启用自动刷新
|
|
156
|
+
* @type {boolean}
|
|
157
|
+
*/
|
|
158
|
+
get autoRefresh(): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* 销毁资源
|
|
161
|
+
* @protected
|
|
162
|
+
*/
|
|
163
|
+
protected dispose(): void;
|
|
164
|
+
/**
|
|
165
|
+
* 瓦片销毁时的回调
|
|
166
|
+
* @param {object} tile 瓦片对象
|
|
167
|
+
* @protected
|
|
168
|
+
*/
|
|
169
|
+
protected onTileDispose(tile: object): void;
|
|
25
170
|
}
|
|
26
171
|
import { VectorTileProvider } from './VectorTileProvider';
|
|
27
|
-
import { AsyncDataTileLoader } from '../AsyncDataTileLoader';
|
|
@@ -76,6 +76,7 @@ export class BaiduVectorTileProvider extends VectorTileProvider {
|
|
|
76
76
|
/** @private */ private _defaultStartLevel;
|
|
77
77
|
/** @private */ private _defaultMaxLevel;
|
|
78
78
|
/** @private */ private _labels;
|
|
79
|
+
/** @private */ private _ak;
|
|
79
80
|
_displayOptions: {
|
|
80
81
|
base?: boolean | undefined;
|
|
81
82
|
link?: boolean | undefined;
|
|
@@ -91,6 +92,7 @@ export class BaiduVectorTileProvider extends VectorTileProvider {
|
|
|
91
92
|
_staticUrl: string | undefined;
|
|
92
93
|
_sourceProjectionName: any;
|
|
93
94
|
_isWebMercator: boolean;
|
|
95
|
+
sourceCoordType: string | undefined;
|
|
94
96
|
_defaultMinLevel: number;
|
|
95
97
|
/**
|
|
96
98
|
* 设置地图样式,通过 https://lbsyun.baidu.com/index.php?title=open/custom 获取个性化样式配置
|
|
@@ -152,7 +154,7 @@ export class BaiduVectorTileProvider extends VectorTileProvider {
|
|
|
152
154
|
* @param {object} tile 瓦片对象
|
|
153
155
|
* @returns {Promise<Group>} 包含瓦片数据的Group对象
|
|
154
156
|
*/
|
|
155
|
-
|
|
157
|
+
doRequestVectorTileData(tile: object): Promise<Group>;
|
|
156
158
|
_calculateTolerance(surfaceTile: any, engine: any, label: any): number;
|
|
157
159
|
/**
|
|
158
160
|
* 添加POI标签
|
|
@@ -29,7 +29,7 @@ export class GeoJSONVectorTileProvider extends VectorTileProvider {
|
|
|
29
29
|
* @param {object} tile 瓦片对象
|
|
30
30
|
* @returns {Promise<Group>} 包含瓦片数据的Group对象
|
|
31
31
|
*/
|
|
32
|
-
|
|
32
|
+
doRequestVectorTileData(tile: object): Promise<Group>;
|
|
33
33
|
}
|
|
34
34
|
import { VectorTileProvider } from './VectorTileProvider';
|
|
35
35
|
import { AsyncDataTileLoader } from '../AsyncDataTileLoader';
|
|
@@ -1,41 +1,176 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* HD路况瓦片提供者,用于加载和渲染高精地图的路况数据。
|
|
3
|
+
* 支持在线路况瓦片加载和实时数据刷新。
|
|
4
|
+
*
|
|
5
|
+
* 主要功能:
|
|
6
|
+
* - 支持高精地图路况瓦片加载
|
|
7
|
+
* - 支持多种投影方式(Web墨卡托、ECEF)
|
|
8
|
+
* - 支持路况数据的自动刷新,可配置关闭
|
|
9
|
+
* - 支持路况线条的样式配置
|
|
10
|
+
* - 支持通过API接口实时更新路况状态
|
|
11
|
+
*
|
|
12
|
+
* @category MapView
|
|
13
|
+
* @example
|
|
14
|
+
* ```javascript
|
|
15
|
+
* // 创建HD路况瓦片提供者
|
|
16
|
+
* const provider = new HDTrafficTileProvider({
|
|
17
|
+
* url: 'https://traffic-api.example.com/tiles/{z}/{x}/{reverseY}.json',
|
|
18
|
+
* apiHost: 'https://api.example.com',
|
|
19
|
+
* autoRefresh: true,
|
|
20
|
+
* refreshInterval: 60000
|
|
21
|
+
* });
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
1
24
|
export class HDTrafficTileProvider extends VectorTileProvider {
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
25
|
+
/**
|
|
26
|
+
* @param {object} options 配置选项
|
|
27
|
+
* @param {string} options.url 路况几何数据的地址,支持{x}、{y}、{z}、{reverseY}占位符
|
|
28
|
+
* @param {string} options.apiHost 路况几何对应状态的服务地址
|
|
29
|
+
* @param {boolean} [options.autoRefresh=true] 是否启用自动刷新
|
|
30
|
+
* @param {number} [options.refreshInterval=60000] 自动刷新间隔,单位毫秒,最小60秒
|
|
31
|
+
*/
|
|
32
|
+
constructor(options?: {
|
|
33
|
+
url: string;
|
|
34
|
+
apiHost: string;
|
|
35
|
+
autoRefresh?: boolean | undefined;
|
|
36
|
+
refreshInterval?: number | undefined;
|
|
37
|
+
});
|
|
38
|
+
/**
|
|
39
|
+
* 瓦片提供者名称
|
|
40
|
+
* @readonly
|
|
41
|
+
*/
|
|
42
|
+
readonly name: "HDTrafficTileProvider";
|
|
43
|
+
/** @private */ private _supportedTargetProjectionNames;
|
|
44
|
+
/** @private */ private _defaultMinLevel;
|
|
45
|
+
/** @private */ private _defaultMaxLevel;
|
|
46
|
+
/** @private */ private _trafficLinks;
|
|
47
|
+
_url: string;
|
|
48
|
+
_apiHost: string;
|
|
49
|
+
_options: {
|
|
50
|
+
url: string;
|
|
51
|
+
apiHost: string;
|
|
52
|
+
autoRefresh?: boolean | undefined;
|
|
53
|
+
refreshInterval?: number | undefined;
|
|
54
|
+
};
|
|
55
|
+
_autoRefresh: any;
|
|
56
|
+
_refreshInterval: any;
|
|
57
|
+
_refreshTimer: number | null;
|
|
14
58
|
_replaceStr: {
|
|
15
59
|
x: string;
|
|
16
60
|
y: string;
|
|
17
61
|
z: string;
|
|
18
62
|
reverseY: string;
|
|
19
63
|
};
|
|
20
|
-
|
|
64
|
+
/**
|
|
65
|
+
* 异步初始化方法
|
|
66
|
+
* @protected
|
|
67
|
+
*/
|
|
68
|
+
protected _asyncInit(): Promise<void>;
|
|
21
69
|
_dataLoader: AsyncDataTileLoader | undefined;
|
|
22
|
-
getTileURL(z: any, x: any, y: any, tile: any): any;
|
|
23
|
-
getWorkerOptions(tile: any): {};
|
|
24
|
-
doRequestTileData(tile: any): Promise<any>;
|
|
25
|
-
onSurfaceTileRefresh(surfaceTile: any): void;
|
|
26
|
-
refreshTile(surfaceTile: any): Promise<void>;
|
|
27
|
-
_request(data: any): Promise<any>;
|
|
28
70
|
/**
|
|
71
|
+
* 设置自动刷新间隔
|
|
72
|
+
* @param {number} interval 刷新间隔,单位毫秒,最小60秒
|
|
73
|
+
*/
|
|
74
|
+
set refreshInterval(interval: number);
|
|
75
|
+
/**
|
|
76
|
+
* 自动刷新间隔
|
|
77
|
+
* @type {number}
|
|
78
|
+
*/
|
|
79
|
+
get refreshInterval(): number;
|
|
80
|
+
/**
|
|
81
|
+
* 获取瓦片URL
|
|
82
|
+
* @param {number} z 缩放级别
|
|
83
|
+
* @param {number} x 瓦片X坐标
|
|
84
|
+
* @param {number} y 瓦片Y坐标
|
|
85
|
+
* @param {object} tile 瓦片对象
|
|
86
|
+
* @returns {string} 瓦片URL
|
|
87
|
+
*/
|
|
88
|
+
getTileURL(z: number, x: number, y: number, tile: object): string;
|
|
89
|
+
/**
|
|
90
|
+
* 获取WebWorker选项
|
|
91
|
+
* @internal
|
|
92
|
+
* @param {object} tile 瓦片对象
|
|
93
|
+
* @returns {object} 工作者选项
|
|
94
|
+
*/
|
|
95
|
+
getWorkerOptions(tile: object): object;
|
|
96
|
+
/**
|
|
97
|
+
* 请求矢量瓦片数据
|
|
98
|
+
* @internal
|
|
99
|
+
* @param {object} tile 瓦片对象
|
|
100
|
+
* @returns {Promise<Mesh>} 包含瓦片数据的Mesh对象
|
|
101
|
+
*/
|
|
102
|
+
doRequestVectorTileData(tile: object): Promise<Mesh>;
|
|
103
|
+
/**
|
|
104
|
+
* SurfaceTile数据刷新回调
|
|
105
|
+
* @param {object} surfaceTile SurfaceTile对象
|
|
106
|
+
*/
|
|
107
|
+
onSurfaceTileRefresh(surfaceTile: object): void;
|
|
108
|
+
/**
|
|
109
|
+
* 刷新SurfaceTile数据
|
|
110
|
+
* @param {object} surfaceTile SurfaceTile对象
|
|
111
|
+
*/
|
|
112
|
+
refreshTile(surfaceTile: object): Promise<void>;
|
|
113
|
+
/**
|
|
114
|
+
* 发送API请求
|
|
115
|
+
* @param {object} data 请求数据
|
|
116
|
+
* @returns {Promise<object>} 响应结果
|
|
117
|
+
* @private
|
|
118
|
+
*/
|
|
119
|
+
private _request;
|
|
120
|
+
/**
|
|
121
|
+
* 启动自动刷新
|
|
122
|
+
* @private
|
|
123
|
+
*/
|
|
124
|
+
private _startAutoRefresh;
|
|
125
|
+
/**
|
|
126
|
+
* 停止自动刷新
|
|
127
|
+
* @private
|
|
128
|
+
*/
|
|
129
|
+
private _stopAutoRefresh;
|
|
130
|
+
/**
|
|
131
|
+
* SurfaceTile添加回调
|
|
132
|
+
* @param {object} surfaceTile SurfaceTile对象
|
|
133
|
+
* @param {object} engine 引擎实例
|
|
134
|
+
* @protected
|
|
135
|
+
*/
|
|
136
|
+
protected onSurfaceTileAdded(surfaceTile: object, engine: object): void;
|
|
137
|
+
/**
|
|
138
|
+
* SurfaceTile移除回调
|
|
139
|
+
* @param {object} surfaceTile SurfaceTile对象
|
|
140
|
+
* @param {object} engine 引擎实例
|
|
29
141
|
* @protected
|
|
30
142
|
*/
|
|
31
|
-
protected
|
|
143
|
+
protected onSurfaceTileRemoved(surfaceTile: object, engine: object): void;
|
|
144
|
+
/**
|
|
145
|
+
* 切换路况链接可见性
|
|
146
|
+
* @param {boolean} visible 是否可见
|
|
147
|
+
*/
|
|
148
|
+
toggleTrafficLinkVisible(visible: boolean): void;
|
|
149
|
+
/**
|
|
150
|
+
* 设置是否启用自动刷新
|
|
151
|
+
* @param {boolean} enabled 是否启用
|
|
152
|
+
*/
|
|
153
|
+
set autoRefresh(enabled: boolean);
|
|
154
|
+
/**
|
|
155
|
+
* 是否启用自动刷新
|
|
156
|
+
* @type {boolean}
|
|
157
|
+
*/
|
|
158
|
+
get autoRefresh(): boolean;
|
|
159
|
+
/**
|
|
160
|
+
* 设置API服务器地址
|
|
161
|
+
* @param {string} apiHost API服务器地址
|
|
162
|
+
*/
|
|
163
|
+
set apiHost(apiHost: string);
|
|
164
|
+
/**
|
|
165
|
+
* API服务器地址
|
|
166
|
+
* @type {string}
|
|
167
|
+
*/
|
|
168
|
+
get apiHost(): string;
|
|
32
169
|
/**
|
|
170
|
+
* 销毁资源
|
|
33
171
|
* @protected
|
|
34
172
|
*/
|
|
35
|
-
protected
|
|
36
|
-
toggleTrafficLinkVisible(visible: any): void;
|
|
37
|
-
set apiHost(apiHost: any);
|
|
38
|
-
get apiHost(): any;
|
|
173
|
+
protected dispose(): void;
|
|
39
174
|
}
|
|
40
175
|
import { VectorTileProvider } from './VectorTileProvider';
|
|
41
176
|
import { AsyncDataTileLoader } from '../AsyncDataTileLoader';
|