openLayers6系列理论基础——Map篇,前端开发基础学习

openLayers6系列理论基础——Map篇,前端开发基础学习

  • layer:管理图层的,决定了加载什么类型图层

  • view:视图,决定了坐标系、视图范围等

  • controls:控件入口,类似于比例尺、zoom、等

  • target:关联dom,让地图显示在哪个dom上

二、map的使用

========

import ol from ‘openlayers’;

var map =new ol.Map({options?});

三、map的options选项

===============

| 名称 | 类型 | 描述 |

| — | — | — |

| controls | module:ol / Collection〜Collection。< 模块:ol / control / Control〜Control > | Array。< 模块:ol / control / Control〜Control > |

最初添加到地图的控件。如果未指定, module:ol/control~defaults则使用。

|

| pixelRatio | 数字 (默认为window.devicePixelRatio) |

设备上物理像素与设备无关像素(dip)之间的比率。

|

| interactions | module:ol / Collection〜Collection。< 模块:ol / interaction / Interaction〜Interaction >

转载请说明出处内容投诉
CSS教程网 » openLayers6系列理论基础——Map篇,前端开发基础学习

发表评论

欢迎 访客 发表评论

一个令你着迷的主题!

查看演示 官网购买