| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -35,7 +35,7 @@ | |||
| 35 | 35 | "test-init": "node ./node_modules/karma/bin/karma init karma.conf.js" | |
| 36 | 36 | }, | |
| 37 | 37 | "author": "mapgis", | |
| 38 | - "license": "Apache2", | ||
| 38 | + "license": "Apache-2.0", | ||
| 39 | 39 | "devDependencies": { | |
| 40 | 40 | "babel-core": "^6.26.3", | |
| 41 | 41 | "babel-eslint": "^10.1.0", | |
@@ -86,7 +86,7 @@ | |||
| 86 | 86 | "@mapgis/mapbox-gl": "^1.9.0", | |
| 87 | 87 | "@turf/turf": "^6.3.0", | |
| 88 | 88 | "axios": "^0.18.0", | |
| 89 | - "cesium": "^1.70.1", | ||
| 89 | + "cesium": "1.84.0", | ||
| 90 | 90 | "d3": "^5.16.0", | |
| 91 | 91 | "echarts": "^4.4.0", | |
| 92 | 92 | "fast-xml-parser": "^3.17.6", | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -280,12 +280,12 @@ export default class MapvLayer { | |||
| 280 | 280 | // canvas.style.height = this.map.canvas.style.height; | |
| 281 | 281 | canvas.width = | |
| 282 | 282 | parseInt(this.map.canvas.width) || | |
| 283 | - parseInt(this.map.container.offsetWidth) * this.devicePixelRatio; | ||
| 283 | + parseInt(this.map.container.offsetWidth); | ||
| 284 | 284 | canvas.height = | |
| 285 | 285 | parseInt(this.map.canvas.height) || | |
| 286 | - parseInt(this.map.container.offsetHeight) * this.devicePixelRatio; | ||
| 287 | - canvas.style.width = parseInt(this.map.container.offsetWidth) + 'px'; | ||
| 288 | - canvas.style.height = parseInt(this.map.container.offsetHeight) + 'px'; | ||
| 286 | + parseInt(this.map.container.offsetHeight); | ||
| 287 | + canvas.style.width = parseInt(this.map.container.offsetWidth) + "px"; | ||
| 288 | + canvas.style.height = parseInt(this.map.container.offsetHeight) + "px"; | ||
| 289 | 289 | ||
| 290 | 290 | var devicePixelRatio = this.devicePixelRatio; | |
| 291 | 291 | if (this.mapVOptions.context == '2d') { | |
@@ -311,13 +311,12 @@ export default class MapvLayer { | |||
| 311 | 311 | // canvas.style.height = this.map.canvas.style.height; | |
| 312 | 312 | canvas.width = | |
| 313 | 313 | parseInt(this.map.canvas.width) || | |
| 314 | - parseInt(this.map.container.offsetWidth) * this.devicePixelRatio; | ||
| 314 | + parseInt(this.map.container.offsetWidth); | ||
| 315 | 315 | canvas.height = | |
| 316 | 316 | parseInt(this.map.canvas.height) || | |
| 317 | - parseInt(this.map.container.offsetHeight) * this.devicePixelRatio; | ||
| 318 | - canvas.style.width = parseInt(this.map.container.offsetWidth) + 'px'; | ||
| 319 | - canvas.style.height = parseInt(this.map.container.offsetHeight) + 'px'; | ||
| 320 | - | ||
| 317 | + parseInt(this.map.container.offsetHeight); | ||
| 318 | + canvas.style.width = parseInt(this.map.container.offsetWidth) + "px"; | ||
| 319 | + canvas.style.height = parseInt(this.map.container.offsetHeight) + "px"; | ||
| 321 | 320 | var devicePixelRatio = this.devicePixelRatio; | |
| 322 | 321 | if (this.mapVOptions.context == '2d') { | |
| 323 | 322 | canvas.getContext('2d').scale(devicePixelRatio, devicePixelRatio); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,7 +1,6 @@ | |||
| 1 | 1 | import { CesiumZondy } from '../core/Base'; | |
| 2 | 2 | ||
| 3 | 3 | import { updataPopupPosition } from './popup/popup'; | |
| 4 | - import Cesium from '../../../node_modules/cesium/Source/Cesium'; | ||
| 5 | 4 | ||
| 6 | 5 | var popupsIdIndex = 0; | |
| 7 | 6 | ||
@@ -72,6 +71,7 @@ export default class PopupLayer { | |||
| 72 | 71 | this.popupContentId = options.popupContentId || 'cesium-popup-content-id-' + popupsIdIndex++; | |
| 73 | 72 | ||
| 74 | 73 | this.options.postRender = this.options.postRender === undefined ? true : this.options.postRender; | |
| 74 | + this.Cesium = options.Cesium || window['Cesium']; | ||
| 75 | 75 | ||
| 76 | 76 | this.scene = map.scene; | |
| 77 | 77 | this.camera = map.camera; | |
@@ -83,7 +83,7 @@ export default class PopupLayer { | |||
| 83 | 83 | this.onHide = onHide; | |
| 84 | 84 | } | |
| 85 | 85 | ||
| 86 | - let ScreenSpaceEventHandler = Cesium.ScreenSpaceEventHandler || window['Cesium'].ScreenSpaceEventHandler; | ||
| 86 | + let ScreenSpaceEventHandler = this.Cesium.ScreenSpaceEventHandler || window['Cesium'].ScreenSpaceEventHandler; | ||
| 87 | 87 | ||
| 88 | 88 | this.handler = new ScreenSpaceEventHandler(this.scene.canvas); | |
| 89 | 89 | ||
@@ -96,7 +96,7 @@ export default class PopupLayer { | |||
| 96 | 96 | this.cartesian = | |
| 97 | 97 | this.cartesian || | |
| 98 | 98 | this.position.cartesian || | |
| 99 | - Cesium.Cartesian3.fromDegrees(this.position.longitude, this.position.latitude, this.position.height); | ||
| 99 | + this.Cesium.Cartesian3.fromDegrees(this.position.longitude, this.position.latitude, this.position.height); | ||
| 100 | 100 | ||
| 101 | 101 | let vc = this.map.container; | |
| 102 | 102 | let cesumWidgetContainer = undefined; | |
@@ -149,16 +149,16 @@ export default class PopupLayer { | |||
| 149 | 149 | } else { | |
| 150 | 150 | let popupContentDiv = window.document.createElement('div'); | |
| 151 | 151 | popupContentDiv.id = this.popupContentId; | |
| 152 | - popupContentDiv.className = "cesium-popup"; | ||
| 152 | + popupContentDiv.className = 'cesium-popup'; | ||
| 153 | 153 | let popupContentWrapperDiv = window.document.createElement('div'); | |
| 154 | - popupContentWrapperDiv.className = "cesium-popup-content-wrapper"; | ||
| 154 | + popupContentWrapperDiv.className = 'cesium-popup-content-wrapper'; | ||
| 155 | 155 | popupContentWrapperDiv.appendChild(this.container); | |
| 156 | 156 | popupContentDiv.appendChild(popupContentWrapperDiv); | |
| 157 | - | ||
| 157 | + | ||
| 158 | 158 | let tipContainerDiv = window.document.createElement('div'); | |
| 159 | - tipContainerDiv.className = "cesium-popup-tip-container"; | ||
| 159 | + tipContainerDiv.className = 'cesium-popup-tip-container'; | ||
| 160 | 160 | let tipDiv = window.document.createElement('div'); | |
| 161 | - tipDiv.className = "cesium-popup-tip"; | ||
| 161 | + tipDiv.className = 'cesium-popup-tip'; | ||
| 162 | 162 | tipContainerDiv.appendChild(tipDiv); | |
| 163 | 163 | popupContentDiv.appendChild(tipContainerDiv); | |
| 164 | 164 | infoDiv.appendChild(popupContentDiv); | |
@@ -179,7 +179,7 @@ export default class PopupLayer { | |||
| 179 | 179 | ||
| 180 | 180 | bindEvent() { | |
| 181 | 181 | let self = this; | |
| 182 | - this.handler.setInputAction(this.movement, Cesium.ScreenSpaceEventType.LEFT_CLICK); | ||
| 182 | + this.handler.setInputAction(this.movement, this.Cesium.ScreenSpaceEventType.LEFT_CLICK); | ||
| 183 | 183 | if (!this.map) { | |
| 184 | 184 | return; | |
| 185 | 185 | } | |
@@ -188,8 +188,8 @@ export default class PopupLayer { | |||
| 188 | 188 | this.map.scene.postRender.addEventListener(() => self.update()); | |
| 189 | 189 | } else { | |
| 190 | 190 | this.map.camera.changed.addEventListener(() => self.update()); | |
| 191 | - this.handler.setInputAction(this.moveStart, Cesium.ScreenSpaceEventType.LEFT_DOWN); | ||
| 192 | - this.handler.setInputAction(this.moveEnd, Cesium.ScreenSpaceEventType.LEFT_UP); | ||
| 191 | + this.handler.setInputAction(this.moveStart, this.Cesium.ScreenSpaceEventType.LEFT_DOWN); | ||
| 192 | + this.handler.setInputAction(this.moveEnd, this.Cesium.ScreenSpaceEventType.LEFT_UP); | ||
| 193 | 193 | this.map.scene.camera.moveEnd.addEventListener(() => self.update()); | |
| 194 | 194 | } | |
| 195 | 195 | } | |
@@ -211,8 +211,8 @@ export default class PopupLayer { | |||
| 211 | 211 | ||
| 212 | 212 | movement(movement) { | |
| 213 | 213 | var pickedPrimitive = this.map.scene.pick(movement.position); | |
| 214 | - var pickedEntity = Cesium.defined(pickedPrimitive) ? pickedPrimitive.id : undefined; | ||
| 215 | - if (Cesium.defined(pickedEntity) /* && Cesium.defined(pickedEntity.billboard) */) { | ||
| 214 | + var pickedEntity = this.Cesium.defined(pickedPrimitive) ? pickedPrimitive.id : undefined; | ||
| 215 | + if (this.Cesium.defined(pickedEntity) /* && Cesium.defined(pickedEntity.billboard) */) { | ||
| 216 | 216 | if (this.position && this.position.entity) { | |
| 217 | 217 | pickedPrimitive.id === this.position.entity.id; | |
| 218 | 218 | this.show(); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -1,5 +1,3 @@ | |||
| 1 | - import Cesium from '../../../../node_modules/cesium/Source/Cesium'; | ||
| 2 | - | ||
| 3 | 1 | /** | |
| 4 | 2 | * @description 用来调整相机视角的时候设置对应的 | |
| 5 | 3 | * @param {Viewer} viewer Cesium的viewer对象 | |
@@ -10,56 +8,57 @@ import Cesium from '../../../../node_modules/cesium/Source/Cesium'; | |||
| 10 | 8 | * @param {Object} [options.latitude] 传入的纬度,内部换算笛卡尔积 | |
| 11 | 9 | */ | |
| 12 | 10 | export function updataPopupPosition(viewer, cartesian, popupId, popupContentId, options) { | |
| 13 | - if(!cartesian) return ; | ||
| 11 | + if (!cartesian) return; | ||
| 14 | 12 | let scene = viewer.scene; | |
| 15 | 13 | let camera = viewer.camera; | |
| 16 | 14 | ||
| 17 | 15 | let rect = camera.computeViewRectangle(); | |
| 18 | - const south = Cesium.Math.toDegrees(rect.south) | ||
| 19 | - const north = Cesium.Math.toDegrees(rect.north) | ||
| 20 | - const east = Cesium.Math.toDegrees(rect.east) | ||
| 21 | - const west = Cesium.Math.toDegrees(rect.west) | ||
| 16 | + let Cesium = options.Cesium || window['Cesium']; | ||
| 17 | + const south = Cesium.Math.toDegrees(rect.south); | ||
| 18 | + const north = Cesium.Math.toDegrees(rect.north); | ||
| 19 | + const east = Cesium.Math.toDegrees(rect.east); | ||
| 20 | + const west = Cesium.Math.toDegrees(rect.west); | ||
| 22 | 21 | ||
| 23 | 22 | let carto, longitude, latitude; | |
| 24 | - if(options && options.longitude && options.latitude){ | ||
| 23 | + if (options && options.longitude && options.latitude) { | ||
| 25 | 24 | longitude = options.position.longitude; | |
| 26 | 25 | latitude = options.position.latitude; | |
| 27 | 26 | if (longitude < west || longitude > east || latitude > north || latitude < south) { | |
| 28 | - popup.style.display = "none"; | ||
| 27 | + popup.style.display = 'none'; | ||
| 29 | 28 | return; | |
| 30 | 29 | } | |
| 31 | 30 | } else { | |
| 32 | - carto = Cesium.Ellipsoid.WGS84.cartesianToCartographic(cartesian); | ||
| 31 | + carto = Cesium.Ellipsoid.WGS84.cartesianToCartographic(cartesian); | ||
| 33 | 32 | longitude = Cesium.Math.toDegrees(carto.longitude); | |
| 34 | 33 | latitude = Cesium.Math.toDegrees(carto.latitude); | |
| 35 | 34 | } | |
| 36 | - | ||
| 35 | + | ||
| 37 | 36 | var px_position = Cesium.SceneTransforms.wgs84ToWindowCoordinates(scene, cartesian); | |
| 38 | - | ||
| 39 | - if(!px_position) return; | ||
| 37 | + | ||
| 38 | + if (!px_position) return; | ||
| 40 | 39 | var res = false; | |
| 41 | 40 | var e = cartesian, | |
| 42 | 41 | i = camera.position, | |
| 43 | 42 | n = scene.globe.ellipsoid.cartesianToCartographic(i).height; | |
| 44 | - if (!(n += 1 * scene.globe.ellipsoid.maximumRadius, Cesium.Cartesian3.distance(i, e) > n)) { | ||
| 43 | + if (!((n += 1 * scene.globe.ellipsoid.maximumRadius), Cesium.Cartesian3.distance(i, e) > n)) { | ||
| 45 | 44 | res = true; | |
| 46 | 45 | } | |
| 47 | 46 | ||
| 48 | 47 | if (longitude < west || longitude > east || latitude > north || latitude < south) { | |
| 49 | 48 | res = false; | |
| 50 | 49 | } | |
| 51 | - | ||
| 50 | + | ||
| 52 | 51 | let popup = window.document.getElementById(popupId); | |
| 53 | - if(!popup) return; | ||
| 52 | + if (!popup) return; | ||
| 54 | 53 | ||
| 55 | 54 | if (res) { | |
| 56 | - popup.style.display = "block"; | ||
| 55 | + popup.style.display = 'block'; | ||
| 57 | 56 | var trackPopUpContent = window.document.getElementById(popupContentId); | |
| 58 | 57 | var popw = document.getElementById(popupContentId).offsetWidth; | |
| 59 | 58 | var poph = document.getElementById(popupContentId).offsetHeight; | |
| 60 | - trackPopUpContent.style.left = px_position.x - (popw / 2) + "px"; | ||
| 61 | - trackPopUpContent.style.top = px_position.y - (poph - 10) + "px"; | ||
| 59 | + trackPopUpContent.style.left = px_position.x - popw / 2 + 'px'; | ||
| 60 | + trackPopUpContent.style.top = px_position.y - (poph - 10) + 'px'; | ||
| 62 | 61 | } else { | |
| 63 | - popup.style.display = "none"; | ||
| 62 | + popup.style.display = 'none'; | ||
| 64 | 63 | } | |
| 65 | - } | ||
| 64 | + } | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -4,7 +4,6 @@ import { getLayers, getFonts, getVectorTileSource, getSpritePng } from './vector | |||
| 4 | 4 | import VectorTileProvider from './vectortile/VectorTileProvider'; | |
| 5 | 5 | import VectorTileStyle from './vectortile/MapgisVectorTileStyle'; | |
| 6 | 6 | import axios from 'axios'; | |
| 7 | - import { find } from 'ol/array'; | ||
| 8 | 7 | ||
| 9 | 8 | /** | |
| 10 | 9 | * @author 基础平台/创新中心 潘卓然 ParnDeedlit | |
@@ -138,6 +137,10 @@ export class VectorTileLayer { | |||
| 138 | 137 | ); | |
| 139 | 138 | } | |
| 140 | 139 | ||
| 140 | + getLayer() { | ||
| 141 | + return self.provider ? self.provider : undefined; | ||
| 142 | + } | ||
| 143 | + | ||
| 141 | 144 | /** | |
| 142 | 145 | * 首先构造矢量瓦片样式,再添加图层 | |
| 143 | 146 | * @function module:客户端渲染.VectorTileLayer.prototype.addLayer | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -8,9 +8,13 @@ import L from "leaflet"; | |||
| 8 | 8 | L.zondy = L.zondy || {}; | |
| 9 | 9 | L.zondy.control = L.zondy.control || {}; | |
| 10 | 10 | ||
| 11 | + L.mapgis = L.mapgis || {}; | ||
| 12 | + | ||
| 11 | 13 | /** | |
| 12 | 14 | * @module 客户端可视化 | |
| 13 | 15 | */ | |
| 14 | 16 | L.zondy.Clientview = L.zondy.Clientview || {}; | |
| 15 | 17 | ||
| 16 | 18 | L.CRS = L.CRS || {}; | |
| 19 | + | ||
| 20 | + export {L}; | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,142 @@ | |||
| 1 | + import {newGuid} from '../../service/common/Util'; | ||
| 2 | + import { L } from '../core/Base.js'; | ||
| 3 | + | ||
| 4 | + /** | ||
| 5 | + * @class L.mapgis.MapLayer | ||
| 6 | + * @classdesc 新版igserver地图服务加载类 | ||
| 7 | + * @extends L.TileLayer | ||
| 8 | + * @example | ||
| 9 | + //地图容器 | ||
| 10 | + var map = L.map('leaf_map', { | ||
| 11 | + //添加缩放控件 | ||
| 12 | + zoomControl: true, | ||
| 13 | + //投影坐标系 | ||
| 14 | + crs: L.CRS.EPSG4326, | ||
| 15 | + //中心点[y,x] | ||
| 16 | + center: [(30.86431739220 + 30.3383275329) / 2, (114.57307983700002 + 113.97889584400014)/ 2],//武汉建筑 | ||
| 17 | + //最大级数 | ||
| 18 | + maxZoom: 10, | ||
| 19 | + //最小级数 | ||
| 20 | + minZoom: 7, | ||
| 21 | + //显示级数 | ||
| 22 | + zoom: 8 | ||
| 23 | + }); | ||
| 24 | + | ||
| 25 | + //创建地图图层 | ||
| 26 | + var mapLayer = new L.mapgis.MapLayer("http://192.168.199.71:8089/igs/rest/services/layertest/武汉建筑/MapServer", { | ||
| 27 | + layers:'show:0', | ||
| 28 | + imageFormat: 'jpg', | ||
| 29 | + filters:{"0":{"where":"Floor>10"}}, | ||
| 30 | + styles: {"0":{"displayRegionBorder":true}}, | ||
| 31 | + imageTransparent:false, | ||
| 32 | + //只显示一个图层,不平铺显示 | ||
| 33 | + noWrap: true | ||
| 34 | + }).addTo(map); | ||
| 35 | + */ | ||
| 36 | + | ||
| 37 | + var MapLayer = L.TileLayer.extend({ | ||
| 38 | + options: { | ||
| 39 | + imageFormat: null, | ||
| 40 | + imageHeight: 512, | ||
| 41 | + imageWidth: 512, | ||
| 42 | + guid:null, | ||
| 43 | + imageTransparent: null, | ||
| 44 | + filters: null, | ||
| 45 | + styles: null, | ||
| 46 | + layers: null, | ||
| 47 | + crs: null, | ||
| 48 | + isAntialiasing: null | ||
| 49 | + }, | ||
| 50 | + /** | ||
| 51 | + * | ||
| 52 | + * @param url - {String} 必选,地图服务的基地址。例如"http://192.168.199.71:8089/igs/rest/services/layertest/武汉建筑/MapServer". | ||
| 53 | + * @param options - {Object} 属性键值对,地图属性字段。 | ||
| 54 | + * @param {String} [options.imageFormat = 'png'] 可选,图片的格式,支持png|jpg|gif。 | ||
| 55 | + * @param {Object} [options.filters = null] 可选,图层的过滤信息。例如,{"0":{"where":"Floor>10"}}。 | ||
| 56 | + * @param {Object} [options.styles = null] 可选,图层的样式。例如,{"0":{"displayRegionBorder":true}}。 | ||
| 57 | + * @param {String} [options.layers = null] 可选,指定需要被取图的图层序列号。格式:show/hide/include/exclude: layerid1,layerid2。 | ||
| 58 | + 1 show:仅仅显示指定了图层序号的图层 | ||
| 59 | + 2 hide :显示除hide参数指定图层外所有的图层 | ||
| 60 | + 3 include:除显示默认图层(地图文档内图层状态为可见的图层)外,另追加这些被指定的图 层显示,追加的这些图层必须为地图中包含的图层。 | ||
| 61 | + 4 exclude: 从默认图层列表里删除这些被指定的图层后,进行显示 | ||
| 62 | + * @param {String} [options.crs = null] 可选,投影空间参照系,支持mapgis参照系名称和epsg编号。 | ||
| 63 | + * @param {Number} [options.imageHeight = 512] 可选,图片的高度。 | ||
| 64 | + * @param {Number} [options.imageWidth = 512] 可选,图片的宽度。 | ||
| 65 | + * @param {Boolean} [options.isAntialiasing = false] 可选,返回的图片是否抗锯齿。 | ||
| 66 | + * @param {Boolean} [options.imageTransparent = true] 可选,返回的图片是否透明。 | ||
| 67 | + * @param {String} [options.guid = newGuid()] 可选。唯一ID,用户标识地图文档。 | ||
| 68 | + * | ||
| 69 | + */ | ||
| 70 | + initialize: function (url, options) { | ||
| 71 | + this.url = encodeURI(url + '/image'); | ||
| 72 | + L.TileLayer.prototype.initialize.apply(this, arguments); | ||
| 73 | + L.setOptions(this, options); | ||
| 74 | + L.stamp(this); | ||
| 75 | + }, | ||
| 76 | + | ||
| 77 | + onAdd: function (map) { | ||
| 78 | + this._crs = map.options.crs; | ||
| 79 | + this._initLayerUrl(); | ||
| 80 | + L.TileLayer.prototype.onAdd.call(this, map); | ||
| 81 | + }, | ||
| 82 | + | ||
| 83 | + getTileUrl: function (coords) { | ||
| 84 | + var tileBounds = this._tileCoordsToBounds(coords); | ||
| 85 | + var nw = this._crs.project(tileBounds.getNorthWest()); | ||
| 86 | + var se = this._crs.project(tileBounds.getSouthEast()); | ||
| 87 | + var params = '&bbox=' + nw.x + ',' + se.y + ',' + se.x + ',' + nw.y; | ||
| 88 | + return this._layerUrl + encodeURI(params); | ||
| 89 | + }, | ||
| 90 | + | ||
| 91 | + _initLayerUrl: function () { | ||
| 92 | + var vm = this; | ||
| 93 | + var layerUrl = vm.url + '?'; | ||
| 94 | + layerUrl += encodeURI(vm._initAllRequestParams().join('&')); | ||
| 95 | + this._layerUrl = layerUrl; | ||
| 96 | + }, | ||
| 97 | + | ||
| 98 | + _initAllRequestParams: function () { | ||
| 99 | + var vm = this, | ||
| 100 | + options = vm.options || {}, | ||
| 101 | + params = []; | ||
| 102 | + | ||
| 103 | + var imageHeight = this.options.imageHeight; | ||
| 104 | + var imageWidth = this.options.imageWidth; | ||
| 105 | + params.push('size=' + imageWidth + ',' + imageHeight); | ||
| 106 | + | ||
| 107 | + var guid = options.guid || newGuid(); | ||
| 108 | + params.push("clientId=" + guid); | ||
| 109 | + | ||
| 110 | + if (options.imageFormat) { | ||
| 111 | + params.push('format=' + options.imageFormat); | ||
| 112 | + } | ||
| 113 | + if (options.layers) { | ||
| 114 | + params.push('layers=' + options.layers); | ||
| 115 | + } | ||
| 116 | + if (options.filters) { | ||
| 117 | + params.push('layerFilters=' + JSON.stringify(options.filters)); | ||
| 118 | + } | ||
| 119 | + if (options.styles) { | ||
| 120 | + params.push('layerStyles=' + JSON.stringify(options.styles)); | ||
| 121 | + } | ||
| 122 | + if (options.imageTransparent !== undefined && options.imageTransparent !== null) { | ||
| 123 | + params.push('transparent=' + options.imageTransparent); | ||
| 124 | + } | ||
| 125 | + | ||
| 126 | + if (options.crs) { | ||
| 127 | + params.push('projectionSrs=' + options.crs); | ||
| 128 | + } | ||
| 129 | + | ||
| 130 | + if (options.isAntialiasing !== undefined && options.isAntialiasing !== null) { | ||
| 131 | + params.push('isAntialiasing=' + options.isAntialiasing); | ||
| 132 | + } | ||
| 133 | + | ||
| 134 | + params.push('f=image'); | ||
| 135 | + | ||
| 136 | + return params; | ||
| 137 | + } | ||
| 138 | + }); | ||
| 139 | + | ||
| 140 | + export { MapLayer }; | ||
| 141 | + L.mapgis.MapLayer = MapLayer; | ||
| 142 | + export { L }; | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments