arcgis api 之view

mapView导航:

Zoom:定义视图的缩放级别;
Center:定义视图的中心点; 
Scale:定义地图显示的比例级别;
Extent:定义视图的显示范围;
Viewpoint
Camere

mapView.constraints

限制loadsscalezoomrotation

view.constraints={
minScale: 500000 ,// User cannot zoom out beyond a scale of 1:500,000
maxScale: 0 ,// User can overzoom tiles
rotationEnabled: false// Disables map rotation
};

限制altitude(camera高度设置)camera tilt

view.constraints={
Altitude:{
Min:500,
Max:2000000000;
}
};
ViewingMode:”local”   设置三维地图格式不设置的话默认为globe即球体

●View. environment

指定环境可视化方面的属性:

- background
- lighting
- atmosphereEnabled
- atmosphere
- starsEnabled   黑色背景星空顶

View方法:

goTo(target(导航的位置),options(呈现的效果))      用于导航,从当前位置跳转至另一个位置
toMap()        screen point转换为 map point
toScreen()    map point 转换为  screen point
hitTest()         返回与制定屏幕坐标相交的每个图层的最顶层要素。
when()      图层的加载
on()        事件的监听
Watch()     对属性变化的监听

 

view.on()实例:

View.on(type,modifiersOrHandler,handler?)
事件: Blur click
double- -click drag focus hold lmmediate-click key-down key-up layerview- create layerview-destroy mouse -wheel pointer- down pointer-enter pointer-leave pointer-move pointer-up resize

view.watch()实例:

View.watch(path,callback)
var handle = view . watch ("scale",function (newValue, oldvalue, proper tyName, target) {
console,1og (propertyName +”changed from ”+ oldValue +”to”+ newvalue) ;
};

 

posted on 2021-08-17 18:15  一往无前!  阅读(399)  评论(0编辑  收藏  举报