@@ -16,7 +16,7 @@ import { find } from 'ol/array';
1616 * @param {String } [option.ip = localhost] 地图服务ip
1717 * @param {String } [option.port = 6163] 地图服务port
1818 * @param {String } [option.layerName] 地图名
19- * @param {String } option.style 样式json文件路径或者MVT-JSON对象,当为url时等于styleUrl;当为vectortilejson等于vectortilejson
19+ * @param {String } option.mvtStyle 样式json文件路径或者MVT-JSON对象,当为url时等于styleUrl;当为vectortilejson等于vectortilejson
2020 * @param {String } [option.styleUrl] 样式json文件路径,有styleUrl就可以直接读取styleUrl里的信息;不然就是加载中地发布的矢量瓦片,使用ip,port和layerName先拼接styleUrl路径再进行查询。
2121 * @param {Object } [option.vectortilejson] 矢量瓦片json对象,直接取json对象,不需要再去请求。
2222 * @param {Cesium.TilingScheme } [option.tilingScheme] 矢量瓦片瓦片切分规则:经纬度还是墨卡托
@@ -27,7 +27,7 @@ import { find } from 'ol/array';
2727 * vectortileLayer = new CesiumZondy.Overlayer.VectorTileLayer(
2828 webGlobe.viewer,
2929 {
30- style :"http://develop.smaryun.com:6163/igs/rest/mrms/vtiles/styles/街道-墨卡托.json",
30+ mvtStyle :"http://develop.smaryun.com:6163/igs/rest/mrms/vtiles/styles/街道-墨卡托.json",
3131 token: "",
3232 show: true,
3333 }
@@ -50,21 +50,21 @@ export class VectorTileLayer {
5050 this . vectortilejson = options . vectortilejson ;
5151 this . threadId = options . threadId || Math . random ( ) * 10000 ;
5252 this . show = options . show ;
53- this . style = options . style ;
53+ this . mvtStyle = options . mvtStyle ;
5454 this . styleUrl = options . styleUrl ;
5555 this . tilingScheme = options . tilingScheme ;
5656 this . provider = null ;
5757
5858 this . initDevicePixelRatio ( ) ;
5959 //this.bindEvent();
6060
61- if ( this . style ) {
62- if ( typeof this . style === 'string' ) {
61+ if ( this . mvtStyle ) {
62+ if ( typeof this . mvtStyle === 'string' ) {
6363 //如果是个网络地址,就通过url请求获取矢量瓦片json对象
64- this . url = this . style ;
64+ this . url = this . mvtStyle ;
6565 this . requestVectortileJson ( ) ;
6666 } else {
67- this . requestStyleData ( this . style ) ;
67+ this . requestStyleData ( this . mvtStyle ) ;
6868 }
6969 } else if ( this . styleUrl ) {
7070 if ( typeof this . styleUrl === 'string' ) {
0 commit comments