diff --git a/package.json b/package.json index 7585777bf..61bc25fac 100644 --- a/package.json +++ b/package.json @@ -82,8 +82,8 @@ }, "dependencies": { "@mapbox/leaflet-omnivore": "^0.3.4", - "@mapbox/mapbox-gl-style-spec": "^13.15.0", - "@mapgis/mapbox-gl": "^1.9.0", + "@mapbox/mapbox-gl-style-spec": "13.15.0", + "@mapgis/mapbox-gl": "^16.0.0", "@turf/turf": "^6.3.0", "axios": "^0.18.0", "cesium": "1.84.0", @@ -98,7 +98,7 @@ "proj4": "2.3.15", "promise-polyfill": "^8.2.3", "qs": "^6.9.4", - "webfont-matcher": "^1.1.0", - "svg-pathdata": "^6.0.0" + "svg-pathdata": "^6.0.0", + "webfont-matcher": "^1.1.0" } } diff --git a/src/cesiumjs/index.js b/src/cesiumjs/index.js index 313ba64c1..b072f639d 100644 --- a/src/cesiumjs/index.js +++ b/src/cesiumjs/index.js @@ -10,9 +10,7 @@ export * from './provider'; export * from './render'; -import { - ServiceBase -} from '../service/ServiceBase'; +import { ServiceBase } from '../service/ServiceBase'; import { AnyLine, @@ -117,24 +115,11 @@ import { SlopLineParam } from '../service/Igserver/extend'; -import { - CommonServiceBase, - Events, - CORS, - RequestTimeout, - FetchRequest, - IgsServiceBase, - JSONFormat -} from '../service/baseserver'; +import { CommonServiceBase, Events, CORS, RequestTimeout, FetchRequest, IgsServiceBase, JSONFormat } from '../service/baseserver'; -import { - ColorInfo, - GDBInfo, - MapDoc, - CatalogService, - TileLayer, - VectorLayer -} from '../service/Igserver/MRCS'; +import { ColorInfo, GDBInfo, MapDoc, CatalogService, TileLayer, VectorLayer } from '../service/Igserver/MRCS'; + +import { G3DLayerType, M3DTileDataInfo, G3DMapDoc, G3DService } from '../service/Igserver/G3D'; import { EditDocFeature, @@ -229,17 +214,9 @@ import { ThemesInfo } from '../service/Igserver/theme'; -import { - WMSCapabilities, - WMTSCapabilities, - OGCWMTSInfo, - OGCWMSInfo -} from '../service/OGC'; - -export { - ServiceBase -}; +import { WMSCapabilities, WMTSCapabilities, OGCWMTSInfo, OGCWMSInfo } from '../service/OGC'; +export { ServiceBase }; export { AnyLine, @@ -332,33 +309,10 @@ export { merge, mixin }; -export { - ContourNoteParam, - ContourParam, - ContourZValue, - ContourRegionInfo, - MeshingParam, - NetAnalyse, - NetAnalysisExtent, - SlopLineParam -}; -export { - CommonServiceBase, - Events, - CORS, - RequestTimeout, - FetchRequest, - IgsServiceBase, - JSONFormat -}; -export { - ColorInfo, - GDBInfo, - MapDoc, - CatalogService, - TileLayer, - VectorLayer -}; +export { ContourNoteParam, ContourParam, ContourZValue, ContourRegionInfo, MeshingParam, NetAnalyse, NetAnalysisExtent, SlopLineParam }; +export { CommonServiceBase, Events, CORS, RequestTimeout, FetchRequest, IgsServiceBase, JSONFormat }; +export { ColorInfo, GDBInfo, MapDoc, CatalogService, TileLayer, VectorLayer }; +export { G3DLayerType, M3DTileDataInfo, G3DMapDoc, G3DService }; export { EditDocFeature, EditLayerFeature, @@ -409,14 +363,7 @@ export { Smooth, TopAnalysis }; -export { - GetDocImageService, - GetLayerImageService, - GetMapImageService, - GetMapInfoService, - GetTileImageService, - MapServiceBase -}; +export { GetDocImageService, GetLayerImageService, GetMapImageService, GetMapInfoService, GetTileImageService, MapServiceBase }; export { CAllOtherDataItemInfoSource, CAnnInfo, @@ -448,9 +395,4 @@ export { ThemesInfo }; -export { - WMSCapabilities, - WMTSCapabilities, - OGCWMTSInfo, - OGCWMSInfo -}; \ No newline at end of file +export { WMSCapabilities, WMTSCapabilities, OGCWMTSInfo, OGCWMSInfo }; diff --git a/src/cesiumjs/manager/AdvancedAnalysisManager.js b/src/cesiumjs/manager/AdvancedAnalysisManager.js index 5442a4f9a..7089e56ba 100644 --- a/src/cesiumjs/manager/AdvancedAnalysisManager.js +++ b/src/cesiumjs/manager/AdvancedAnalysisManager.js @@ -12,6 +12,15 @@ export default class AdvancedAnalysisManager { constructor(option) { this._viewer = Cesium.defaultValue(option.viewer, undefined); this._scene = this._viewer.scene; + // 记录设置之前的配置 + this._oldSetting = { + skyAtmosphere: { + hueShift: this._scene.skyAtmosphere.hueShift, + saturationShift: this._scene.skyAtmosphere.saturationShift, + brightnessShift: this._scene.skyAtmosphere.brightnessShift + }, + fog: { density: this._scene.fog.density, minimumBrightness: this._scene.fog.minimumBrightness } + }; } /** @@ -432,6 +441,12 @@ export default class AdvancedAnalysisManager { */ removeStage(stage) { this.viewer.scene.postProcessStages.remove(stage); + // 重置配置 + this.scene.skyAtmosphere.hueShift = this._oldSetting.skyAtmosphere.hueShift; + this.scene.skyAtmosphere.saturationShift = this._oldSetting.skyAtmosphere.saturationShift; + this.scene.skyAtmosphere.brightnessShift = this._oldSetting.skyAtmosphere.brightnessShift; + this.scene.fog.density = this._oldSetting.fog.density; + this.scene.fog.minimumBrightness = this._oldSetting.fog.minimumBrightness; } /** diff --git a/src/cesiumjs/manager/LabelLayer.js b/src/cesiumjs/manager/LabelLayer.js index 7476b0514..730d9e580 100644 --- a/src/cesiumjs/manager/LabelLayer.js +++ b/src/cesiumjs/manager/LabelLayer.js @@ -194,11 +194,12 @@ export default class LabelLayer extends BaseLayer { outlineWidth: 1, verticalOrigin: Cesium.VerticalOrigin.CENTER, // 垂直方向以底部来计算标签的位置 horizontalOrigin: Cesium.HorizontalOrigin.CENTER, // 原点在下方 + // x,y方向偏移 相对于屏幕 + pixelOffset: new Cesium.Cartesian2(0.0, -iconHeight / 4), // 随远近缩放 - pixelOffset: new Cesium.Cartesian2(0.0, -iconHeight / 4), // x,y方向偏移 相对于屏幕 - pixelOffsetScaleByDistance: new Cesium.NearFarScalar(1.5e2, 3.0, 1.5e7, 0.5), + pixelOffsetScaleByDistance: new Cesium.NearFarScalar(nearDist, 3.0, farDist, 0.5), // 随远近隐藏 - translucencyByDistance: new Cesium.NearFarScalar(1.5e5, 1.0, 1.5e7, 0.0) + translucencyByDistance: new Cesium.NearFarScalar(nearDist, 1.0, farDist, 0.0) }, description: attribute }); diff --git a/src/cesiumjs/render/vectortile/VectorTileProvider.js b/src/cesiumjs/render/vectortile/VectorTileProvider.js index 3091f02c4..a3d69e713 100644 --- a/src/cesiumjs/render/vectortile/VectorTileProvider.js +++ b/src/cesiumjs/render/vectortile/VectorTileProvider.js @@ -49,7 +49,7 @@ export default function VectorTileProvider(Cesium, options) { this._cacheSize = 1024; } - Cesium.defineProperties(MVTProvider.prototype, { + Object.defineProperties(MVTProvider.prototype, { proxy: { get: function () { return undefined; diff --git a/src/config/opensource/leaflet_index.js b/src/config/opensource/leaflet_index.js index 438d5e479..e4b39978d 100644 --- a/src/config/opensource/leaflet_index.js +++ b/src/config/opensource/leaflet_index.js @@ -1,17 +1,15 @@ import L from 'leaflet'; -export { - L -}; +export { L }; import { - MapDocLayer, - MapTileLayer, - MapWMTSLayer, - MapVectorLayer, - CRS, - crs, + MapDocLayer, + MapTileLayer, + MapWMTSLayer, + MapVectorLayer, + CRS, + crs, ArcGISLayer, - TDTLayer, + TDTLayer, BaiduTileLayer, TiandituType, GoogleLayerType, @@ -19,517 +17,451 @@ import { OpenStreetLayerType } from '../../leaflet/layer'; -import { - ServiceBase -} from '../../service/ServiceBase'; +import { ServiceBase } from '../../service/ServiceBase'; import { - AnyLine, - Arc, - Zondy, - CAttStruct, - CAttDataRow, - CDisplayStyle, - CDisplayStyleExtend, - CDynNoteInfo, - CGDBInfo, - Circle, - CLineInfo, - CPointInfo, - CRegionInfo, - DynNoteLableType, - DynShowStyle, - XClsType, - VectClsType, - FeatureType, - FontShape, - LabelLinType, - LabelRegType, - LabelPntType, - RepeatType, - LabelSpreadType, - LineConstrain, - EightDirType, - ISShowArc, - NetAnalyType, - NetElemType, - CLinAdjustType, - CLinHeadType, - CLinJointType, - CLinStyleMakeType, - CItemType, - MapType, - LayerStatusType, - Feature, - FeatureGeometry, - FeatureGraphicBase, - FeatureSet, - GLine, - GPoint, - GRegion, - LabelLinInfo, - LabelRegInfo, - LablePntInfo, - MultiPolygon, - Point2D, - Polygon, - PolyLine, - Rectangle, - Tangram, - VectCls, - WebGraphicsInfo, - extend, - isArray, - extendDeep, - copy, - copyExcluce, - reset, - getElement, - isElement, - removeItem, - indexOf, - modifyDOMElement, - applyDefaults, - getParameterString, - getWFParameterString, - urlAppend, - getParameters, - IS_GECKO, - Browser, - getBrowser, - isSupportCanvas, - supportCanvas, - isInTheSameDomain, - toJSON, - transformResult, - copyAttributes, - copyAttributesWithClip, - cloneObject, - newGuid, - bind, - bindAsEventListener, - getTopAnalysisResult, - ChineseToUtf8, - DeepMerge, - merge, - mixin + AnyLine, + Arc, + Zondy, + CAttStruct, + CAttDataRow, + CDisplayStyle, + CDisplayStyleExtend, + CDynNoteInfo, + CGDBInfo, + Circle, + CLineInfo, + CPointInfo, + CRegionInfo, + DynNoteLableType, + DynShowStyle, + XClsType, + VectClsType, + FeatureType, + FontShape, + LabelLinType, + LabelRegType, + LabelPntType, + RepeatType, + LabelSpreadType, + LineConstrain, + EightDirType, + ISShowArc, + NetAnalyType, + NetElemType, + CLinAdjustType, + CLinHeadType, + CLinJointType, + CLinStyleMakeType, + CItemType, + MapType, + LayerStatusType, + Feature, + FeatureGeometry, + FeatureGraphicBase, + FeatureSet, + GLine, + GPoint, + GRegion, + LabelLinInfo, + LabelRegInfo, + LablePntInfo, + MultiPolygon, + Point2D, + Polygon, + PolyLine, + Rectangle, + Tangram, + VectCls, + WebGraphicsInfo, + extend, + isArray, + extendDeep, + copy, + copyExcluce, + reset, + getElement, + isElement, + removeItem, + indexOf, + modifyDOMElement, + applyDefaults, + getParameterString, + getWFParameterString, + urlAppend, + getParameters, + IS_GECKO, + Browser, + getBrowser, + isSupportCanvas, + supportCanvas, + isInTheSameDomain, + toJSON, + transformResult, + copyAttributes, + copyAttributesWithClip, + cloneObject, + newGuid, + bind, + bindAsEventListener, + getTopAnalysisResult, + ChineseToUtf8, + DeepMerge, + merge, + mixin } from '../../service/common'; import { - ContourNoteParam, - ContourParam, - ContourZValue, - ContourRegionInfo, - MeshingParam, - NetAnalyse, - NetAnalysisExtent, - SlopLineParam + ContourNoteParam, + ContourParam, + ContourZValue, + ContourRegionInfo, + MeshingParam, + NetAnalyse, + NetAnalysisExtent, + SlopLineParam } from '../../service/Igserver/extend'; -import { - CommonServiceBase, - Events, - CORS, - RequestTimeout, - FetchRequest, - IgsServiceBase, - JSONFormat -} from '../../service/baseserver'; +import { CommonServiceBase, Events, CORS, RequestTimeout, FetchRequest, IgsServiceBase, JSONFormat } from '../../service/baseserver'; -import { - ColorInfo, - GDBInfo, - MapDoc, - CatalogService, - TileLayer, - VectorLayer -} from '../../service/Igserver/MRCS'; +import { ColorInfo, GDBInfo, MapDoc, CatalogService, TileLayer, VectorLayer } from '../../service/Igserver/MRCS'; + +import { G3DLayerType, M3DTileDataInfo, G3DMapDoc, G3DService } from '../../service/Igserver/G3D'; import { - EditDocFeature, - EditLayerFeature, - EditServiceBase, - MultiGeoQuery, - MultiGeoQueryParameter, - ObjClsQuery, - ObjClsQueryParameter, - QueryByLayerParameter, - QueryDocFeature, - QueryFeatureRule, - QueryFeatureStruct, - QueryLayerFeature, - QueryParameter, - QueryParameterBase, - QueryServiceBase + EditDocFeature, + EditLayerFeature, + EditServiceBase, + MultiGeoQuery, + MultiGeoQueryParameter, + ObjClsQuery, + ObjClsQueryParameter, + QueryByLayerParameter, + QueryDocFeature, + QueryFeatureRule, + QueryFeatureStruct, + QueryLayerFeature, + QueryParameter, + QueryParameterBase, + QueryServiceBase } from '../../service/Igserver/MRFS'; import { - AnalysisBase, - ClassBufferBase, - ClassBufferByMultiplyRing, - ClassBufferBySingleRing, - ClipBase, - ClipByCircle, - ClipByLayer, - ClipByPolygon, - ContourAnalyse, - FeatureBuffBase, - FeatureBuffByMultiplyRing, - FeatureBuffBySingleRing, - NetAnalysis, - OverlayBase, - OverlayByLayer, - OverlayByPolygon, - ProjectBase, - ProjectByLayer, - ProjectBySRID + AnalysisBase, + ClassBufferBase, + ClassBufferByMultiplyRing, + ClassBufferBySingleRing, + ClipBase, + ClipByCircle, + ClipByLayer, + ClipByPolygon, + ContourAnalyse, + FeatureBuffBase, + FeatureBuffByMultiplyRing, + FeatureBuffBySingleRing, + NetAnalysis, + OverlayBase, + OverlayByLayer, + OverlayByPolygon, + ProjectBase, + ProjectByLayer, + ProjectBySRID } from '../../service/Igserver/MRFWS'; import { - CalArea, - CalPolyLineLength, - CalServiceBase, - CProjectBySRSID, - CProjectParam, - GeometryAnalysisBase, - ProjectDots, - ProjectRang, - Smooth, - TopAnalysis + CalArea, + CalPolyLineLength, + CalServiceBase, + CProjectBySRSID, + CProjectParam, + GeometryAnalysisBase, + ProjectDots, + ProjectRang, + Smooth, + TopAnalysis } from '../../service/Igserver/MRGS'; import { - GetDocImageService, - GetLayerImageService, - GetMapImageService, - GetMapInfoService, - GetTileImageService, - MapServiceBase + GetDocImageService, + GetLayerImageService, + GetMapImageService, + GetMapInfoService, + GetTileImageService, + MapServiceBase } from '../../service/Igserver/MRMS'; import { - CAllOtherDataItemInfoSource, - CAnnInfo, - CChartLabelFormat, - CChartTheme, - CChartThemeInfo, - CChartThemeRepresentInfo, - CChartType, - CDotDensityTheme, - CFourColorTheme, - CGraduatedSymbolTheme, - CLinInfo, - CMultiClassTheme, - CPntInfo, - CRandomTheme, - CRangeTheme, - CRangeThemeInfo, - CRegInfo, - CSimpleTheme, - CTheme, - CThemeInfo, - CUniqueTheme, - CUniqueThemeInfo, - ExpInfo, - FolderInfo, - FolderInfoAttribute, - ItemValue, - ThemeOper, - ThemesInfo + CAllOtherDataItemInfoSource, + CAnnInfo, + CChartLabelFormat, + CChartTheme, + CChartThemeInfo, + CChartThemeRepresentInfo, + CChartType, + CDotDensityTheme, + CFourColorTheme, + CGraduatedSymbolTheme, + CLinInfo, + CMultiClassTheme, + CPntInfo, + CRandomTheme, + CRangeTheme, + CRangeThemeInfo, + CRegInfo, + CSimpleTheme, + CTheme, + CThemeInfo, + CUniqueTheme, + CUniqueThemeInfo, + ExpInfo, + FolderInfo, + FolderInfoAttribute, + ItemValue, + ThemeOper, + ThemesInfo } from '../../service/Igserver/theme'; -import { - EPSG4214, - EPSG4490, - EPSG4610 -} from '../../leaflet/crs'; +import { EPSG4214, EPSG4490, EPSG4610 } from '../../leaflet/crs'; -import { - WMSCapabilities, - WMTSCapabilities, - OGCWMTSInfo, - OGCWMSInfo -} from '../../service/OGC'; +import { WMSCapabilities, WMTSCapabilities, OGCWMTSInfo, OGCWMSInfo } from '../../service/OGC'; export { - MapDocLayer, - MapTileLayer, - MapWMTSLayer, - MapVectorLayer, - CRS, - crs, + MapDocLayer, + MapTileLayer, + MapWMTSLayer, + MapVectorLayer, + CRS, + crs, ArcGISLayer, - TDTLayer, + TDTLayer, BaiduTileLayer, TiandituType, GoogleLayerType, ArcGISLayerType, OpenStreetLayerType - // TDT_WGS84, - // TDT_Mercator -}; - -export { - EPSG4214, - EPSG4490, - EPSG4610 + // TDT_WGS84, + // TDT_Mercator }; -export { - ServiceBase -}; +export { EPSG4214, EPSG4490, EPSG4610 }; +export { ServiceBase }; export { - AnyLine, - Arc, - Zondy, - CAttStruct, - CAttDataRow, - CDisplayStyle, - CDisplayStyleExtend, - CDynNoteInfo, - CGDBInfo, - Circle, - CLineInfo, - CPointInfo, - CRegionInfo, - DynNoteLableType, - DynShowStyle, - XClsType, - VectClsType, - FeatureType, - FontShape, - LabelLinType, - LabelRegType, - LabelPntType, - RepeatType, - LabelSpreadType, - LineConstrain, - EightDirType, - ISShowArc, - NetAnalyType, - NetElemType, - CLinAdjustType, - CLinHeadType, - CLinJointType, - CLinStyleMakeType, - CItemType, - MapType, - LayerStatusType, - Feature, - FeatureGeometry, - FeatureGraphicBase, - FeatureSet, - GLine, - GPoint, - GRegion, - LabelLinInfo, - LabelRegInfo, - LablePntInfo, - MultiPolygon, - Point2D, - Polygon, - PolyLine, - Rectangle, - Tangram, - VectCls, - WebGraphicsInfo, - extend, - isArray, - extendDeep, - copy, - copyExcluce, - reset, - getElement, - isElement, - removeItem, - indexOf, - modifyDOMElement, - applyDefaults, - getParameterString, - getWFParameterString, - urlAppend, - getParameters, - IS_GECKO, - Browser, - getBrowser, - isSupportCanvas, - supportCanvas, - isInTheSameDomain, - toJSON, - transformResult, - copyAttributes, - copyAttributesWithClip, - cloneObject, - newGuid, - bind, - bindAsEventListener, - getTopAnalysisResult, - ChineseToUtf8, - DeepMerge, - merge, - mixin -}; -export { - ContourNoteParam, - ContourParam, - ContourZValue, - ContourRegionInfo, - MeshingParam, - NetAnalyse, - NetAnalysisExtent, - SlopLineParam -}; -export { - CommonServiceBase, - Events, - CORS, - RequestTimeout, - FetchRequest, - IgsServiceBase, - JSONFormat + AnyLine, + Arc, + Zondy, + CAttStruct, + CAttDataRow, + CDisplayStyle, + CDisplayStyleExtend, + CDynNoteInfo, + CGDBInfo, + Circle, + CLineInfo, + CPointInfo, + CRegionInfo, + DynNoteLableType, + DynShowStyle, + XClsType, + VectClsType, + FeatureType, + FontShape, + LabelLinType, + LabelRegType, + LabelPntType, + RepeatType, + LabelSpreadType, + LineConstrain, + EightDirType, + ISShowArc, + NetAnalyType, + NetElemType, + CLinAdjustType, + CLinHeadType, + CLinJointType, + CLinStyleMakeType, + CItemType, + MapType, + LayerStatusType, + Feature, + FeatureGeometry, + FeatureGraphicBase, + FeatureSet, + GLine, + GPoint, + GRegion, + LabelLinInfo, + LabelRegInfo, + LablePntInfo, + MultiPolygon, + Point2D, + Polygon, + PolyLine, + Rectangle, + Tangram, + VectCls, + WebGraphicsInfo, + extend, + isArray, + extendDeep, + copy, + copyExcluce, + reset, + getElement, + isElement, + removeItem, + indexOf, + modifyDOMElement, + applyDefaults, + getParameterString, + getWFParameterString, + urlAppend, + getParameters, + IS_GECKO, + Browser, + getBrowser, + isSupportCanvas, + supportCanvas, + isInTheSameDomain, + toJSON, + transformResult, + copyAttributes, + copyAttributesWithClip, + cloneObject, + newGuid, + bind, + bindAsEventListener, + getTopAnalysisResult, + ChineseToUtf8, + DeepMerge, + merge, + mixin }; +export { ContourNoteParam, ContourParam, ContourZValue, ContourRegionInfo, MeshingParam, NetAnalyse, NetAnalysisExtent, SlopLineParam }; +export { CommonServiceBase, Events, CORS, RequestTimeout, FetchRequest, IgsServiceBase, JSONFormat }; +export { ColorInfo, GDBInfo, MapDoc, CatalogService, TileLayer, VectorLayer }; +export { G3DLayerType, M3DTileDataInfo, G3DMapDoc, G3DService }; export { - ColorInfo, - GDBInfo, - MapDoc, - CatalogService, - TileLayer, - VectorLayer + EditDocFeature, + EditLayerFeature, + EditServiceBase, + MultiGeoQuery, + MultiGeoQueryParameter, + ObjClsQuery, + ObjClsQueryParameter, + QueryByLayerParameter, + QueryDocFeature, + QueryFeatureRule, + QueryFeatureStruct, + QueryLayerFeature, + QueryParameter, + QueryParameterBase, + QueryServiceBase }; export { - EditDocFeature, - EditLayerFeature, - EditServiceBase, - MultiGeoQuery, - MultiGeoQueryParameter, - ObjClsQuery, - ObjClsQueryParameter, - QueryByLayerParameter, - QueryDocFeature, - QueryFeatureRule, - QueryFeatureStruct, - QueryLayerFeature, - QueryParameter, - QueryParameterBase, - QueryServiceBase + AnalysisBase, + ClassBufferBase, + ClassBufferByMultiplyRing, + ClassBufferBySingleRing, + ClipBase, + ClipByCircle, + ClipByLayer, + ClipByPolygon, + ContourAnalyse, + FeatureBuffBase, + FeatureBuffByMultiplyRing, + FeatureBuffBySingleRing, + NetAnalysis, + OverlayBase, + OverlayByLayer, + OverlayByPolygon, + ProjectBase, + ProjectByLayer, + ProjectBySRID }; export { - AnalysisBase, - ClassBufferBase, - ClassBufferByMultiplyRing, - ClassBufferBySingleRing, - ClipBase, - ClipByCircle, - ClipByLayer, - ClipByPolygon, - ContourAnalyse, - FeatureBuffBase, - FeatureBuffByMultiplyRing, - FeatureBuffBySingleRing, - NetAnalysis, - OverlayBase, - OverlayByLayer, - OverlayByPolygon, - ProjectBase, - ProjectByLayer, - ProjectBySRID + CalArea, + CalPolyLineLength, + CalServiceBase, + CProjectBySRSID, + CProjectParam, + GeometryAnalysisBase, + ProjectDots, + ProjectRang, + Smooth, + TopAnalysis }; +export { GetDocImageService, GetLayerImageService, GetMapImageService, GetMapInfoService, GetTileImageService, MapServiceBase }; export { - CalArea, - CalPolyLineLength, - CalServiceBase, - CProjectBySRSID, - CProjectParam, - GeometryAnalysisBase, - ProjectDots, - ProjectRang, - Smooth, - TopAnalysis -}; -export { - GetDocImageService, - GetLayerImageService, - GetMapImageService, - GetMapInfoService, - GetTileImageService, - MapServiceBase -}; -export { - CAllOtherDataItemInfoSource, - CAnnInfo, - CChartLabelFormat, - CChartTheme, - CChartThemeInfo, - CChartThemeRepresentInfo, - CChartType, - CDotDensityTheme, - CFourColorTheme, - CGraduatedSymbolTheme, - CLinInfo, - CMultiClassTheme, - CPntInfo, - CRandomTheme, - CRangeTheme, - CRangeThemeInfo, - CRegInfo, - CSimpleTheme, - CTheme, - CThemeInfo, - CUniqueTheme, - CUniqueThemeInfo, - ExpInfo, - FolderInfo, + CAllOtherDataItemInfoSource, + CAnnInfo, + CChartLabelFormat, + CChartTheme, + CChartThemeInfo, + CChartThemeRepresentInfo, + CChartType, + CDotDensityTheme, + CFourColorTheme, + CGraduatedSymbolTheme, + CLinInfo, + CMultiClassTheme, + CPntInfo, + CRandomTheme, + CRangeTheme, + CRangeThemeInfo, + CRegInfo, + CSimpleTheme, + CTheme, + CThemeInfo, + CUniqueTheme, + CUniqueThemeInfo, + ExpInfo, + FolderInfo, FolderInfoAttribute, ItemValue, ThemeOper, ThemesInfo }; -export { - WMSCapabilities, - WMTSCapabilities, - OGCWMTSInfo, - OGCWMSInfo -}; +export { WMSCapabilities, WMTSCapabilities, OGCWMTSInfo, OGCWMSInfo }; import { - GeoFeatureThemeLayer, - ThemeLayer, - RangeThemeLayer, - UniqueThemeLayer, - GraphThemeLayer, - graphThemeLayer, - RandomThemeLayer, - SimpleThemeLayer, - RankSymbolThemeLayer, - ThemeStyle + GeoFeatureThemeLayer, + ThemeLayer, + RangeThemeLayer, + UniqueThemeLayer, + GraphThemeLayer, + graphThemeLayer, + RandomThemeLayer, + SimpleThemeLayer, + RankSymbolThemeLayer, + ThemeStyle } from '../../leaflet/theme'; export { - GeoFeatureThemeLayer, - ThemeLayer, - RangeThemeLayer, - UniqueThemeLayer, - GraphThemeLayer, - graphThemeLayer, - RandomThemeLayer, - SimpleThemeLayer, - RankSymbolThemeLayer, - ThemeStyle + GeoFeatureThemeLayer, + ThemeLayer, + RangeThemeLayer, + UniqueThemeLayer, + GraphThemeLayer, + graphThemeLayer, + RandomThemeLayer, + SimpleThemeLayer, + RankSymbolThemeLayer, + ThemeStyle }; import { - Bar, - Bar3D, - OverlayCircle, - Graph, - Line, - Pie, - OverlayPoint, - RankSymbol, - Ring, - ThemeVector, + Bar, + Bar3D, + OverlayCircle, + Graph, + Line, + Pie, + OverlayPoint, + RankSymbol, + Ring, + ThemeVector, ShapeFactory, ShapeParameters, FeatureCircle, @@ -582,16 +514,16 @@ import { SUtil } from '../../common/overlay'; export { - Bar, - Bar3D, - OverlayCircle, - Graph, - Line, - Pie, - OverlayPoint, - RankSymbol, - Ring, - ThemeVector, + Bar, + Bar3D, + OverlayCircle, + Graph, + Line, + Pie, + OverlayPoint, + RankSymbol, + Ring, + ThemeVector, ShapeFactory, ShapeParameters, FeatureCircle, @@ -644,16 +576,16 @@ export { SUtil }; -// 大数据相关 +// 大数据相关 import { EchartsLayer, MapvLayer, StreamLayer, HeaterLayer, - ClusterLayer, - MarkerClusterLayer, - AnimatedMarkerLayer, - TimeDimension, + ClusterLayer, + MarkerClusterLayer, + AnimatedMarkerLayer, + TimeDimension, TimeDimensionControl, TimeDimensionLayer, TimeDimensionLayerGeoJson, @@ -667,14 +599,14 @@ export { MapvLayer, StreamLayer, HeaterLayer, - ClusterLayer, - MarkerClusterLayer, - AnimatedMarkerLayer, - TimeDimension, + ClusterLayer, + MarkerClusterLayer, + AnimatedMarkerLayer, + TimeDimension, TimeDimensionControl, TimeDimensionLayer, TimeDimensionLayerGeoJson, TimeDimensionLayerWMS, TimeDimensionPlayer, TimeDimensionUtil -} +}; diff --git a/src/config/opensource/mapbox_index.js b/src/config/opensource/mapbox_index.js index 9920b7104..8cfeacd6b 100644 --- a/src/config/opensource/mapbox_index.js +++ b/src/config/opensource/mapbox_index.js @@ -115,6 +115,8 @@ import { CommonServiceBase, Events, CORS, RequestTimeout, FetchRequest, IgsServi import { ColorInfo, GDBInfo, MapDoc, CatalogService, TileLayer, VectorLayer } from '../../service/Igserver/MRCS'; +import { G3DLayerType, M3DTileDataInfo, G3DMapDoc, G3DService } from '../../service/Igserver/G3D'; + import { EditDocFeature, EditLayerFeature, @@ -307,6 +309,7 @@ export { export { ContourNoteParam, ContourParam, ContourZValue, ContourRegionInfo, MeshingParam, NetAnalyse, NetAnalysisExtent, SlopLineParam }; export { CommonServiceBase, Events, CORS, RequestTimeout, FetchRequest, IgsServiceBase, JSONFormat }; export { ColorInfo, GDBInfo, MapDoc, CatalogService, TileLayer, VectorLayer }; +export { G3DLayerType, M3DTileDataInfo, G3DMapDoc, G3DService }; export { EditDocFeature, EditLayerFeature, diff --git a/src/config/opensource/openlayers_index.js b/src/config/opensource/openlayers_index.js index d3a3dff9b..1deed2aa8 100644 --- a/src/config/opensource/openlayers_index.js +++ b/src/config/opensource/openlayers_index.js @@ -198,7 +198,7 @@ import * as _ol_tilegrid_WMTS from 'ol/tilegrid/WMTS'; import * as _ol_xml from 'ol/xml'; import * as ol_has from 'ol/has'; -let ol = window['ol'] = {}; +let ol = (window['ol'] = {}); ol.color = {}; ol.colorlike = {}; ol.control = {}; @@ -391,7 +391,6 @@ ol.geom.Polygon.circular = _ol_geom_Polygon.circular; ol.geom.Polygon.fromCircle = _ol_geom_Polygon.fromCircle; ol.geom.Polygon.fromExtent = _ol_geom_Polygon.fromExtent; - //重写ol.geom.Polygon /** * Set the coordinates of the polygon. @@ -407,8 +406,7 @@ ol.geom.Polygon.prototype.setCoordinates = function (coordinates, opt_layout) { if (!this.flatCoordinates) { this.flatCoordinates = []; } - var ends = deflateCoordinatesArray( - this.flatCoordinates, 0, coordinates, this.stride, this.ends_); + var ends = deflateCoordinatesArray(this.flatCoordinates, 0, coordinates, this.stride, this.ends_); this.flatCoordinates.length = ends.length === 0 ? 0 : ends[ends.length - 1]; this.changed(); } @@ -551,7 +549,6 @@ ol.tilegrid.createXYZ = _ol_tilegrid.createXYZ; ol.xml.getAllTextContent = _ol_xml.getAllTextContent; ol.xml.parse = _ol_xml.parse; - import { ZDTileDebug, MapDocTileSource, @@ -629,22 +626,9 @@ import { goog } from '../../openlayers/extend'; -export { - Drag, - MilStd, - MilStdDrawTool, - MilStdModifyTool, - MilStdDragPan, - EnumMilstdType, - MilstdParams, - PolygonJSON, - ZDOverviewMap, - goog -}; +export { Drag, MilStd, MilStdDrawTool, MilStdModifyTool, MilStdDragPan, EnumMilstdType, MilstdParams, PolygonJSON, ZDOverviewMap, goog }; -import { - ServiceBase -} from '../../service/ServiceBase'; +import { ServiceBase } from '../../service/ServiceBase'; import { AnyLine, @@ -750,24 +734,11 @@ import { SlopLineParam } from '../../service/Igserver/extend'; -import { - CommonServiceBase, - Events, - CORS, - RequestTimeout, - FetchRequest, - IgsServiceBase, - JSONFormat -} from '../../service/baseserver'; +import { CommonServiceBase, Events, CORS, RequestTimeout, FetchRequest, IgsServiceBase, JSONFormat } from '../../service/baseserver'; -import { - ColorInfo, - GDBInfo, - MapDoc, - CatalogService, - TileLayer, - VectorLayer -} from '../../service/Igserver/MRCS'; +import { ColorInfo, GDBInfo, MapDoc, CatalogService, TileLayer, VectorLayer } from '../../service/Igserver/MRCS'; + +import { G3DLayerType, M3DTileDataInfo, G3DMapDoc, G3DService } from '../../service/Igserver/G3D'; import { EditDocFeature, @@ -832,7 +803,6 @@ import { MapServiceBase } from '../../service/Igserver/MRMS'; - import { CAllOtherDataItemInfoSource, CAnnInfo, @@ -863,11 +833,9 @@ import { ThemeOper, ThemesInfo } from '../../service/Igserver/theme'; -import { CoordinateElpTrans } from "../../service/Igserver/MRGS/CoordinateElpTrans"; +import { CoordinateElpTrans } from '../../service/Igserver/MRGS/CoordinateElpTrans'; -export { - ServiceBase -}; +export { ServiceBase }; export { AnyLine, @@ -961,33 +929,10 @@ export { mixin, createCanvasContext2D }; -export { - ContourNoteParam, - ContourParam, - ContourZValue, - ContourRegionInfo, - MeshingParam, - NetAnalyse, - NetAnalysisExtent, - SlopLineParam -}; -export { - CommonServiceBase, - Events, - CORS, - RequestTimeout, - FetchRequest, - IgsServiceBase, - JSONFormat -}; -export { - ColorInfo, - GDBInfo, - MapDoc, - CatalogService, - TileLayer, - VectorLayer -}; +export { ContourNoteParam, ContourParam, ContourZValue, ContourRegionInfo, MeshingParam, NetAnalyse, NetAnalysisExtent, SlopLineParam }; +export { CommonServiceBase, Events, CORS, RequestTimeout, FetchRequest, IgsServiceBase, JSONFormat }; +export { ColorInfo, GDBInfo, MapDoc, CatalogService, TileLayer, VectorLayer }; +export { G3DLayerType, M3DTileDataInfo, G3DMapDoc, G3DService }; export { EditDocFeature, EditLayerFeature, @@ -1040,14 +985,7 @@ export { TopAnalysis, CoordinateElpTrans }; -export { - GetDocImageService, - GetLayerImageService, - GetMapImageService, - GetMapInfoService, - GetTileImageService, - MapServiceBase -}; +export { GetDocImageService, GetLayerImageService, GetMapImageService, GetMapInfoService, GetTileImageService, MapServiceBase }; export { CAllOtherDataItemInfoSource, CAnnInfo, @@ -1080,38 +1018,38 @@ export { }; import { - GeoFeatureThemeLayer, - ThemeLayer, - RangeThemeLayer, - UniqueThemeLayer, - GraphThemeLayer, - graphThemeLayer, - RandomThemeLayer, - SimpleThemeLayer, - RankSymbolThemeLayer, - ThemeStyle + GeoFeatureThemeLayer, + ThemeLayer, + RangeThemeLayer, + UniqueThemeLayer, + GraphThemeLayer, + graphThemeLayer, + RandomThemeLayer, + SimpleThemeLayer, + RankSymbolThemeLayer, + ThemeStyle } from '../../openlayers/theme'; export { - GeoFeatureThemeLayer, - ThemeLayer, - RangeThemeLayer, - UniqueThemeLayer, - GraphThemeLayer, - graphThemeLayer, - RandomThemeLayer, - SimpleThemeLayer, - RankSymbolThemeLayer, - ThemeStyle + GeoFeatureThemeLayer, + ThemeLayer, + RangeThemeLayer, + UniqueThemeLayer, + GraphThemeLayer, + graphThemeLayer, + RandomThemeLayer, + SimpleThemeLayer, + RankSymbolThemeLayer, + ThemeStyle }; import { /* MapvLayer, */ MapvSource -} from '../../openlayers/overlay/index' +} from '../../openlayers/overlay/index'; export { /* MapvLayer, */ MapvSource -} +}; ol.source.Mapv = MapvSource; // ol.zondy.MapvLayer = MapvLayer; diff --git a/src/mapboxgl/build.txt b/src/mapboxgl/build.txt new file mode 100644 index 000000000..553dca65c --- /dev/null +++ b/src/mapboxgl/build.txt @@ -0,0 +1,84 @@ +yarn run v1.22.4 +$ npm run build-debug && npm run build-release + +> @mapgis/webclient-es6-mapboxgl@16.1.11 build-debug D:\code\web\package\webclient-javascript\src\mapboxgl +> webpack --config webpack/mapbox-es6-debug-config.js + +Hash: 94f9f911678c86b60ed8 +Version: webpack 4.19.1 +Time: 6722ms +Built at: 2022/10/07 16:40:21 + Asset Size Chunks Chunk Names +webclient-es6-mapboxgl.js 4.66 MiB main [emitted] main +[./MapExtend.js] 5.13 KiB {main} [built] +[./index.js] 1.08 KiB {main} [built] +[./layer/ArcGISLayer.js] 4.22 KiB {main} [built] +[./layer/TDTLayer.js] 9.72 KiB {main} [built] +[./layer/index.js] 550 bytes {main} [built] +[./layer/mapDocLayer.js] 9.61 KiB {main} [built] +[./layer/mapTileLayer.js] 5.98 KiB {main} [built] +[./layer/mapVectorLayer.js] 6.33 KiB {main} [built] +[./layer/mapWmsLayer.js] 7.12 KiB {main} [built] +[./layer/mapWmtsLayer.js] 6.53 KiB {main} [built] +[./layer/mapboxBase.js] 427 bytes {main} [built] +[./overlay/DeckglLayer.js] 26.8 KiB {main} [built] +[./overlay/EchartsLayer.js] 11.1 KiB {main} [built] +[./overlay/index.js] 365 bytes {main} [built] +[./theme/index.js] 1.11 KiB {main} [built] + + 537 hidden modules + +WARNING in ./index.js 12:0-14:2 +"export 'FabricLayer' was not found in './overlay/index.js' + +> @mapgis/webclient-es6-mapboxgl@16.1.11 build-release D:\code\web\package\webclient-javascript\src\mapboxgl +> webpack --config webpack/mapbox-es6-release-config.js + +Hash: 5be37e9e01311ea54f9d +Version: webpack 4.19.1 +Time: 24232ms +Built at: 2022/10/07 16:40:48 + Asset Size Chunks Chunk Names +webclient-es6-mapboxgl.min.js 1.4 MiB 0 [emitted] [big] main + [0] external "mapboxgl" 42 bytes {0} [built] + [4] external "function(){try{return echarts}catch(e){return {}}}()" 42 bytes {0} [built] +[10] (webpack)/buildin/global.js 489 bytes {0} [built] +[12] external "function(){try{return mapv}catch(e){return {}}}()" 42 bytes {0} [built] +[35] (webpack)/buildin/module.js 497 bytes {0} [built] +[66] ./util.inspect (ignored) 15 bytes {0} [built] +[68] ./index.js + 483 modules 2.42 MiB {0} [built] + | ./index.js 1.08 KiB [built] + | ./MapExtend.js 5.13 KiB [built] + | ./layer/index.js 550 bytes [built] + | ./theme/index.js 1.11 KiB [built] + | ./overlay/index.js 365 bytes [built] + | ./layer/mapboxBase.js 427 bytes [built] + | ./layer/mapDocLayer.js 9.61 KiB [built] + | ./layer/mapTileLayer.js 5.98 KiB [built] + | ./layer/mapWmsLayer.js 7.12 KiB [built] + | ./layer/mapWmtsLayer.js 6.53 KiB [built] + | ./layer/mapVectorLayer.js 6.33 KiB [built] + | ./layer/ArcGISLayer.js 4.22 KiB [built] + | ./layer/TDTLayer.js 9.72 KiB [built] + | ./theme/ThemeLayer.js 21.9 KiB [built] + | ./theme/GeoFeatureThemeLayer.js 15.1 KiB [built] + | + 469 hidden modules + + 62 hidden modules + +WARNING in ./index.js 12:0-14:2 +"export 'FabricLayer' was not found in './overlay/index.js' + +WARNING in asset size limit: The following asset(s) exceed the recommended size limit (244 KiB). +This can impact web performance. +Assets: + webclient-es6-mapboxgl.min.js (1.4 MiB) + +WARNING in entrypoint size limit: The following entrypoint(s) combined asset size exceeds the recommended limit (244 KiB). This can impact web performance. +Entrypoints: + main (1.4 MiB) + webclient-es6-mapboxgl.min.js + + +WARNING in webpack performance recommendations: +You can limit the size of your bundles by using import() or require.ensure to lazy load some parts of your application. +For more info visit https://webpack.js.org/guides/code-splitting/ +Done in 43.00s. diff --git a/src/mapboxgl/old_package.json b/src/mapboxgl/old_package.json new file mode 100644 index 000000000..8a41df4e9 --- /dev/null +++ b/src/mapboxgl/old_package.json @@ -0,0 +1,39 @@ +{ + "name": "@mapgis/webclient-es6-mapboxgl", + "version":"16.1.10", + "description": "", + "main1": "dist-libs/webclient-mapboxgl-plugin.min.js", + "module": "index.js", + "scripts": { + "build": "npm run build-debug && npm run build-release", + "build-debug": "webpack --config webpack/mapbox-es6-debug-config.js", + "build-release": "webpack --config webpack/mapbox-es6-release-config.js" + }, + "keywords": [ + "zondy", + "service", + "&", + "mapboxgl" + ], + "author": "Wuhan Zondy Cyber Science&Technology Co.Ltd.", + "license": "Apache-2.0", + "dependencies": { + "@mapgis/mapbox-gl": "^16.0.0", + "@mapgis/webclient-es6-service": "^16.0.0", + "core-js": "^3.21.1", + "echarts": "^4.8.0", + "mapv": "^2.0.56" + }, + "devDependencies": { + "@babel/core": "^7.16.0", + "@babel/preset-env": "^7.16.4", + "babel-loader": "^8.2.3", + "babel-plugin-add-module-exports": "^1.0.4", + "css-loader": "^6.5.1", + "html-webpack-plugin": "^5.5.0", + "sass-loader": "^12.4.0", + "style-loader": "^3.3.1", + "ts-loader": "^9.2.6", + "webpack": "^5.65.0" + } +} diff --git a/src/mapboxgl/package.json b/src/mapboxgl/package.json index de9083102..765eb9633 100644 --- a/src/mapboxgl/package.json +++ b/src/mapboxgl/package.json @@ -1,39 +1,39 @@ { - "name": "@mapgis/webclient-es6-mapboxgl", - "version": "15.6.1", - "description": "", - "main1": "dist-libs/webclient-mapboxgl-plugin.min.js", - "module": "index.js", - "scripts": { - "build": "npm run build-debug && npm run build-release", - "build-debug": "webpack --config webpack/mapbox-es6-debug-config.js", - "build-release": "webpack --config webpack/mapbox-es6-release-config.js" - }, - "keywords": [ - "zondy", - "service", - "&", - "mapboxgl" - ], - "author": "Wuhan Zondy Cyber Science&Technology Co.Ltd.", - "license": "Apache-2.0", - "dependencies": { - "@mapgis/mapbox-gl": "^1.9.9", - "@mapgis/webclient-es6-service": "^10.5.7", - "core-js": "^3.21.1", - "echarts": "^4.8.0", - "mapv": "^2.0.56" - }, - "devDependencies": { - "@babel/core": "^7.16.0", - "@babel/preset-env": "^7.16.4", - "babel-loader": "^8.2.3", - "babel-plugin-add-module-exports": "^1.0.4", - "css-loader": "^6.5.1", - "html-webpack-plugin": "^5.5.0", - "sass-loader": "^12.4.0", - "style-loader": "^3.3.1", - "ts-loader": "^9.2.6", - "webpack": "^5.65.0" - } + "name": "@mapgis/webclient-es6-mapboxgl", + "version": "16.0.2", + "description": "", + "main1": "dist-libs/webclient-mapboxgl-plugin.min.js", + "module": "index.js", + "scripts": { + "build": "npm run build-debug && npm run build-release", + "build-debug": "webpack --config webpack/mapbox-es6-debug-config.js", + "build-release": "webpack --config webpack/mapbox-es6-release-config.js" + }, + "keywords": [ + "zondy", + "service", + "&", + "mapboxgl" + ], + "author": "Wuhan Zondy Cyber Science&Technology Co.Ltd.", + "license": "Apache-2.0", + "dependencies": { + "@mapgis/mapbox-gl": "^16.0.0", + "@mapgis/webclient-es6-service": "^16.0.0", + "core-js": "^3.21.1", + "echarts": "^4.8.0", + "mapv": "^2.0.56" + }, + "devDependencies": { + "@babel/core": "^7.16.0", + "@babel/preset-env": "^7.16.4", + "babel-loader": "^8.2.3", + "babel-plugin-add-module-exports": "^1.0.4", + "css-loader": "^6.5.1", + "html-webpack-plugin": "^5.5.0", + "sass-loader": "^12.4.0", + "style-loader": "^3.3.1", + "ts-loader": "^9.2.6", + "webpack": "^5.65.0" + } } diff --git a/src/mapboxgl/result.txt b/src/mapboxgl/result.txt new file mode 100644 index 000000000..948299f47 --- /dev/null +++ b/src/mapboxgl/result.txt @@ -0,0 +1 @@ +true diff --git a/src/service/.babelrc b/src/service/.babelrc new file mode 100644 index 000000000..9571d018a --- /dev/null +++ b/src/service/.babelrc @@ -0,0 +1,5 @@ +{ + "compact": false, + "ast": false, + "presets": [["es2015", { "modules": false }]] +} diff --git a/src/service/Igserver/G3D/G3DMapDoc.js b/src/service/Igserver/G3D/G3DMapDoc.js index d976c9cec..1d9b3b45e 100644 --- a/src/service/Igserver/G3D/G3DMapDoc.js +++ b/src/service/Igserver/G3D/G3DMapDoc.js @@ -278,9 +278,9 @@ class G3DMapDoc extends G3DService { mapdoc.GetDocInfo(function(res){ console.log('GetDocInfo'); console.log(res) - },false,false,function (error) { + },function (error) { console.log(error) - },false); + }); */ GetDocInfo(onSuccess, onError) { var me = this; @@ -320,9 +320,9 @@ class G3DMapDoc extends G3DService { mapdoc.GetLayerInfo(function(res){ console.log('GetLayerInfo'); console.log(res) - },false,false,function (error) { + },function (error) { console.log(error) - },false); + }); */ GetLayerInfo(onSuccess, onError) { var me = this; @@ -381,9 +381,9 @@ class G3DMapDoc extends G3DService { mapdoc.GetFeature(function(res){ console.log('GetFeature'); console.log(res) - },false,false,function (error) { + },function (error) { console.log(error) - },false); + }); */ GetFeature(onSuccess, onError) { var me = this; @@ -479,9 +479,9 @@ class G3DMapDoc extends G3DService { mapdoc.SetSystemLibraryByDoc(function(res){ console.log('SetSystemLibraryByDoc'); console.log(res) - },false,false,function (error) { + },function (error) { console.log(error) - },false); + }); */ SetSystemLibraryByDoc(onSuccess, onError) { var me = this; diff --git a/src/service/build.txt b/src/service/build.txt new file mode 100644 index 000000000..fb8aa997b --- /dev/null +++ b/src/service/build.txt @@ -0,0 +1,59 @@ +yarn run v1.22.4 +$ npm run build-debug && npm run build-release + +> @mapgis/webclient-es6-service@16.1.12 build-debug D:\code\web\package\webclient-javascript\src\service +> webpack --config webpack/service-debug-config.js + +Happy[js]: Version: 5.0.1. Threads: 4 (shared pool) +Happy[js]: All set; signaling webpack to proceed. +Hash: 50b1659383fa40e9be7b +Version: webpack 4.19.1 +Time: 6528ms +Built at: 2022/10/07 16:38:35 + Asset Size Chunks Chunk Names +webclient-es6-service.js 8.79 MiB main [emitted] main +[./ArcGis/index.js] 2.75 KiB {main} [built] +[./Igserver/index.js] 1.36 KiB {main} [built] +[./OGC/index.js] 634 bytes {main} [built] +[./OpenGeospatialConsortium/index.js] 278 bytes {main} [built] +[./base/crs/index.js] 260 bytes {main} [built] +[./base/format/geojson/index.js] 372 bytes {main} [built] +[./base/renderer/index.js] 1.88 KiB {main} [built] +[./base/style/index.js] 1.65 KiB {main} [built] +[./base/symbols/index.js] 5.98 KiB {main} [built] +[./baseserver/index.js] 1.15 KiB {main} [built] +[./clouddisk/index.js] 788 bytes {main} [built] +[./common/index.js] 7.65 KiB {main} [built] +[./datastore/elasticsearch/index.js] 2.13 KiB {main} [built] +[./datastore/postgis/index.js] 1.55 KiB {main} [built] +[./index.js] 3.96 KiB {main} [built] + + 573 hidden modules + +> @mapgis/webclient-es6-service@16.1.12 build-release D:\code\web\package\webclient-javascript\src\service +> webpack --config webpack/service-release-config.js + +Happy[js]: Version: 5.0.1. Threads: 4 (shared pool) +Happy[js]: All set; signaling webpack to proceed. +Hash: 18d670aa7b35ce20e8d9 +Version: webpack 4.19.1 +Time: 20926ms +Built at: 2022/10/07 16:38:58 + Asset Size Chunks Chunk Names +webclient-es6-service.min.js 1.32 MiB 0 [emitted] main + [4] ./common/index.js 7.65 KiB {0} [built] + [24] ./base/symbols/index.js 5.98 KiB {0} [built] +[196] ./index.js 3.96 KiB {0} [built] +[197] ./utils/index.js 249 bytes {0} [built] +[228] ./base/style/index.js 1.65 KiB {0} [built] +[244] ./base/renderer/index.js 1.88 KiB {0} [built] +[254] ./base/format/geojson/index.js 372 bytes {0} [built] +[256] ./base/crs/index.js 260 bytes {0} [built] +[317] ./baseserver/index.js 1.15 KiB {0} [built] +[322] ./Igserver/index.js 1.36 KiB {0} [built] +[380] ./OGC/index.js 634 bytes {0} [built] +[408] ./OpenGeospatialConsortium/index.js 278 bytes {0} [built] +[422] ./datastore/elasticsearch/index.js 2.13 KiB {0} [built] +[429] ./datastore/postgis/index.js 1.55 KiB {0} [built] +[435] ./clouddisk/index.js 788 bytes {0} [built] + + 440 hidden modules +Done in 31.23s. diff --git a/src/service/old_package.json b/src/service/old_package.json new file mode 100644 index 000000000..a2786cd16 --- /dev/null +++ b/src/service/old_package.json @@ -0,0 +1,39 @@ +{ + "name": "@mapgis/webclient-es6-service", + "version":"16.1.11", + "description": "mapgis ES6 format for igserver", + "main1": "dist-libs/webclient-es6-service.min.js", + "module": "index.js", + "scripts": { + "build": "npm run build-debug && npm run build-release", + "build-debug": "webpack --config webpack/service-debug-config.js", + "build-release": "webpack --config webpack/service-release-config.js" + }, + "author": "Wuhan Zondy Cyber Science&Technology Co.Ltd.", + "license": "Apache-2.0", + "dependencies": { + "@turf/turf": "^6.5.0", + "axios": "^0.26.0", + "core-js": "^3.21.1", + "fast-xml-parser": "^3.17.6", + "fetch-ie8": "^1.5.0", + "proj4": "^2.7.5", + "promise-polyfill": "^8.2.1", + "qs": "^6.9.4", + "svg-pathdata": "^6.0.0" + }, + "devDependencies": { + "babel-core": "^6.26.3", + "babel-eslint": "^10.1.0", + "babel-loader": "^7.1.2", + "babel-plugin-transform-class-properties": "^6.11.5", + "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-preset-es2015": "^6.24.1", + "happypack": "^5.0.0", + "webpack": "4.19.1", + "webpack-cleanup-plugin": "0.4.2", + "webpack-cli": "2.1.5", + "webpack-parallel-uglify-plugin": "0.4.2" + } +} diff --git a/src/service/package.json b/src/service/package.json index 13ebcb242..83387af02 100644 --- a/src/service/package.json +++ b/src/service/package.json @@ -1,7 +1,7 @@ { "name": "@mapgis/webclient-es6-service", - "version": "15.6.1", - "description": "中地数码基于ES6语法针对igserver的服务封装", + "version": "16.0.2", + "description": "mapgis ES6 format for igserver", "main1": "dist-libs/webclient-es6-service.min.js", "module": "index.js", "scripts": { @@ -23,6 +23,13 @@ "svg-pathdata": "^6.0.0" }, "devDependencies": { + "babel-core": "^6.26.3", + "babel-eslint": "^10.1.0", + "babel-loader": "^7.1.2", + "babel-plugin-transform-class-properties": "^6.11.5", + "babel-plugin-transform-decorators-legacy": "^1.3.4", + "babel-plugin-transform-runtime": "^6.15.0", + "babel-preset-es2015": "^6.24.1", "happypack": "^5.0.0", "webpack": "4.19.1", "webpack-cleanup-plugin": "0.4.2", diff --git a/src/service/result.txt b/src/service/result.txt new file mode 100644 index 000000000..948299f47 --- /dev/null +++ b/src/service/result.txt @@ -0,0 +1 @@ +true diff --git a/src/service/yarn-error.log b/src/service/yarn-error.log new file mode 100644 index 000000000..ba921c436 --- /dev/null +++ b/src/service/yarn-error.log @@ -0,0 +1,63 @@ +Arguments: + C:\Program Files\nodejs\node.exe C:\Program Files (x86)\Yarn\bin\yarn.js build + +PATH: + E:\GIS\OSM\osm2pgsql;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Windows\System32\OpenSSH\;D:\develop\git\Git\cmd;C:\Users\Administrator\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\ProgramData\chocolatey\bin;E:\GIS\OSM\osmosis\bin;E:\GIS\PostGreSQL\bin;C:\Users\Administrator\AppData\Roaming\npm;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\Program Files\NVIDIA Corporation\NVIDIA NvDLISR;C:\Program Files\nodejs\;C:\Program Files (x86)\Yarn\bin\;C:\Users\Administrator\AppData\Local\Microsoft\WindowsApps;C:\Users\Administrator\AppData\Local\Yarn\bin + +Yarn version: + 1.22.4 + +Node version: + 14.20.0 + +Platform: + win32 x64 + +Trace: + SyntaxError: D:\code\web\package\webclient-javascript\src\service\package.json: Unexpected token + in JSON at position 119 + at JSON.parse () + at C:\Program Files (x86)\Yarn\lib\cli.js:1625:59 + at Generator.next () + at step (C:\Program Files (x86)\Yarn\lib\cli.js:310:30) + at C:\Program Files (x86)\Yarn\lib\cli.js:321:13 + +npm manifest: + { + "name": "@mapgis/webclient-es6-service", + "version":"16.0.0", + "description": "中地数码基于ES6语法针对igserver的服务封�?, + "main1": "dist-libs/webclient-es6-service.min.js", + "module": "index.js", + "scripts": { + "build": "npm run build-debug && npm run build-release", + "build-debug": "webpack --config webpack/service-debug-config.js", + "build-release": "webpack --config webpack/service-release-config.js" + }, + "author": "Wuhan Zondy Cyber Science&Technology Co.Ltd.", + "license": "Apache-2.0", + "dependencies": { + "@turf/turf": "^6.5.0", + "axios": "^0.26.0", + "core-js": "^3.21.1", + "fast-xml-parser": "^3.17.6", + "fetch-ie8": "^1.5.0", + "proj4": "^2.7.5", + "promise-polyfill": "^8.2.1", + "qs": "^6.9.4", + "svg-pathdata": "^6.0.0" + }, + "devDependencies": { + "happypack": "^5.0.0", + "webpack": "4.19.1", + "webpack-cleanup-plugin": "0.4.2", + "webpack-cli": "2.1.5", + "webpack-parallel-uglify-plugin": "0.4.2" + } + } + +yarn manifest: + No manifest + +Lockfile: + No lockfile diff --git a/website/package.json b/website/package.json index e258348ce..19a1b9d42 100644 --- a/website/package.json +++ b/website/package.json @@ -18,7 +18,7 @@ "js-cookie": "^2.2.1", "less": "3.12.2", "less-loader": "7.0.2", - "node-sass": "4.12.0", + "node-sass": "4.14.1", "prismjs": "^1.20.0", "sass-loader": "10.1.1", "splitpanes": "^2.0.0", diff --git a/website/public/static/demo/cesium-new/example/tool/model-explosion.htm b/website/public/static/demo/cesium-new/example/tool/model-explosion.htm new file mode 100644 index 000000000..eca715ef9 --- /dev/null +++ b/website/public/static/demo/cesium-new/example/tool/model-explosion.htm @@ -0,0 +1,458 @@ + + + + + + + 模型爆炸(单图层) + + + + + + + + + + +
+
+ +
单值过滤-单方向
+
单值过滤-多方向
+
分段过滤-单方向
+
分段过滤-多方向
+
属性过滤-单方向
+
属性过滤-多方向
+ + + \ No newline at end of file diff --git a/website/public/static/demo/cesium-new/example/vectortile/mapgis-vectortile-3857.htm b/website/public/static/demo/cesium-new/example/vectortile/mapgis-vectortile-3857.htm new file mode 100644 index 000000000..0bb3fb80d --- /dev/null +++ b/website/public/static/demo/cesium-new/example/vectortile/mapgis-vectortile-3857.htm @@ -0,0 +1,83 @@ + + + + + + 地层分析 + + + + + + + + + + +
+ + + \ No newline at end of file diff --git a/website/public/static/demo/cesium-new/example/vectortile/mapgis-vectortile-4326.htm b/website/public/static/demo/cesium-new/example/vectortile/mapgis-vectortile-4326.htm new file mode 100644 index 000000000..5ee3faf79 --- /dev/null +++ b/website/public/static/demo/cesium-new/example/vectortile/mapgis-vectortile-4326.htm @@ -0,0 +1,117 @@ + + + + + + 地层分析 + + + + + + + + + + + +
+
+
改变布局属性
+
改变画笔属性
+
改变过滤属性
+
改变整体样式
+
+ + + \ No newline at end of file diff --git a/website/public/static/demo/cesium-new/gallery/tool/model-explosion.png b/website/public/static/demo/cesium-new/gallery/tool/model-explosion.png new file mode 100644 index 000000000..a0bd97a40 Binary files /dev/null and b/website/public/static/demo/cesium-new/gallery/tool/model-explosion.png differ diff --git a/website/public/static/demo/cesium-new/gallery/vectortile/mapgis-vectortile-3857.png b/website/public/static/demo/cesium-new/gallery/vectortile/mapgis-vectortile-3857.png new file mode 100644 index 000000000..ce0eb4621 Binary files /dev/null and b/website/public/static/demo/cesium-new/gallery/vectortile/mapgis-vectortile-3857.png differ diff --git a/website/public/static/demo/cesium-new/gallery/vectortile/mapgis-vectortile-4326.png b/website/public/static/demo/cesium-new/gallery/vectortile/mapgis-vectortile-4326.png new file mode 100644 index 000000000..9be1cd3c1 Binary files /dev/null and b/website/public/static/demo/cesium-new/gallery/vectortile/mapgis-vectortile-4326.png differ diff --git a/website/public/static/demo/cesium/example/analysis/analysis-cube.htm b/website/public/static/demo/cesium/example/analysis/analysis-cube.htm index 780105574..749605eff 100644 --- a/website/public/static/demo/cesium/example/analysis/analysis-cube.htm +++ b/website/public/static/demo/cesium/example/analysis/analysis-cube.htm @@ -1,234 +1,208 @@ + + + + 填挖方计算 + + + + + + + - - - - - - + /** + * @description 世界坐标转经纬度坐标 + * @param cartesian - {Object} 世界坐标 + * @return {Object} 经纬度坐标 + */ + function _cartesianToDegrees(cartesian) { + const { ellipsoid } = this.viewer.scene.globe; + // 将笛卡尔坐标转换为地理坐标 + const cartographic = ellipsoid.cartesianToCartographic(cartesian); + // 将弧度转为度的十进制度表示 + const longitude = this.Cesium.Math.toDegrees(cartographic.longitude); // 转换后的经度 + const latitude = this.Cesium.Math.toDegrees(cartographic.latitude); // 转换后的纬度 + const coor = { + lon: longitude, + lat: latitude, + height: cartographic.height + }; + return coor; + } + /*移除填挖方计算*/ + function stopCutFillM() { + //移除视图中所有的实体对象 + viewer.entities.removeAll(); + //停止交互式绘制工具 + drawElement.stopDrawing(); + } + + - -
-
-

参数

- - - - - - - - - - - - - - - -
x方向采样点个数 - -
y方向采样点个数 - -
填挖规整高度 - -
-
-
-

填挖结果

- - - - - - - - - - - - - - - - - - - -
高程范围: - -
表面积: - -
挖体积: - -
填体积: - -
+ +
+
+

参数

+ + + + + + + + + + + + + + + +
x方向采样点个数 + +
y方向采样点个数 + +
填挖规整高度 + +
+
+
+

填挖结果

+ + + + + + + + + + + + + + + + + + + +
高程范围: + +
表面积: + +
挖体积: + +
填体积: + +
+
-
- - - \ No newline at end of file + + diff --git a/website/public/static/demo/cesium/example/analysis/analysis-dynamiccut.htm b/website/public/static/demo/cesium/example/analysis/analysis-dynamiccut.htm index a3607ad74..b213decf6 100644 --- a/website/public/static/demo/cesium/example/analysis/analysis-dynamiccut.htm +++ b/website/public/static/demo/cesium/example/analysis/analysis-dynamiccut.htm @@ -1,104 +1,94 @@ + + + + 动态剖切 + + + + + + - - - - - + function change() { + distance = Number(document.getElementById('range').value); + dynaCut.distance = distance; + } + + - -
-
- - 剖切距离: - + +
+
+ 剖切距离: +
-
- - - \ No newline at end of file + + diff --git a/website/public/static/demo/cesium/example/m3d/m3d-underpipe.htm b/website/public/static/demo/cesium/example/m3d/m3d-underpipe.htm index 8400a04ca..37151e9be 100644 --- a/website/public/static/demo/cesium/example/m3d/m3d-underpipe.htm +++ b/website/public/static/demo/cesium/example/m3d/m3d-underpipe.htm @@ -1,92 +1,86 @@ + + + M3D-地下管线数据展示 + + + + + + + - - - - - + - function change() { - //获取拖动条值 - var transparent = document.getElementById("trans").value; - //修改场景球透明度 - webGlobe.viewer.scene.globe.transparent = transparent / 100; - } - - - - - -
-
- - 透明度: + + +
+
+ + 透明度: +
-
- -
- -
- - - \ No newline at end of file + +
+ +
+ + diff --git a/website/public/static/demo/cesium/helper/ogc/wmts/WMTS.md b/website/public/static/demo/cesium/helper/ogc/wmts/WMTS.md index 3ff5a6b51..9a1d4216c 100644 --- a/website/public/static/demo/cesium/helper/ogc/wmts/WMTS.md +++ b/website/public/static/demo/cesium/helper/ogc/wmts/WMTS.md @@ -11,9 +11,9 @@ ```js var tianditu = new Cesium.WebMapTileServiceImageryProvider({ - url: 'http://t0.tianditu.com/DataServer?T=vec_w&L={TileMatrix}&Y={TileRow}&X={TileCol}&tk=9c157e9585486c02edf817d2ecbc7752', + url: 'http://develop.smaryun.com:6163/igs/rest/ogc/beijing/WMTSServer/1.0.0/beijing/default/EPSG:4326_北京市_arcgis_GB/{TileMatrix}/{TileRow}/{TileCol}.png', maximumLevel: 19, - credit: new Cesium.Credit('3857') + credit: new Cesium.Credit('4326') }); webGlobe.viewer.imageryLayers.addImageryProvider(tianditu); ``` @@ -82,7 +82,93 @@ var lnglat = new Cesium.WebMapTileServiceImageryProvider({ 结果如下: ![kvp](./static/demo/cesium/helper/ogc/wmts/wmts-kvp.png) -## 3. WMTS 元数据信息不可信!! +## 3. MapGIS WMTS调用 + +### 3.1 v1 版本<=10.5.4(Java / NET版本) +1. restful + 1. 规则 + ``` js + @GetMapping("/WMTSServer/1.0.0/{layer}/default/{tileMatrixSet}/{tileMatrix}/{tileRow}/{tileCol}.{format}") + ``` + 2. 示例 + ``` js + >>> http://develop.smaryun.com:6163/igs/rest/ogc/beijing/WMTSServer/1.0.0/beijing/default/EPSG:4326_北京市_arcgis_GB/{z}/{y}/{x}.png + ``` +2. kvp + 1. 规则 + ``` js + ResponseEntity getWMTSServerKvpByServerName( + @PathVariable("serverName") String serverName, + @RequestParam(value = "service", required = false) String service, + @RequestParam(value = "version", required = false) String version, + @RequestParam(value = "request", required = false, defaultValue = "") String request, + @RequestParam(value = "layer", required = false) String layer, + @RequestParam(value = "style", required = false) String style, + @RequestParam(value = "format", required = false) String format, + @RequestParam(value = "tileMatrixSet", required = false) String tileMatrixSet, + @RequestParam(value = "tileMatrix", required = false) String tileMatrix, + @RequestParam(value = "tileRow", required = false) String tileRow, + @RequestParam(value = "tileCol", required = false) String tileCol, + @RequestParam(value = "J", required = false) String j, + @RequestParam(value = "I", required = false) String i, + @RequestParam(value = "infoFormat", required = false) String infoFormat) + ``` + 2. 示例 + ``` js + `${protocol}://${ip}:${port}/igs/rest/ogc/beijing/WMTSServer?` + + 'service=WMTS' + + '&request=GetTile' + + '&version=1.0.0' + + '&style=default' + + '&tilematrixSet=EPSG:4326_北京市_arcgis_GB' + + '&format=image/png' + + '&layer=beijing' + + '&tilematrix={z}' + + '&tilerow={y}' + + '&tilecol={x}' + ``` +### 3.2 v2 版本>=10.5.6 (仅Java版本) +1. restful + 1. 规则 + ``` js + @GetMapping("/1.0.0/{layer}/default/{tileMatrixSet}/{tileMatrix}/{tileRow}/{tileCol}.{format}") + ``` + 2. 示例 + ``` js + >>> http://192.168.21.191:8089/igs/rest/services/OGC_4326_CHINA/WMTSServer/1.0.0/OGC_4326_CHINA/default/EPSG:4326_OGC_4326_CHINA_028mm_GB/{z}/{y}/{x}.png + ``` +2. kvp + 1. 规则 + ``` js + ResponseEntity getTileByKvp(@PathVariable("serviceName") String serviceName, + @RequestParam(value = "service", required = false) String service, + @RequestParam(value = "version", required = false) String version, + @RequestParam(value = "request", required = false) String request, + @RequestParam(value = "layer", required = false) String layer, + @RequestParam(value = "style", required = false) String style, + @RequestParam(value = "format", required = false) String format, + @RequestParam(value = "tileMatrixSet", required = false) String tileMatrixSet, + @RequestParam(value = "tileMatrix", required = false) String tileMatrix, + @RequestParam(value = "tileRow", required = false) String tileRow, + @RequestParam(value = "tileCol", required = false) String tileCol) + ``` + 2. 示例 + ``` js + `http://192.168.21.191:8089/igs/rest/ogc/WMTSServer?` + + 'service=WMTS' + + '&request=GetTile' + + '&version=1.0.0' + + '&style=default' + + '&tilematrixSet=EPSG:4326_北京市_arcgis_GB' + + '&format=image/png' + + '&layer=OGC_4326_CHINA' + + '&tilematrix={z}' + + '&tilerow={y}' + + '&tilecol={x}' + ``` + + +## 4. WMTS 元数据信息不可信!! 与其说 WMTS 元数据信息不可信,本质上是说实际线下实操人员的操作不可信。以上面为例 @@ -91,7 +177,7 @@ var lnglat = new Cesium.WebMapTileServiceImageryProvider({ > 但是元数据信息描述里面的矩阵集居然有 2 类,其中一类是全球墨卡托, Orz.... > ![错误描述](./static/demo/cesium/helper/ogc/wmts/error-info.png) -### 3.1 出现过该场景的情况 +### 4.1 出现过该场景的情况 > 从下面数据情况几乎可以得出结论,无法避免不同平台不同版本带来的差异, `强烈推荐`使用`KVP`的方式`手动匹配`来统一处理,而不是自动解析 WMTS.xml 的元数据信息 diff --git a/website/public/static/demo/config/config-cesium-new.json b/website/public/static/demo/config/config-cesium-new.json index 1979f8817..3c20c4750 100644 --- a/website/public/static/demo/config/config-cesium-new.json +++ b/website/public/static/demo/config/config-cesium-new.json @@ -321,6 +321,14 @@ "icon": "measure-plot.png", "update": "最后更新时间:2022-03-14" }, + { + "name": "模型爆炸(单图层)", + "file": "model-explosion", + "diffcult": "1", + "detail": "", + "icon": "model-explosion.png", + "update": "最后更新时间:2022-08-10" + }, { "name": "模型编辑", "file": "tool-edit", @@ -370,6 +378,30 @@ "update": "最后更新时间:2022-04-13" } ] + }, + { + "name": "矢量瓦片", + "iconfont": "icon_igs", + "folder": "vectortile", + "leaffolder": true, + "childs": [ + { + "name": "矢量瓦片-3857", + "file": "mapgis-vectortile-3857", + "diffcult": "1", + "detail": "加载MapGIS-IgServer上传的矢量瓦片样式", + "icon": "mapgis-vectortile-3857.png", + "update": "最后更新时间:2020-10-12" + }, + { + "name": "矢量瓦片-4326", + "file": "mapgis-vectortile-4326", + "diffcult": "1", + "detail": "加载MapGIS-IgServer上传的矢量瓦片样式", + "icon": "mapgis-vectortile-4326.png", + "update": "最后更新时间:2020-10-12" + } + ] } ] } diff --git a/website/public/static/demo/config/config-headers.json b/website/public/static/demo/config/config-headers.json index c616d2152..af12bb58c 100644 --- a/website/public/static/demo/config/config-headers.json +++ b/website/public/static/demo/config/config-headers.json @@ -50,15 +50,18 @@ ] }, { - "title": "开发指南", + "title": "开发文档", "icon": "iconkaifazhinan", "links": [ [ - "开发指南" + "组件开发入门", + "Cesium开发文档", + "MapboxGL开文档", + "UI开文档" ] ], "hightlights": [[true]], - "routes": [["/guide/component/development_component", "", "", "", "", "", "", "", "", "", "", ""]] + "routes": [["/guide/component/development_component", "http://120.78.82.242:8891", "http://120.78.82.242:8892", "http://120.78.82.242:8893","", "", "", "", "", "", "", ""]] }, { "title": "常见问题", @@ -124,15 +127,16 @@ ] }, { - "title": "开发指南", + "title": "开发文档", "icon": "iconkaifazhinan", "links": [ [ + "开发入门", "开发指南" ] ], "hightlights": [[true]], - "routes": [["/guide/cesium/development_cesium", "", "", "", "", "", "", "", "", "", "", ""]] + "routes": [["/guide/cesium/MapGIS Client for JavaScript(Cesium)开发入门","/guide/cesium/development_cesium", "", "", "", "", "", "", "", "", "", "", ""]] }, { "title": "常见问题", @@ -260,10 +264,11 @@ ] }, { - "title": "开发指南", + "title": "开发文档", "icon": "iconkaifazhinan", "links": [ [ + "开发入门", "开发指南" ] ], @@ -374,15 +379,16 @@ ] }, { - "title": "开发指南", + "title": "开发文档", "icon": "iconkaifazhinan", "links": [ [ + "开发入门", "开发指南" ] ], "hightlights": [[true]], - "routes": [["/guide/leaflet/development_leaflet", "", "", "", "", "", "", "", "", "", "", ""]] + "routes": [["/guide/leaflet/MapGIS Client for JavaScript(Leaflet)开发入门","/guide/leaflet/development_leaflet", "", "", "", "", "", "", "", "", "", "", ""]] }, { "title": "开发示例", @@ -449,18 +455,19 @@ ] }, { - "title": "开发指南", + "title": "开发文档", "icon": "iconkaifazhinan", "links": [ [ + "开发入门", "开发指南" ] ], "hightlights": [[true]], - "routes": [["/guide/openlayers/development_ol", "", "", "", "", "", "", "", "", "", "", ""]] + "routes": [["/guide/openlayers/MapGIS Client for JavaScript(OpenLayers)开发入门","/guide/openlayers/development_ol", "", "", "", "", "", "", "", "", "", "", ""]] }, { - "title": "开发示例", + "title": "开发示例 - 组件", "icon": "iconzaixianshili", "links": [ [ @@ -531,5 +538,73 @@ ] } ] + }, + { + "title": "MapGISPlot", + "icon": "iconmap2", + "menus": [ + { + "title": "产品", + "icon": "iconchanpinjieshao" + }, + { + "title": "开发示例 - vue", + "icon": "iconzaixianshili", + "links": [ + [ + "标绘-二维", + "态势推演-二维", + "标绘-三维", + "态势推演-三维", + "标绘-二三维联动", + "态势推演-二三维联动" + ] + ], + "hightlights": [ + [false] + ], + "routes": [ + [ + "/storybook/index.html?path=/story/二维-图层-标绘-二维标绘--二维标绘", + "/storybook/index.html?path=/story/二维-图层-标绘-态势推演--态势推演", + "/storybook/index.html?path=/story/三维-图层-标绘-三维标绘--三维标绘", + "/storybook/index.html?path=/story/三维-图层-标绘-态势推演--态势推演", + "/storybook/index.html?path=/story/三维-场景子组件-二三维联动-标绘--标绘", + "/storybook/index.html?path=/story/三维-场景子组件-二三维联动-态势推演--态势推演" + ] + ] + }, + { + "title": "开发示例 - 纯JS", + "icon": "iconzaixianshili", + "links": [ + [ + "二维标绘", + "三维标绘" + ] + ], + "hightlights": [ + [false] + ], + "routes": [ + [ + "/gallery/webclient-plot#Plot2D", + "/gallery/webclient-plot#Plot3D" + ] + ] + }, + { + "title": "开发API", + "icon": "iconsanfangAPI", + "links": [["PLOT-API", "标绘图元管理工具"]], + "hightlights": [[false]], + "routes": [ + [ + "http://192.168.82.89:8093", + "http://192.168.82.89:8093/tutorial-9.%E5%88%A0%E9%99%A4%E6%A0%87%E7%BB%98%E5%9B%BE%E5%85%83%E7%A4%BA%E4%BE%8B%E4%BB%A3%E7%A0%81.html" + ] + ] + } + ] } ] diff --git a/website/public/static/demo/config/config-webclient-plot.json b/website/public/static/demo/config/config-webclient-plot.json new file mode 100644 index 000000000..798080d57 --- /dev/null +++ b/website/public/static/demo/config/config-webclient-plot.json @@ -0,0 +1,55 @@ +{ + "name": "webclient-plot", + "title": "MapGIS WebClient-Plot", + "mapmode": "webclient-plot", + "childs": [ + { + "name": "二维标绘", + "iconfont": "iconlayer", + "folder": "Plot2D", + "leaffolder": true, + "childs": [ + { + "name": "二维态势推演", + "file": "plot-animation-2d", + "diffcult": "2", + "detail": "", + "icon": "plot-animation-2d.png", + "update": "最后更新时间:2022-03-14" + } + ] + }, + { + "name": "三维标绘", + "iconfont": "iconterrain", + "folder": "Plot3D", + "leaffolder": true, + "childs": [ + { + "name": "标绘", + "file": "plot", + "diffcult": "1", + "detail": "", + "icon": "plot.png", + "update": "最后更新时间:2022-03-14" + }, + { + "name": "标绘 - 带地形", + "file": "plot-terrain", + "diffcult": "2", + "detail": "", + "icon": "plot.png", + "update": "最后更新时间:2022-03-14" + }, + { + "name": "三维态势推演", + "file": "plot-animation-3d", + "diffcult": "3", + "detail": "", + "icon": "plot-animation-3d.png", + "update": "最后更新时间:2022-03-14" + } + ] + } + ] +} diff --git a/website/public/static/demo/mapboxgl/helper/ogc/wmts/WMTS.md b/website/public/static/demo/mapboxgl/helper/ogc/wmts/WMTS.md index c990b364b..ce35b0764 100755 --- a/website/public/static/demo/mapboxgl/helper/ogc/wmts/WMTS.md +++ b/website/public/static/demo/mapboxgl/helper/ogc/wmts/WMTS.md @@ -9,6 +9,43 @@ > `restful调用`的核心是将所有的 级别 行列 图层 样式 的参数统一明码的标记在 url 请求中 > 使用这种方式 级别 行列号 都一定是`数字型` 这里很关键 , 常见的金字塔模型里面的级别 都`一般是整数表示`。 +```js +map.addLayer({ + id: 'wmts-layer', + type: 'raster', + source: { + type: 'raster', + tiles: [ + `${protocol}://${ip}:${port}/igs/rest/ogc/beijing/WMTSServer/1.0.0/beijing/default/EPSG:4326_北京市_arcgis_GB/{z}/{y}/{x}.png` + ], + tileSize: 256, + }, + paint: {} +}); +``` + +``` js +// 匹配规则 +@GetMapping("/WMTSServer/1.0.0/{layer}/default/{tileMatrixSet}/{tileMatrix}/{tileRow}/{tileCol}.{format}") +``` + +### 1.1 参数说明 + +| 参数 | 类型 | OGC-名称 | 图片说明 | +| :------------ | :----- | :------------ | :------------------------------------------------------------------- | +| layer | 字符串 | Layer | ![图层](./static/demo/mapboxgl/helper/ogc/wmts/layer.png) | +| style | 字符串 | Style | ![样式](./static/demo/mapboxgl/helper/ogc/wmts/style-type.png) | +| format | 字符串 | Format | ![样式](./static/demo/mapboxgl/helper/ogc/wmts/wmts-format.png) | +| tilematrixSet | 字符串 | TileMatrixSet | ![总称](./static/demo/mapboxgl/helper/ogc/wmts/tilematrixset-name.png) | + +![restful](./static/demo/mapboxgl/helper/ogc/wmts/restful.png) + +> 这一种是最常见的 WMTS 加载方式, 但这种方式一般只能处理全球裁瓦片的方式: 如经纬度 EPSG:4326/4490/4610 或者墨卡托 EPSG:3857 + +## 2. kvp + +> 目前 mapboxgl 支持有限的 kvp 方式调用,由于目前@mapgis/mapbox-gl仅仅支持了EPSG:3857/4326/4490/4610,因此对tilematrixSet的支持是有限的 + ```js map.addLayer({ id: 'wmts-layer', @@ -35,7 +72,7 @@ map.addLayer({ }); ``` -### 1.1 参数说明 +### 2.1 参数说明 | 参数 | 类型 | OGC-名称 | 图片说明 | | :------------ | :----- | :------------ | :------------------------------------------------------------------- | @@ -44,13 +81,6 @@ map.addLayer({ | format | 字符串 | Format | ![样式](./static/demo/mapboxgl/helper/ogc/wmts/wmts-format.png) | | tilematrixSet | 字符串 | TileMatrixSet | ![总称](./static/demo/mapboxgl/helper/ogc/wmts/tilematrixset-name.png) | -![restful](./static/demo/mapboxgl/helper/ogc/wmts/restful.png) - -> 这一种是最常见的 WMTS 加载方式, 但这种方式一般只能处理全球裁瓦片的方式: 如经纬度 EPSG:4326/4490/4610 或者墨卡托 EPSG:3857 - -## 2. kvp - -> 目前 mapboxgl 不支持 kvp 方式调用,如有需求请提交 [Github-Issues](https://github.com/MapGIS/WebClient-JavaScript/issues/new) ## 3. 错级瓦片 @@ -73,3 +103,89 @@ map.addLayer({ [在线链接](/#/demo/mapboxgl/mapgis-igserver/map/mapgisoffset) ![offset](./static/demo/mapboxgl/helper/ogc/wmts/offset.png) + +## 4. MapGIS WMTS调用 + +### 4.1 v1 版本<=10.5.4(Java / NET版本) +1. restful + 1. 规则 + ``` js + @GetMapping("/WMTSServer/1.0.0/{layer}/default/{tileMatrixSet}/{tileMatrix}/{tileRow}/{tileCol}.{format}") + ``` + 2. 示例 + ``` js + >>> http://develop.smaryun.com:6163/igs/rest/ogc/beijing/WMTSServer/1.0.0/beijing/default/EPSG:4326_北京市_arcgis_GB/{z}/{y}/{x}.png + ``` +2. kvp + 1. 规则 + ``` js + ResponseEntity getWMTSServerKvpByServerName( + @PathVariable("serverName") String serverName, + @RequestParam(value = "service", required = false) String service, + @RequestParam(value = "version", required = false) String version, + @RequestParam(value = "request", required = false, defaultValue = "") String request, + @RequestParam(value = "layer", required = false) String layer, + @RequestParam(value = "style", required = false) String style, + @RequestParam(value = "format", required = false) String format, + @RequestParam(value = "tileMatrixSet", required = false) String tileMatrixSet, + @RequestParam(value = "tileMatrix", required = false) String tileMatrix, + @RequestParam(value = "tileRow", required = false) String tileRow, + @RequestParam(value = "tileCol", required = false) String tileCol, + @RequestParam(value = "J", required = false) String j, + @RequestParam(value = "I", required = false) String i, + @RequestParam(value = "infoFormat", required = false) String infoFormat) + ``` + 2. 示例 + ``` js + `${protocol}://${ip}:${port}/igs/rest/ogc/beijing/WMTSServer?` + + 'service=WMTS' + + '&request=GetTile' + + '&version=1.0.0' + + '&style=default' + + '&tilematrixSet=EPSG:4326_北京市_arcgis_GB' + + '&format=image/png' + + '&layer=beijing' + + '&tilematrix={z}' + + '&tilerow={y}' + + '&tilecol={x}' + ``` +### 4.2 v2 版本>=10.5.6 (仅Java版本) +1. restful + 1. 规则 + ``` js + @GetMapping("/1.0.0/{layer}/default/{tileMatrixSet}/{tileMatrix}/{tileRow}/{tileCol}.{format}") + ``` + 2. 示例 + ``` js + >>> http://192.168.21.191:8089/igs/rest/services/OGC_4326_CHINA/WMTSServer/1.0.0/OGC_4326_CHINA/default/EPSG:4326_OGC_4326_CHINA_028mm_GB/{z}/{y}/{x}.png + ``` +2. kvp + 1. 规则 + ``` js + ResponseEntity getTileByKvp(@PathVariable("serviceName") String serviceName, + @RequestParam(value = "service", required = false) String service, + @RequestParam(value = "version", required = false) String version, + @RequestParam(value = "request", required = false) String request, + @RequestParam(value = "layer", required = false) String layer, + @RequestParam(value = "style", required = false) String style, + @RequestParam(value = "format", required = false) String format, + @RequestParam(value = "tileMatrixSet", required = false) String tileMatrixSet, + @RequestParam(value = "tileMatrix", required = false) String tileMatrix, + @RequestParam(value = "tileRow", required = false) String tileRow, + @RequestParam(value = "tileCol", required = false) String tileCol) + ``` + 2. 示例 + ``` js + `http://192.168.21.191:8089/igs/rest/ogc/WMTSServer?` + + 'service=WMTS' + + '&request=GetTile' + + '&version=1.0.0' + + '&style=default' + + '&tilematrixSet=EPSG:4326_北京市_arcgis_GB' + + '&format=image/png' + + '&layer=OGC_4326_CHINA' + + '&tilematrix={z}' + + '&tilerow={y}' + + '&tilecol={x}' + ``` + diff --git a/website/public/static/demo/webclient-plot/example/Plot3D/plot-terrain.htm b/website/public/static/demo/webclient-plot/example/Plot3D/plot-terrain.htm new file mode 100644 index 000000000..2d5bb662c --- /dev/null +++ b/website/public/static/demo/webclient-plot/example/Plot3D/plot-terrain.htm @@ -0,0 +1,188 @@ + + + + + + + 行业标绘 - 附带地形 + + + + + + + + + + + + +
+
+
+
基础符号
+ + + + + + + + + +
常规点
+ + + + + + + + + + + + + + + + + + + + + + +
常规线
+ + + + + + + + + + +
常规面
+ + +
算法符号
+ + + + + + + + + +
+ + + \ No newline at end of file diff --git a/website/public/static/demo/webclient-plot/example/Plot3D/plot.htm b/website/public/static/demo/webclient-plot/example/Plot3D/plot.htm new file mode 100644 index 000000000..9634cc9d7 --- /dev/null +++ b/website/public/static/demo/webclient-plot/example/Plot3D/plot.htm @@ -0,0 +1,208 @@ + + + + + + + 行业标绘 + + + + + + + + + + + + +
+
+
+
基础符号
+ + + + + + + + + +
常规点
+ + + + + + + + + + + + + + + + + + + + + + +
常规线
+ + + + + + + + + + +
常规面
+ + +
算法符号
+ + + + + + + + + +
+ +
+
+ 图元高度 + +
+
+
+ + + \ No newline at end of file diff --git a/website/public/static/libs/include-cesium-new-local.js b/website/public/static/libs/include-cesium-new-local.js new file mode 100644 index 000000000..191e0795f --- /dev/null +++ b/website/public/static/libs/include-cesium-new-local.js @@ -0,0 +1,123 @@ +(function () { + var r = new RegExp('(^|(.*?\\/))(include-cesium-new-local.js)(\\?|$)'), + s = document.getElementsByTagName('script'), + targetScript, + targetUrl; + for (var i = 0; i < s.length; i++) { + var src = s[i].getAttribute('src'); + if (src) { + var m = src.match(r); + if (m) { + targetUrl = src; + targetScript = s[i]; + break; + } + } + } + + function inputScript(url) { + var script = '