new GOAnimationManager(map, serverUrl)
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).getGOAnimationManager();
//直接创建
new L.supermap.plotting.GOAnimationManager(map, serverUrl);
// 另一种写法
L.supermap.plotting.goAnimationManager(map, serverUrl);
</script>
// ES6 Import
import { GOAnimationManager } from '../../public/iclient-plot/iclient-plot-leaflet-es6.min.js';
new GOAnimationManager(map, serverUrl);
leaflet/plot/GOAnimationManager.js, line 29
Name | Type | Description |
---|---|---|
map |
L.Map |
地图。 |
serverUrl |
string |
标绘服务地址。 |
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 symbolLibManager = L.supermap.plotting.getControl(map, serverUrl).getGOAnimationManager();
Extends
Methods
-
createGOAnimation(animationType, name, goFeature, isRaiseEvent, playType){GOAnimation}
leaflet/plot/GOAnimationManager.js, line 210 -
创建动画。
Name Type Description animationType
GOAnimationType 动画类型。
name
string 动画名称。
goFeature
GraphicObject 动画原始几何对象。
isRaiseEvent
boolean 是否触发创建事件,默认为true
playType
AnimationPlayType 动画播放模式,默认为AnimationPlayType.UNKNOWN
Returns:
Type Description GOAnimation 动画对象。 -
destroy()
leaflet/plot/GOAnimationManager.js, line 129 -
销毁对象,释放资源。
-
execute(){boolean}
leaflet/plot/GOAnimationManager.js, line 383 -
执行动画。
Returns:
Type Description boolean 有动画执行则返回true,否则返回false -
findGOAnimationByName(name){GOAnimation}
leaflet/plot/GOAnimationManager.js, line 250 -
根据动画名称查找动画。
Name Type Description name
string 动画名称。
Returns:
Type Description GOAnimation 动画对象。 -
findGOAnimationsByFeature(goFeature){Array.<GOAnimation>}
leaflet/plot/GOAnimationManager.js, line 272 -
根据动画原始几何对象查找动画。
Name Type Description goFeature
GraphicObject 动画原始几何对象。
Returns:
Type Description Array.<GOAnimation> 动画对象。 -
findGOAnimationsByUuid(uuid){Array.<GOAnimation>}
leaflet/plot/GOAnimationManager.js, line 293 -
根据uuid查找动画。
Name Type Description uuid
string 用户定义的唯一ID。
Returns:
Type Description Array.<GOAnimation> 动画对象数组。 -
fromJSONData(jsonData)
leaflet/plot/GOAnimationManager.js, line 577 -
根据动画json数据创建动画。
Name Type Description jsonData
Object 动画json数据。
-
getJSONData(){Object}
leaflet/plot/GOAnimationManager.js, line 536 -
获取动画json数据。
Returns:
Type Description Object 动画json数据。 -
inherited moveAnimation(animation, targetIndex)
leaflet/plot/GOAnimationManagerBase.js, line 318 -
移动动画到目标索引位置。
Name Type Description animation
object 动画。
targetIndex
number 动画目标索引。
-
inherited pause()
leaflet/plot/GOAnimationManagerBase.js, line 103 -
暂停所有动画。
-
inherited play(animationname)
leaflet/plot/GOAnimationManagerBase.js, line 45 -
播放动画。
Name Type Description animationname
string 动画名称,默认不设置,从第一个开始播。
-
inherited preView()
leaflet/plot/GOAnimationManagerBase.js, line 28 -
预览所有动画。
-
removeAllGOAnimation()
leaflet/plot/GOAnimationManager.js, line 359 -
删除所有动画。
-
removeGOAnimation(goAnimation){boolean}
leaflet/plot/GOAnimationManager.js, line 325 -
删除动画。
Name Type Description goAnimation
GOAnimation 动画对象。
Returns:
Type Description boolean 是否删除成功。 -
removeGOAnimationByName(name){boolean}
leaflet/plot/GOAnimationManager.js, line 310 -
根据名称删除动画。
Name Type Description name
string 动画名称。
Returns:
Type Description boolean 是否删除成功。 -
inherited reset()
leaflet/plot/GOAnimationManagerBase.js, line 125 -
复位所有动画。
-
setMap(map){boolean}
leaflet/plot/GOAnimationManager.js, line 147 -
设置地图对象。
Name Type Description map
L.Map 地图对象。
Returns:
Type Description boolean 设置成功返回true,否则返回false -
inherited stop()
leaflet/plot/GOAnimationManagerBase.js, line 88 -
停止所有动画。