0.1.26 • Published 3 months ago

dnn-vue-ol v0.1.26

Weekly downloads
-
License
-
Repository
-
Last release
3 months ago

dnn-vue-ol 测试

基于 openlayers 的二次封装

安装

npm install dnn-vue-ol

使用

// 示例代码
<template>
  <dnn-openlayers > </dnn-openlayers>
</template>

<script lang="ts" setup>
  import DnnOpenlayers from "dnn-vue-ol";
</script>

API

属性名说明类型默认值版本
defalutLatlng默认初始化中心点。默认值为南京区域的经纬度。array118.763563, 32.061384
defalutZoom默认初始化层级。默认值为7。number7
marksPoint具有聚合功能的标记点。array[]
markTextZoom标记点文字展示层级。默认值为7。number7
markTextStyle标记点文字样式。object{offsetX: 0,offsetY: 10,textAlign: "center",font: "12px font-size",padding: 3, 4, 2, 4,fill: "#fff",fillActive: "#fff",backgroundFill: "#666",backgroundFillActive: "#3E9BFE",}
markImgStyle标记点的图标样式。scale:大小规模。opacity:透明度object{type: "default",imgSrc: "",imgSrcActive: "",scale: 0.6,opacity: 1}
mapLayerType底图类型。vec:矢量底图;img:影像底图;ter:地形晕渲stringvec
themaeMode主题色(仅底图类型为矢量底图时有效)。light:浅色系;dark:深色系stringlight
isSearch是否带有搜索区域定位功能booleantrue
searchAreaParams搜索区域的请求参数。如非特定,无需修改。object{cityName: "全国",token: "xxx",checkCode:"xxx",}
searchAreaRequestInfo搜索区域的请求地址以及方式。如非特定,无需修改。object{ url: "xxx", method: "get", }
adcode区域编码。详情可见:https://datav.aliyun.com/portal/school/atlas/area_selectorstring例:320100_full
areaColor区域蒙层的颜色设置。stroke:区域边线颜色;strokeWidth:区域边线宽度;fill:区域蒙层颜色。object{ stroke: "rgb(87, 124, 204)",strokeWidth: 2,fill: "rgba(87, 124, 204,0.2)",}
isFirstSelect是否默认选择第一条。booleantrue
isCreatePointByHand点击地图,是否可以创建标记点(单个)。一般用于无其他标记点,和无区域渲染层的情况下booleanfalse
createPointLnglat根据经纬度,创建标记点(单个)。一般用于无其他标记点,和无区域渲染层的情况下array118.763563, 32.061384

事件

事件名描述参数版本
getActiveMarkInfo标记点点击事件。参数为标记点的idfunction(id: string )
getSearchAreaMarkInfo区域名搜索,返回相关信息。参数为区域信息markInfofunction(markInfo: string )
getCustomPointLnglat手动定位增加标记点,返回该点经纬度。参数为经纬度lanlatfunction(lanlat: any )
0.1.26

3 months ago

0.1.24

4 months ago

0.1.25

4 months ago

0.1.23

4 months ago

0.1.20

4 months ago

0.1.21

4 months ago

0.1.22

4 months ago

0.1.17

4 months ago

0.1.18

4 months ago

0.1.19

4 months ago

0.1.15

4 months ago

0.1.16

4 months ago

0.1.13

4 months ago

0.1.14

4 months ago

0.1.10

4 months ago

0.1.11

4 months ago

0.1.12

4 months ago

0.1.8

4 months ago

0.1.7

4 months ago

0.1.9

4 months ago

0.1.4

4 months ago

0.1.3

4 months ago

0.1.6

4 months ago

0.1.5

4 months ago

0.1.2

4 months ago

0.1.1

4 months ago

0.1.0

4 months ago