new PlotMapManager(map, serverUrl, symScaleDefinition)
Usage
// 浏览器
<script type="text/javascript" src="../../web/libs/plotting/leaflet/11.2.0/iclient-plot-leaflet-es6.min.js"></script>
<script>
//推荐用法,通过Plotting对象获取
L.supermap.plotting.getControl(map, serverUrl).getPlotMapManager();
//直接创建
new L.supermap.plotting.PlotMapManager(name, options);
// 另一种写法
L.supermap.plotting.plotMapManager(name, options);
</script>
// ES6 Import
import { PlotMapManager } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';
new PlotMapManager(name, options);
leaflet/plot/PlotMapManager.js, line 12
Name | Type | Description |
---|---|---|
map |
L.Map |
地图。 |
serverUrl |
string |
标绘服务地址。 |
symScaleDefinition |
number |
标绘图缩放基准,默认为当前地图的比例尺。 |
Example
var host = "https://iserver.supermap.io";
var url = host + "/iserver/services/map-china400/rest/maps/China_4326";
var serverUrl = host + "/iserver/services/plot-jingyong/rest/plot/";
var map = L.map('map', {
preferCanvas: true,
crs: L.CRS.EPSG4326,
center: [37.6171875, 109.3359375],
maxZoom: 18,
zoom: 4
});
var plotMapManager = L.supermap.plotting.getControl(map, serverUrl).getPlotMapManager();
Methods
-
destroy()
leaflet/plot/PlotMapManager.js, line 143 -
销毁图形对象。
-
findSignSymbolByUuid(){signSymbol}
leaflet/plot/PlotMapManager.js, line 371 -
Returns:
Type Description signSymbol 查询到的标牌。 -
getActiveChildPlotLayer()
leaflet/plot/PlotMapManager.js, line 253 -
获取当前激活的子图层。
-
getActivePlottingLayer()
leaflet/plot/PlotMapManager.js, line 217 -
获取当前激活的图元层。
-
getPlottingLayers(plottingLayer)
leaflet/plot/PlotMapManager.js, line 154 -
获取图元层数组。
Name Type Description plottingLayer
Array.<PlottingLayer> 图元层数组。
-
getSignSymbolLayers(){signSymbolLayer}
leaflet/plot/PlotMapManager.js, line 364 -
Returns:
Type Description signSymbolLayer 获取所有的标牌图层。 -
getSymScaleDefinition(){number}
leaflet/plot/PlotMapManager.js, line 163 -
获取标绘图的缩放基准。
Returns:
Type Description number 标绘图的缩放基准。 -
loadFrom(geoJson)
leaflet/plot/PlotMapManager.js, line 280 -
打开标绘图数据。
Name Type Description geoJson
Object 要打开的标绘图的数据。
-
saveTo()
leaflet/plot/PlotMapManager.js, line 261 -
获取标绘图数据。
-
setActiveChildPlotLayer(childPlotLayer)
leaflet/plot/PlotMapManager.js, line 225 -
设置当前激活的子图层。
Name Type Description childPlotLayer
childPlotLayer 要设置的子图层。
-
setActivePlottingLayer(plottingLayer)
leaflet/plot/PlotMapManager.js, line 187 -
设置当前激活的图元层。
Name Type Description plottingLayer
PlottingLayer 要设置的图元层。
-
setSymScaleDefinition(symScaleDefinition)
leaflet/plot/PlotMapManager.js, line 178 -
设置标绘图的缩放基准。
Name Type Description symScaleDefinition
number 标绘图的缩放基准。