@baidumap/mapv-three 1.2.1 → 1.3.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/markers/mkr_end.png +0 -0
- package/dist/assets/images/markers/mkr_red_1.png +0 -0
- package/dist/assets/images/markers/mkr_red_10.png +0 -0
- package/dist/assets/images/markers/mkr_red_2.png +0 -0
- package/dist/assets/images/markers/mkr_red_3.png +0 -0
- package/dist/assets/images/markers/mkr_red_4.png +0 -0
- package/dist/assets/images/markers/mkr_red_5.png +0 -0
- package/dist/assets/images/markers/mkr_red_6.png +0 -0
- package/dist/assets/images/markers/mkr_red_7.png +0 -0
- package/dist/assets/images/markers/mkr_red_8.png +0 -0
- package/dist/assets/images/markers/mkr_red_9.png +0 -0
- package/dist/assets/images/markers/mkr_start.png +0 -0
- package/dist/assets/images/markers/mkr_transit_airplane.png +0 -0
- package/dist/assets/images/markers/mkr_transit_bus.png +0 -0
- package/dist/assets/images/markers/mkr_transit_car.png +0 -0
- package/dist/assets/images/markers/mkr_transit_subway.png +0 -0
- package/dist/assets/images/markers/mkr_transit_train.png +0 -0
- package/dist/assets/images/markers/mkr_transit_walking.png +0 -0
- package/dist/assets/images/markers/mkr_waypoint.png +0 -0
- package/dist/assets/textures/roadpile/blue.png +0 -0
- package/dist/assets/textures/roadpile/brown.png +0 -0
- package/dist/assets/textures/roadpile/green.png +0 -0
- package/dist/mapvthree.module.js +18772 -16464
- package/dist/mapvthree.umd.js +6 -6
- package/dist/types/index.d.ts +2 -8
- package/dist/types/index.open.d.ts +1 -0
- package/dist/types/threejs/materials/natural/WaterMaterial.d.ts +3 -0
- package/dist/types/threejs/materials/point/Icon.d.ts +1 -0
- package/dist/types/threejs/objects/point/Label.d.ts +3 -0
- package/dist/types/threemap/3dtiles/cesium/Cesium3DTileset.d.ts +5 -0
- package/dist/types/threemap/3dtiles/elements/TileInstancedElementManager.d.ts +98 -0
- package/dist/types/threemap/engine/Rendering.d.ts +0 -2
- package/dist/types/threemap/mapView/configs.d.ts +6 -1
- package/dist/types/threemap/mapView/tileProvider/imagery/Baidu09ImageryTileProvider.d.ts +1 -1
- package/dist/types/threemap/mapView/tileProvider/imagery/TiandituImageryTileProvider.d.ts +1 -1
- package/dist/types/threemap/mapView/tileProvider/imagery/XYZImageryTileProvider.d.ts +1 -1
- package/dist/types/threemap/overlay/DOMOverlay.d.ts +9 -2
- package/dist/types/threemap/overlay/Marker.d.ts +2 -2
- package/dist/types/threemap/services/autoComplete/AutoComplete.d.ts +147 -0
- package/dist/types/threemap/services/autoComplete/AutoComplete_Bd.d.ts +154 -0
- package/dist/types/threemap/services/boundary/Boundary.d.ts +69 -0
- package/dist/types/threemap/services/boundary/Boundary_Bd.d.ts +56 -0
- package/dist/types/threemap/services/boundary/Boundary_Tdt.d.ts +17 -0
- package/dist/types/threemap/services/common/baiduCommon.d.ts +136 -0
- package/dist/types/threemap/services/common/baiduRequest.d.ts +3 -0
- package/dist/types/threemap/services/common/baiduUtils.d.ts +13 -0
- package/dist/types/threemap/services/common/tdtRequest.d.ts +34 -0
- package/dist/types/threemap/services/configs.d.ts +10 -0
- package/dist/types/threemap/services/constants.d.ts +8 -0
- package/dist/types/threemap/services/district/DistrictLayer.d.ts +167 -0
- package/dist/types/threemap/services/district/DistrictLayer_Bd.d.ts +41 -0
- package/dist/types/threemap/services/district/DistrictLayer_Tdt.d.ts +47 -0
- package/dist/types/threemap/services/geocoder/Geocoder.d.ts +100 -0
- package/dist/types/threemap/services/geocoder/Geocoder_Bd.d.ts +24 -0
- package/dist/types/threemap/services/geocoder/Geocoder_Tdt.d.ts +10 -0
- package/dist/types/threemap/services/index.d.ts +11 -0
- package/dist/types/threemap/services/localSearch/LocalResult.d.ts +47 -0
- package/dist/types/threemap/services/localSearch/LocalSearch.d.ts +175 -0
- package/dist/types/threemap/services/localSearch/LocalSearch_Bd.d.ts +18 -0
- package/dist/types/threemap/services/localSearch/LocalSearch_Tdt.d.ts +6 -0
- package/dist/types/threemap/services/routeSearch/BaseRoute.d.ts +113 -0
- package/dist/types/threemap/services/routeSearch/DWRoute_Bd.d.ts +46 -0
- package/dist/types/threemap/services/routeSearch/DWRoute_Tdt.d.ts +8 -0
- package/dist/types/threemap/services/routeSearch/DrivingRoute.d.ts +113 -0
- package/dist/types/threemap/services/routeSearch/RidingRoute.d.ts +63 -0
- package/dist/types/threemap/services/routeSearch/RouteResult.d.ts +39 -0
- package/dist/types/threemap/services/routeSearch/TransitRoute.d.ts +111 -0
- package/dist/types/threemap/services/routeSearch/TransitRoute_Bd.d.ts +33 -0
- package/dist/types/threemap/services/routeSearch/TransitRoute_Tdt.d.ts +9 -0
- package/dist/types/threemap/services/routeSearch/WalkingRoute.d.ts +69 -0
- package/package.json +1 -1
- package/dist/assets/textures/building/1024/Level12_Repeat0_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level12_Repeat0_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level12_Repeat0_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level12_Repeat0_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level12_Repeat3_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level12_Repeat3_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level12_Repeat3_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level12_Repeat3_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level18_Repeat3_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level18_Repeat3_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level18_Repeat3_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level18_Repeat3_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level1_Repeat0_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level1_Repeat0_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level1_Repeat0_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level1_Repeat0_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level23_Repeat0_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level23_Repeat0_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level23_Repeat0_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level23_Repeat0_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level23_Repeat3_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level23_Repeat3_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level23_Repeat3_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level23_Repeat3_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level2_Repeat1_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level2_Repeat1_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level2_Repeat1_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level2_Repeat1_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level3_Repeat1_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level3_Repeat1_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level3_Repeat1_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level3_Repeat1_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level3_Repeat2_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level3_Repeat2_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level3_Repeat2_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level3_Repeat2_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level4_Repeat3_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level4_Repeat3_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level4_Repeat3_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level4_Repeat3_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level6_Repeat3_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level6_Repeat3_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level6_Repeat3_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level6_Repeat3_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level7_Repeat3_RR1_Grid8_0_LOD0_Res1024_DiffuseMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level7_Repeat3_RR1_Grid8_0_LOD0_Res1024_EmissiveMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level7_Repeat3_RR1_Grid8_0_LOD0_Res1024_NormalMap.PNG +0 -0
- package/dist/assets/textures/building/1024/Level7_Repeat3_RR1_Grid8_0_LOD0_Res1024_RoughnessMap.PNG +0 -0
- package/dist/assets/textures/building/ac1.png +0 -0
- package/dist/assets/textures/building/black.png +0 -0
- package/dist/assets/textures/building/buiding_normal.jpg +0 -0
- package/dist/assets/textures/building/buiding_roughness.jpg +0 -0
- package/dist/assets/textures/building/building2_atlas_diffuse.jpg +0 -0
- package/dist/assets/textures/building/building2_atlas_diffuse_debug.jpg +0 -0
- package/dist/assets/textures/building/building3_atlas_diffuse.jpg +0 -0
- package/dist/assets/textures/building/building3_atlas_metallic_roughness.jpg +0 -0
- package/dist/assets/textures/building/building3_atlas_normal.jpg +0 -0
- package/dist/assets/textures/building/building4_diffuse.jpg +0 -0
- package/dist/assets/textures/building/building_atlas_diffuse.jpg +0 -0
- package/dist/assets/textures/building/building_atlas_emissive.jpg +0 -0
- package/dist/assets/textures/building/building_atlas_metallic_roughness.jpg +0 -0
- package/dist/assets/textures/building/building_atlas_normal.jpg +0 -0
- package/dist/assets/textures/building/building_atlas_roughness.jpg +0 -0
- package/dist/assets/textures/building/building_diffuse.jpg +0 -0
- package/dist/assets/textures/building/building_side.jpg +0 -0
- package/dist/assets/textures/realistic/Albedo_2K_vl1lfb3fw_512.jpg +0 -0
- package/dist/assets/textures/realistic/Albedo_2K_xdhhdhl_512.jpg +0 -0
- package/dist/assets/textures/realistic/Grass_1_S.jpg +0 -0
- package/dist/assets/textures/realistic/Green_dark.jpg +0 -0
- package/dist/assets/textures/realistic/Road.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_10_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_10_ao.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_10_height.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_10_normal.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_10_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_albedo.tif +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_ao.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_ao.tif +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_height.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_height.tif +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_normal.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_normal.tif +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/Road_Asphalt_roughness.tif +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Asphalt_Base10_2x2_512_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Asphalt_Base10_2x2_512_ao.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Asphalt_Base10_2x2_512_height.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Asphalt_Base10_2x2_512_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Asphalt_Base10_2x2_512_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Concrete_WW2_2x2_512_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Concrete_WW2_2x2_512_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Concrete_WW2_2x2_512_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Green_Default_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Greenbelt_Default_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Ground_RockBed4_512_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Ground_RockBed4_512_ao.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Ground_RockBed4_512_height.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Ground_RockBed4_512_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Ground_RockBed4_512_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Nature_Moss_512_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Nature_Moss_512_ao.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Nature_Moss_512_height.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Nature_Moss_512_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Nature_Moss_512_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Nature_Pebbles_512_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Nature_Pebbles_512_ao.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Nature_Pebbles_512_height.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Nature_Pebbles_512_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Nature_Pebbles_512_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Bitumen_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Bitumen_ao.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Bitumen_height.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Bitumen_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Bitumen_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Road_Default_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Roofing_Bitumen_512_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Roofing_Bitumen_512_ao.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Roofing_Bitumen_512_height.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Roofing_Bitumen_512_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Roofing_Bitumen_512_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise4_512_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise4_512_ao.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise4_512_emissive.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise4_512_height.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise4_512_metallic.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise4_512_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise4_512_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise5_512_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise5_512_ao.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise5_512_emissive.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise5_512_metallic.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise5_512_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise5_512_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise6_512_albedo.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise6_512_ao.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise6_512_emissive.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise6_512_height.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise6_512_metallic.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise6_512_normal.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise6_512_roughness.jpg +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise_512_albedo.png +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise_512_ao.png +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise_512_emissive.png +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise_512_normal.png +0 -0
- package/dist/assets/textures/realistic/TexturesCom_Various_HighRise_512_roughness.png +0 -0
- package/dist/types/threemap/controls/measure/CurvatureMeasure.d.ts +0 -7
- package/dist/types/threemap/controls/measure/SlopeMeasure.d.ts +0 -49
- package/dist/types/threemap/services/CurvatureService.d.ts +0 -18
- package/dist/types/threemap/services/GeoCombinedService.d.ts +0 -13
- package/dist/types/threemap/services/PoiService.d.ts +0 -39
- package/dist/types/threemap/services/RoadService.d.ts +0 -39
- package/dist/types/threemap/services/RouteService.d.ts +0 -34
- package/dist/types/threemap/services/Service.d.ts +0 -46
- /package/dist/assets/textures/{realistic → weather}/TexturesCom_Ground_MudWet_512_roughness.jpg +0 -0
- /package/dist/assets/textures/{realistic → weather}/TexturesCom_Snow_Plain_3x3_512_height.jpg +0 -0
- /package/dist/assets/textures/{realistic → weather}/TexturesCom_Snow_Plain_3x3_512_noise.jpg +0 -0
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 行政区划边界服务
|
|
3
|
+
*
|
|
4
|
+
* 支持以下功能:
|
|
5
|
+
* - 获取省、直辖市的轮廓线坐标
|
|
6
|
+
* - 仅支持百度地图API
|
|
7
|
+
* - 返回坐标数组格式的边界数据
|
|
8
|
+
*
|
|
9
|
+
* @category Services
|
|
10
|
+
* @example
|
|
11
|
+
* ```javascript
|
|
12
|
+
* // 创建百度地图边界服务
|
|
13
|
+
* const boundary = new mapvthree.Services.Boundary({
|
|
14
|
+
* apiSource: mapvthree.Services.API_SOURCE_BAIDU
|
|
15
|
+
* });
|
|
16
|
+
*
|
|
17
|
+
* // 获取山东省边界
|
|
18
|
+
* boundary.get('山东省', (result) => {
|
|
19
|
+
* console.log('边界坐标:', result.boundaries);
|
|
20
|
+
* });
|
|
21
|
+
* ```
|
|
22
|
+
*/
|
|
23
|
+
export class Boundary {
|
|
24
|
+
/**
|
|
25
|
+
* 创建边界服务实例
|
|
26
|
+
* @param {Object} options 配置参数
|
|
27
|
+
* @param {string} [options.apiSource] API数据源。
|
|
28
|
+
* 可以配置为{@link Services.API_SOURCE_BAIDU}或{@link Services.API_SOURCE_TIANDITU},默认使用配置的数据源
|
|
29
|
+
*/
|
|
30
|
+
constructor(options?: {
|
|
31
|
+
apiSource?: string | undefined;
|
|
32
|
+
});
|
|
33
|
+
options: {
|
|
34
|
+
apiSource?: string | undefined;
|
|
35
|
+
};
|
|
36
|
+
apiSource: string;
|
|
37
|
+
_boundary: Boundary_Bd | Boundary_Tdt;
|
|
38
|
+
/**
|
|
39
|
+
* 创建具体的边界实现实例
|
|
40
|
+
* @param {Object} options 配置参数
|
|
41
|
+
* @returns {Boundary_Bd|Boundary_Tdt} 具体的实现实例
|
|
42
|
+
* @private
|
|
43
|
+
*/
|
|
44
|
+
private _createInstance;
|
|
45
|
+
/**
|
|
46
|
+
* 获取行政区划边界坐标
|
|
47
|
+
* @param {string} name 行政区划名称,如'山东省'、'北京市'、'台湾省'等
|
|
48
|
+
* @param {Function} cbk 回调函数,返回边界数据
|
|
49
|
+
* @param {Object} cbk.result 边界数据结果
|
|
50
|
+
* @param {Array<Array<Array<number>>>} cbk.result.boundaries 边界坐标数组,每个元素是一个坐标环
|
|
51
|
+
* @example
|
|
52
|
+
* ```javascript
|
|
53
|
+
* boundary.get('山东省', (result) => {
|
|
54
|
+
* // result.boundaries 是一个数组,每个元素是一个坐标环
|
|
55
|
+
* // 每个坐标环是一个坐标数组,每个坐标是 [lng, lat] 格式
|
|
56
|
+
* console.log('边界数量:', result.boundaries.length);
|
|
57
|
+
* console.log('第一个边界坐标:', result.boundaries[0]);
|
|
58
|
+
* });
|
|
59
|
+
* ```
|
|
60
|
+
*/
|
|
61
|
+
get(name: string, cbk: Function): void;
|
|
62
|
+
/**
|
|
63
|
+
* 返回服务名称
|
|
64
|
+
* @returns {string} 服务名称
|
|
65
|
+
*/
|
|
66
|
+
toString(): string;
|
|
67
|
+
}
|
|
68
|
+
import { Boundary_Bd } from './Boundary_Bd.js';
|
|
69
|
+
import { Boundary_Tdt } from './Boundary_Tdt.js';
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
export class Boundary_Bd {
|
|
2
|
+
constructor(options?: {});
|
|
3
|
+
options: {};
|
|
4
|
+
/**
|
|
5
|
+
* 检查是否为渤海区域
|
|
6
|
+
* @param {Object} pt 坐标点
|
|
7
|
+
* @returns {boolean}
|
|
8
|
+
*/
|
|
9
|
+
_isBohai(pt: Object): boolean;
|
|
10
|
+
/**
|
|
11
|
+
* 检查是否为澳门区域
|
|
12
|
+
* @param {Object} pt 坐标点
|
|
13
|
+
* @returns {boolean}
|
|
14
|
+
*/
|
|
15
|
+
_isMacao(pt: Object): boolean;
|
|
16
|
+
/**
|
|
17
|
+
* 处理海南地区的特殊逻辑
|
|
18
|
+
* @param {Object} pt 当前坐标点
|
|
19
|
+
* @param {Object} nextpt 下一个坐标点
|
|
20
|
+
* @param {number} j 当前索引
|
|
21
|
+
* @param {Object} hainanInfo 海南信息对象
|
|
22
|
+
*/
|
|
23
|
+
_dealHainan(pt: Object, nextpt: Object, j: number, hainanInfo: Object): void;
|
|
24
|
+
/**
|
|
25
|
+
* 处理单个坐标记录
|
|
26
|
+
* @param {Array} rec 坐标记录
|
|
27
|
+
* @param {string} name 地区名称
|
|
28
|
+
* @returns {Array} 处理后的坐标数组
|
|
29
|
+
*/
|
|
30
|
+
_processCoordinateRecord(rec: any[], name: string): any[];
|
|
31
|
+
/**
|
|
32
|
+
* 分割海南边界线
|
|
33
|
+
* @param {Array} coordinates 坐标数组
|
|
34
|
+
* @param {Object} hainanInfo 海南信息
|
|
35
|
+
* @returns {Array} 分割后的边界线数组
|
|
36
|
+
*/
|
|
37
|
+
_splitHainanBoundary(coordinates: any[], hainanInfo: Object): any[];
|
|
38
|
+
/**
|
|
39
|
+
* 获取省、直辖市、县的轮廓线坐标
|
|
40
|
+
* @param {String} name 查询省、直辖市或县的名称
|
|
41
|
+
* @param {Function} cbk 回调函数,成功返回一个轮廓线的数组(有些地区由多部分构成),失败数组长度为0
|
|
42
|
+
* 数组形式如下:
|
|
43
|
+
* arr[0] = [[x1, y1], [x2, y2], [x3, y3], ...]
|
|
44
|
+
* arr[1] = [[x1, y1], [x2, y2], [x3, y3], ...]
|
|
45
|
+
* ....
|
|
46
|
+
*/
|
|
47
|
+
get(name: string, cbk: Function): void;
|
|
48
|
+
/**
|
|
49
|
+
* 处理边界响应数据
|
|
50
|
+
* @param {Object} jsonBoundaries 边界响应数据
|
|
51
|
+
* @param {string} name 地区名称
|
|
52
|
+
* @param {Object} results 结果对象
|
|
53
|
+
*/
|
|
54
|
+
_processBoundariesResponse(jsonBoundaries: Object, name: string, results: Object): void;
|
|
55
|
+
toString(): string;
|
|
56
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
export class Boundary_Tdt {
|
|
2
|
+
constructor(options?: {});
|
|
3
|
+
options: {};
|
|
4
|
+
/**
|
|
5
|
+
* 解析WKT边界为坐标数组
|
|
6
|
+
* @param {string} wkt WKT字符串
|
|
7
|
+
* @returns {Array} 坐标数组
|
|
8
|
+
*/
|
|
9
|
+
_parseWktBoundary(wkt: string): any[];
|
|
10
|
+
/**
|
|
11
|
+
* 获取行政区划边界
|
|
12
|
+
* @param {string} name 行政区划名称或adcode
|
|
13
|
+
* @param {function} cbk 回调函数,返回 {boundaries: [ [ [lng, lat], ... ], ... ]}
|
|
14
|
+
*/
|
|
15
|
+
get(name: string, cbk: Function): void;
|
|
16
|
+
toString(): string;
|
|
17
|
+
}
|
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @file 公共部分
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* 状态码StatusCodes常量
|
|
6
|
+
*/
|
|
7
|
+
export const BMAP_STATUS_SUCCESS: 0;
|
|
8
|
+
export const BMAP_STATUS_CITY_LIST: 1;
|
|
9
|
+
export const BMAP_STATUS_UNKNOWN_LOCATION: 2;
|
|
10
|
+
export const BMAP_STATUS_UNKNOWN_ROUTE: 3;
|
|
11
|
+
export const BMAP_STATUS_INVALID_KEY: 4;
|
|
12
|
+
export const BMAP_STATUS_INVALID_REQUEST: 5;
|
|
13
|
+
export const BMAP_STATUS_PERMISSION_DENIED: 6;
|
|
14
|
+
export const BMAP_STATUS_SERVICE_UNAVAILABLE: 7;
|
|
15
|
+
export const BMAP_STATUS_TIMEOUT: 8;
|
|
16
|
+
/**
|
|
17
|
+
* 道路类型RouteTypes常量
|
|
18
|
+
*/
|
|
19
|
+
export const BMAP_ROUTE_TYPE_DEFAULT: 0;
|
|
20
|
+
export const BMAP_ROUTE_TYPE_TRANSIT: 1;
|
|
21
|
+
export const BMAP_ROUTE_TYPE_WALKING: 2;
|
|
22
|
+
export const BMAP_ROUTE_TYPE_DRIVING: 3;
|
|
23
|
+
export const BMAP_ROUTE_TYPE_RIDING: 6;
|
|
24
|
+
/**
|
|
25
|
+
* 起终点状态常量
|
|
26
|
+
*/
|
|
27
|
+
export const BMAP_ROUTE_STATUS_NORMAL: 0;
|
|
28
|
+
export const BMAP_ROUTE_STATUS_EMPTY: 1;
|
|
29
|
+
export const BMAP_ROUTE_STATUS_ADDRESS: 2;
|
|
30
|
+
/**
|
|
31
|
+
* 请求类型QueryTypes常量
|
|
32
|
+
* @private
|
|
33
|
+
*/
|
|
34
|
+
export const QUERY_TYPE_CARPORT_LIST: "carport_list";
|
|
35
|
+
export const QUARY_TYPE_CARPORT_AUTH: "carport_auth";
|
|
36
|
+
export const QUERY_TYPE_CURRENT_CITY: "cur";
|
|
37
|
+
export const QUERY_TYPE_CENTER: "cen";
|
|
38
|
+
export const QUERY_TYPE_POI_SEARCH: "s";
|
|
39
|
+
export const QUERY_TYPE_POI_SEARCH_CON: "con";
|
|
40
|
+
export const QUERY_TYPE_SEARCH_INBOUNDS: "bd";
|
|
41
|
+
export const QUERY_TYPE_SEARCH_NEARBY: "nb";
|
|
42
|
+
export const QUERY_TYPE_TRANSIT: "bt";
|
|
43
|
+
export const QUERY_TYPE_DRIVING: "nav";
|
|
44
|
+
export const QUERY_TYPE_WALKING: "walk";
|
|
45
|
+
export const QUERY_TYPE_GEOCODER: "gc";
|
|
46
|
+
export const QUERY_TYPE_REVERSE_GEOCODER: "rgc";
|
|
47
|
+
export const QUERY_TYPE_LOCALCITY: "dec";
|
|
48
|
+
export const QUERY_TYPE_IPLOCCITY: "iploc";
|
|
49
|
+
export const QUERY_TYPE_TRANSIT_SINGLE: "bse";
|
|
50
|
+
export const QUERY_TYPE_DRIVING_SINGLE: "nse";
|
|
51
|
+
export const QUERY_TYPE_BUSLIST: "s";
|
|
52
|
+
export const QUERY_TYPE_BUSLINE: "bsl";
|
|
53
|
+
export const QUERY_TYPE_SEARCH_INBOUNDS_MULTIKEY: "bda";
|
|
54
|
+
export const QUERY_TYPE_SEARCH_MULTIKEY: "sa";
|
|
55
|
+
export const QUERY_TYPE_SEARCH_NEARBY_MULTIKEY: "nba";
|
|
56
|
+
export const QUERY_TYPE_DARG: "drag";
|
|
57
|
+
export const QUERY_TYPE_EXT: "ext";
|
|
58
|
+
export const QUERY_TYPE_EXTS: "exts";
|
|
59
|
+
export const QUERY_TYPE_IPLOCATION: "hip";
|
|
60
|
+
export const QUERY_TYPE_RIDING: "ride";
|
|
61
|
+
export const QUERY_TYPE_DIRECTION: "drct";
|
|
62
|
+
export const QUERY_TYPE_TRUCKROUTE: "ldt";
|
|
63
|
+
export const QUERY_TYPE_POI_PLACE: "place";
|
|
64
|
+
/**
|
|
65
|
+
* 返回类型ReturnTypes常量
|
|
66
|
+
* @private
|
|
67
|
+
*/
|
|
68
|
+
export const RETURN_TYPE_CURRENT_CITY: 2;
|
|
69
|
+
export const RETURN_TYPE_CENTER: 4;
|
|
70
|
+
export const RETURN_TYPE_CITY_LIST: 7;
|
|
71
|
+
export const RETURN_TYPE_POI_SEARCH: 11;
|
|
72
|
+
export const RETURN_TYPE_SEARCH_NEARBY: 12;
|
|
73
|
+
export const RETURN_TYPE_TRANSIT: 14;
|
|
74
|
+
export const RETURN_TYPE_BUSLIST: 15;
|
|
75
|
+
export const RETURN_TYPE_BUSLINE: 18;
|
|
76
|
+
export const RETURN_TYPE_DRIVING: 20;
|
|
77
|
+
export const RETURN_TYPE_SEARCH_INBOUNDS: 21;
|
|
78
|
+
export const RETURN_TYPE_NAV_ADDRESS: 19;
|
|
79
|
+
export const RETURN_TYPE_ROUTE_ADDRESS: 23;
|
|
80
|
+
export const RETURN_TYPE_SPECIAL_REGION: 26;
|
|
81
|
+
export const RETURN_TYPE_NODATA_REGION: 28;
|
|
82
|
+
export const RETURN_TYPE_WALKING: 31;
|
|
83
|
+
export const RETURN_TYPE_GEOCODER: 35;
|
|
84
|
+
export const RETURN_TYPE_REVERSE_GEOCODER: 44;
|
|
85
|
+
export const RETURN_TYPE_SEARCH_INBOUNDS_MULTIKEY: 45;
|
|
86
|
+
export const RETURN_TYPE_SEARCH_MULTIKEY: 46;
|
|
87
|
+
export const RETURN_TYPE_SEARCH_NEARBY_MULTIKEY: 47;
|
|
88
|
+
/**
|
|
89
|
+
* 区域设置参数类型常量
|
|
90
|
+
*/
|
|
91
|
+
export const LOC_TYPE_UNKNOWN: -1;
|
|
92
|
+
export const LOC_TYPE_MAP: 0;
|
|
93
|
+
export const LOC_TYPE_POINT: 1;
|
|
94
|
+
export const LOC_TYPE_STRING: 2;
|
|
95
|
+
export const LOC_TYPE_NUMBER: 3;
|
|
96
|
+
/**
|
|
97
|
+
* POI点类型常量
|
|
98
|
+
*/
|
|
99
|
+
export const BMAP_POI_TYPE_NORMAL: 0;
|
|
100
|
+
export const BMAP_POI_TYPE_BUSSTOP: 1;
|
|
101
|
+
export const BMAP_POI_TYPE_BUSLINE: 2;
|
|
102
|
+
export const BMAP_POI_TYPE_SUBSTOP: 3;
|
|
103
|
+
export const BMAP_POI_TYPE_SUBLINE: 4;
|
|
104
|
+
export const DIRECTION_RETURN_TYPE_UNCLEAR: 1;
|
|
105
|
+
export const DIRECTION_RETURN_TYPE_CLEAR: 2;
|
|
106
|
+
/**
|
|
107
|
+
* 公交出行方案类型,TransitType
|
|
108
|
+
*/
|
|
109
|
+
export const BMAP_TRANSIT_TYPE_IN_CITY: 0;
|
|
110
|
+
export const BMAP_TRANSIT_TYPE_CROSS_CITY: 1;
|
|
111
|
+
/**
|
|
112
|
+
* VehicleType常量,用作识别direction api返回的交通方式类型判断,不开放
|
|
113
|
+
* @const
|
|
114
|
+
*/
|
|
115
|
+
export const BMAP_VEHICLE_TYPE_BUS: 3;
|
|
116
|
+
export const BMAP_VEHICLE_TYPE_DRIVING: 4;
|
|
117
|
+
export const BMAP_VEHICLE_TYPE_TRAIN: 1;
|
|
118
|
+
export const BMAP_VEHICLE_TYPE_AIRPLANE: 2;
|
|
119
|
+
export const BMAP_VEHICLE_TYPE_WALKING: 5;
|
|
120
|
+
export const BMAP_VEHICLE_TYPE_COACH: 6;
|
|
121
|
+
/**
|
|
122
|
+
* TransitPlanType常量,某一路段的交通方式
|
|
123
|
+
* @const
|
|
124
|
+
*/
|
|
125
|
+
export const BMAP_TRANSIT_PLAN_TYPE_ROUTE: 0;
|
|
126
|
+
export const BMAP_TRANSIT_PLAN_TYPE_LINE: 1;
|
|
127
|
+
/**
|
|
128
|
+
* LineTypes常量
|
|
129
|
+
* @const
|
|
130
|
+
*/
|
|
131
|
+
export const BMAP_LINE_TYPE_BUS: 0;
|
|
132
|
+
export const BMAP_LINE_TYPE_SUBWAY: 1;
|
|
133
|
+
export const BMAP_LINE_TYPE_FERRY: 2;
|
|
134
|
+
export const BMAP_LINE_TYPE_TRAIN: 3;
|
|
135
|
+
export const BMAP_LINE_TYPE_AIRPLANE: 4;
|
|
136
|
+
export const BMAP_LINE_TYPE_COACH: 5;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export namespace SUtil {
|
|
2
|
+
function unique(a: any): any[];
|
|
3
|
+
function parseGeo(geo: string, usePoint: any): number | {
|
|
4
|
+
geoType: number;
|
|
5
|
+
geo: any[][];
|
|
6
|
+
} | {
|
|
7
|
+
type: any;
|
|
8
|
+
} | undefined;
|
|
9
|
+
function pathToPoints(path: string): any[];
|
|
10
|
+
function pointsToString(points: any[]): string;
|
|
11
|
+
function getX(coord: any): any;
|
|
12
|
+
function getY(coord: any): any;
|
|
13
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
export class ScriptLoader {
|
|
2
|
+
/**
|
|
3
|
+
* 请求天地图API
|
|
4
|
+
* @param {string} url - 脚本文件URL
|
|
5
|
+
* @returns {Promise} 返回Promise,resolve时包含tdt_loadResult的内容
|
|
6
|
+
*/
|
|
7
|
+
static request(url: string): Promise<any>;
|
|
8
|
+
/**
|
|
9
|
+
* 获取可用的脚本加载器实例
|
|
10
|
+
* @param {Window} win - 目标窗口对象
|
|
11
|
+
* @returns {ScriptLoader} 脚本加载器实例
|
|
12
|
+
*/
|
|
13
|
+
static getObject(win?: Window): ScriptLoader;
|
|
14
|
+
static getElementWindow(element: any): any;
|
|
15
|
+
static processEventArguments(args: any): any;
|
|
16
|
+
static createCallback(context: any, callback: any): (...args: any[]) => void;
|
|
17
|
+
objName: string;
|
|
18
|
+
win: Window & typeof globalThis;
|
|
19
|
+
charset: string;
|
|
20
|
+
src: string | null;
|
|
21
|
+
callback: ((...args: any[]) => void) | null;
|
|
22
|
+
oScript: HTMLScriptElement | null;
|
|
23
|
+
running: boolean;
|
|
24
|
+
/**
|
|
25
|
+
* 加载脚本文件
|
|
26
|
+
* @param {string} src - 脚本文件URL
|
|
27
|
+
* @param {string} charset - 字符编码,默认为utf-8
|
|
28
|
+
* @param {Object} context - 回调函数的上下文
|
|
29
|
+
* @param {Function} callback - 加载完成后的回调函数
|
|
30
|
+
*/
|
|
31
|
+
loadScript(src: string, charset: string, context: Object, callback: Function): void;
|
|
32
|
+
handleLoadComplete(): void;
|
|
33
|
+
cleanupScriptElement(): void;
|
|
34
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 设置LBS服务
|
|
3
|
+
* @param {string} source 服务类型,{@link Services.API_SOURCE_BAIDU}或{@link Services.API_SOURCE_TIANDITU}
|
|
4
|
+
*/
|
|
5
|
+
export function setApiSource(source: string): void;
|
|
6
|
+
/**
|
|
7
|
+
* 获取LBS服务
|
|
8
|
+
* @returns {string} 服务类型,{@link Services.API_SOURCE_BAIDU}或{@link Services.API_SOURCE_TIANDITU}
|
|
9
|
+
*/
|
|
10
|
+
export function getApiSource(): string;
|
|
@@ -0,0 +1,167 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 行政区划聚合图层
|
|
3
|
+
*
|
|
4
|
+
* 支持以下功能:
|
|
5
|
+
* - 自动获取行政区划边界数据
|
|
6
|
+
* - 仅支持百度地图API
|
|
7
|
+
* - 多层级行政区划显示(省级、市级)
|
|
8
|
+
* - 自动视口跳转
|
|
9
|
+
*
|
|
10
|
+
* @category Services
|
|
11
|
+
* @example
|
|
12
|
+
* ```javascript
|
|
13
|
+
* // 创建百度地图行政区划图层
|
|
14
|
+
* const district = new mapvthree.Services.DistrictLayer({
|
|
15
|
+
* name: '(山东省)',
|
|
16
|
+
* kind: 0, // 省级
|
|
17
|
+
* apiSource: mapvthree.Services.API_SOURCE_BAIDU,
|
|
18
|
+
* renderOptions: {
|
|
19
|
+
* engine: engine,
|
|
20
|
+
* fillColor: '#618bf8',
|
|
21
|
+
* fillOpacity: 0.6,
|
|
22
|
+
* autoViewport: true,
|
|
23
|
+
* },
|
|
24
|
+
* });
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export class DistrictLayer {
|
|
28
|
+
/**
|
|
29
|
+
* 创建行政区划聚合图层实例
|
|
30
|
+
* @param {Object} options 配置参数
|
|
31
|
+
* @param {string} options.name 行政区划名称,格式如'(山东省)'、'(北京市)'
|
|
32
|
+
* @param {number} options.kind 行政区划层级,0=省级,1=市级,2=区县级
|
|
33
|
+
* @param {string} [options.apiSource] API数据源。
|
|
34
|
+
* 可以配置为{@link Services.API_SOURCE_BAIDU}或{@link Services.API_SOURCE_TIANDITU},默认使用配置的数据源
|
|
35
|
+
* @param {Object} [options.renderOptions] 渲染配置
|
|
36
|
+
* @param {Engine} options.renderOptions.engine 地图引擎实例
|
|
37
|
+
* @param {boolean} optiosn.renderOptiosn.autoViewport 自动跳转到区域中心
|
|
38
|
+
* @param {string|Array<string>} [options.renderOptions.fillColor='#ff0'] 填充颜色,支持单个颜色或颜色数组
|
|
39
|
+
* @param {number} [options.renderOptions.fillOpacity=0.6] 填充透明度,0-1之间
|
|
40
|
+
* @returns {DistrictLayer_Bd|DistrictLayer_Tdt} 行政区划图层实例
|
|
41
|
+
*/
|
|
42
|
+
constructor(options?: {
|
|
43
|
+
name: string;
|
|
44
|
+
kind: number;
|
|
45
|
+
apiSource?: string | undefined;
|
|
46
|
+
renderOptions?: {
|
|
47
|
+
engine: Engine;
|
|
48
|
+
} | undefined;
|
|
49
|
+
});
|
|
50
|
+
renderOptions: {};
|
|
51
|
+
apiSource: string;
|
|
52
|
+
options: {
|
|
53
|
+
name: string;
|
|
54
|
+
kind: number;
|
|
55
|
+
apiSource?: string | undefined;
|
|
56
|
+
renderOptions?: {
|
|
57
|
+
engine: Engine;
|
|
58
|
+
} | undefined;
|
|
59
|
+
};
|
|
60
|
+
autoViewport: any;
|
|
61
|
+
_distrctLayer: DistrictLayer_Bd | DistrictLayer_Tdt;
|
|
62
|
+
_engine: any;
|
|
63
|
+
_fillColor: any;
|
|
64
|
+
_fillOpacity: any;
|
|
65
|
+
/**
|
|
66
|
+
* 异步加载行政区划数据
|
|
67
|
+
* @private
|
|
68
|
+
*/
|
|
69
|
+
private _loadDistrict;
|
|
70
|
+
_data: Object | undefined;
|
|
71
|
+
/**
|
|
72
|
+
* 计算区域中心点和边界范围
|
|
73
|
+
* @private
|
|
74
|
+
* @returns {Object} 包含center和bounds的对象
|
|
75
|
+
*/
|
|
76
|
+
private _calculateBounds;
|
|
77
|
+
/**
|
|
78
|
+
* 递归展平坐标数组
|
|
79
|
+
* @private
|
|
80
|
+
* @param {Array} coords 坐标数组
|
|
81
|
+
* @returns {Array} 展平后的坐标数组
|
|
82
|
+
*/
|
|
83
|
+
private _flattenCoordinates;
|
|
84
|
+
/**
|
|
85
|
+
* 自动飞行到区域中心
|
|
86
|
+
* @private
|
|
87
|
+
*/
|
|
88
|
+
private _flyToDistrict;
|
|
89
|
+
/**
|
|
90
|
+
* 渲染行政区划到地图
|
|
91
|
+
* @private
|
|
92
|
+
*/
|
|
93
|
+
private renderMap;
|
|
94
|
+
_layer: any;
|
|
95
|
+
/**
|
|
96
|
+
* 重置图层,移除当前渲染的行政区划
|
|
97
|
+
* @example
|
|
98
|
+
* ```javascript
|
|
99
|
+
* district.reset();
|
|
100
|
+
* ```
|
|
101
|
+
*/
|
|
102
|
+
reset(): void;
|
|
103
|
+
/**
|
|
104
|
+
* 设置行政区划名称
|
|
105
|
+
* @param {string} name 行政区划名称,格式如'(山东省)'、'(北京市)'
|
|
106
|
+
* @example
|
|
107
|
+
* ```javascript
|
|
108
|
+
* district.setName('(广东省)');
|
|
109
|
+
* ```
|
|
110
|
+
*/
|
|
111
|
+
setName(name: string): void;
|
|
112
|
+
/**
|
|
113
|
+
* 设置行政区划层级
|
|
114
|
+
* @param {number} kind 行政区划层级,0=省级,1=市级,2=区县级
|
|
115
|
+
* @example
|
|
116
|
+
* ```javascript
|
|
117
|
+
* district.setKind(1); // 设置为市级
|
|
118
|
+
* ```
|
|
119
|
+
*/
|
|
120
|
+
setKind(kind: number): void;
|
|
121
|
+
/**
|
|
122
|
+
* 设置行政区划选项,支持同时更新名称和层级
|
|
123
|
+
* @param {Object} options 配置选项
|
|
124
|
+
* @param {string} [options.name] 行政区划名称
|
|
125
|
+
* @param {number} [options.kind] 行政区划层级
|
|
126
|
+
* @example
|
|
127
|
+
* ```javascript
|
|
128
|
+
* district.setOptions({
|
|
129
|
+
* name: '(广东省)',
|
|
130
|
+
* kind: 1,
|
|
131
|
+
* });
|
|
132
|
+
* ```
|
|
133
|
+
*/
|
|
134
|
+
setOptions(options: {
|
|
135
|
+
name?: string | undefined;
|
|
136
|
+
kind?: number | undefined;
|
|
137
|
+
}): void;
|
|
138
|
+
/**
|
|
139
|
+
* 创建具体的行政区划实现实例
|
|
140
|
+
* @param {Object} options 配置参数
|
|
141
|
+
* @returns {DistrictLayer_Bd|DistrictLayer_Tdt} 具体的实现实例
|
|
142
|
+
* @private
|
|
143
|
+
*/
|
|
144
|
+
private _createInstance;
|
|
145
|
+
/**
|
|
146
|
+
* 搜索行政区划边界数据
|
|
147
|
+
* @param {Object} options 搜索选项
|
|
148
|
+
* @param {string} [options.name] 行政区划名称
|
|
149
|
+
* @param {number} [options.kind] 行政区划层级
|
|
150
|
+
* @param {Function} callback 回调函数,返回边界数据
|
|
151
|
+
* @example
|
|
152
|
+
* ```javascript
|
|
153
|
+
* district.searchBoundary({
|
|
154
|
+
* name: '(山东省)',
|
|
155
|
+
* kind: 1,
|
|
156
|
+
* }, (result) => {
|
|
157
|
+
* console.log('边界数据:', result.boundaries);
|
|
158
|
+
* });
|
|
159
|
+
* ```
|
|
160
|
+
*/
|
|
161
|
+
searchBoundary(options: {
|
|
162
|
+
name?: string | undefined;
|
|
163
|
+
kind?: number | undefined;
|
|
164
|
+
}, callback: Function): void;
|
|
165
|
+
}
|
|
166
|
+
import { DistrictLayer_Bd } from './DistrictLayer_Bd';
|
|
167
|
+
import { DistrictLayer_Tdt } from './DistrictLayer_Tdt';
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
export class DistrictLayer_Bd {
|
|
2
|
+
constructor(options?: {});
|
|
3
|
+
options: {};
|
|
4
|
+
_map: any;
|
|
5
|
+
_layer: any;
|
|
6
|
+
_data: Object | null;
|
|
7
|
+
setOptions(options: any): void;
|
|
8
|
+
setName(name: any): void;
|
|
9
|
+
setKind(kind: any): void;
|
|
10
|
+
_loadDistrict(): Promise<Object>;
|
|
11
|
+
/**
|
|
12
|
+
* 解析百度地图API返回的边界数据为GeoJSON格式
|
|
13
|
+
* @param {Object} jsonBoundaries 百度地图API返回的边界数据
|
|
14
|
+
* @returns {Object} GeoJSON格式的FeatureCollection
|
|
15
|
+
* @private
|
|
16
|
+
*/
|
|
17
|
+
private _parseGeoData;
|
|
18
|
+
/**
|
|
19
|
+
* 转换GeoJSON坐标,将MC坐标系转换为LL坐标系
|
|
20
|
+
* @param {Object} geojson GeoJSON数据
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
private geojsonCoordConvert;
|
|
24
|
+
/**
|
|
25
|
+
* 将GeoJSON数据转换为边界数组格式
|
|
26
|
+
* @param {Object} geojson GeoJSON数据
|
|
27
|
+
* @returns {Object} 边界数组格式数据 {boundaries: Array}
|
|
28
|
+
*/
|
|
29
|
+
geojson2boundaries(geojson: Object): Object;
|
|
30
|
+
/**
|
|
31
|
+
* 搜索行政区划边界数据
|
|
32
|
+
* @param {Object} options 搜索选项
|
|
33
|
+
* @param {string} [options.name] 行政区划名称
|
|
34
|
+
* @param {number} [options.kind] 行政区划层级
|
|
35
|
+
* @param {Function} callback 回调函数,返回边界数据
|
|
36
|
+
*/
|
|
37
|
+
searchBoundary(options: {
|
|
38
|
+
name?: string | undefined;
|
|
39
|
+
kind?: number | undefined;
|
|
40
|
+
}, callback: Function): void;
|
|
41
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export class DistrictLayer_Tdt {
|
|
2
|
+
constructor(options?: {});
|
|
3
|
+
options: {};
|
|
4
|
+
_data: Object | null;
|
|
5
|
+
setOptions(options: any): void;
|
|
6
|
+
setName(name: any): void;
|
|
7
|
+
setKind(kind: any): void;
|
|
8
|
+
_loadDistrict(): Promise<Object>;
|
|
9
|
+
/**
|
|
10
|
+
* 请求天地图行政区划数据
|
|
11
|
+
* @param {string} name 行政区划名称
|
|
12
|
+
* @param {number} kind 行政区划层级
|
|
13
|
+
* @returns {Promise<Object>} 天地图API返回的数据
|
|
14
|
+
* @private
|
|
15
|
+
*/
|
|
16
|
+
private _requestDistrictData;
|
|
17
|
+
/**
|
|
18
|
+
* 解析天地图API返回的边界数据为GeoJSON格式
|
|
19
|
+
* @param {Object} jsonBoundaries 天地图API返回的边界数据
|
|
20
|
+
* @returns {Object} GeoJSON格式的FeatureCollection
|
|
21
|
+
* @private
|
|
22
|
+
*/
|
|
23
|
+
private _parseGeoData;
|
|
24
|
+
/**
|
|
25
|
+
* 转换GeoJSON坐标,确保坐标是数值类型
|
|
26
|
+
* @param {Object} geojson GeoJSON数据
|
|
27
|
+
* @private
|
|
28
|
+
*/
|
|
29
|
+
private geojsonCoordConvert;
|
|
30
|
+
/**
|
|
31
|
+
* 将GeoJSON数据转换为边界数组格式
|
|
32
|
+
* @param {Object} geojson GeoJSON数据
|
|
33
|
+
* @returns {Object} 边界数组格式数据 {boundaries: Array}
|
|
34
|
+
*/
|
|
35
|
+
geojson2boundaries(geojson: Object): Object;
|
|
36
|
+
/**
|
|
37
|
+
* 搜索行政区划边界数据
|
|
38
|
+
* @param {Object} options 搜索选项
|
|
39
|
+
* @param {string} [options.name] 行政区划名称
|
|
40
|
+
* @param {number} [options.kind] 行政区划层级
|
|
41
|
+
* @param {Function} callback 回调函数,返回边界数据
|
|
42
|
+
*/
|
|
43
|
+
searchBoundary(options: {
|
|
44
|
+
name?: string | undefined;
|
|
45
|
+
kind?: number | undefined;
|
|
46
|
+
}, callback: Function): void;
|
|
47
|
+
}
|