ol-map-vue3

Vue3基于openLayers封装的地图组件库
999 1
Install
npm install ol-map-vue3
Latest Version:0.0.3
License:MIT
Last Updated:Feb 4, 2023
Links: GitHub  ·  npm
Maintainer: splendorjiang

ol-map-vue3

Vue3基于openLayers封装的地图组件库

以 https://gitee.com/newgateway/xdh-map 为基础,修改为Vue3 setup + ts版本

⚠本项目处于极其早期状态,请不要使用!

安装

pnpm i ol-map-vue3

用例

import { OlMap, OlMapCircle, OlMapLine, OlMapPolygon } from 'ol-map-vue3'
<OlMap adapter="Amap" :center="[113.261999, 23.130592]" :zoom="14">
      <OlMapCircle :center="[113.261999, 23.130592]" :radius="1000" />
      <OlMapLine
        :coordinates="[
          [112.810186, 23.267921],
          [113.577856, 23.277534],
          [113.164495, 23.009742],
          [113.811415, 22.958749],
        ]" arrow arrow-each color="red" :stroke="{
          width: 3,
          color: '#409e00',
        }"
      />
      <OlMapPolygon
        :coordinates="[
          [112, 23],
          [113.57, 23.27],
          [113, 23],
        ]" fill="rgba(250,250,0, 0.1)" :stroke="{
          width: 1,
          color: 'red',
        }"
      />
      <OlMapText
        :coordinate="[113.261999, 23.130592]" v-bind="{
          text: '文本样例',
          font: '30px',
          fill: '#fff',
          stroke: {
            width: 3,
            color: '#409e00',
          },
          rotation: -0.5,
          backgroundFill: 'rgba(0,0,0,0.3)',
          padding: [10, 10, 5, 10],
          backgroundStroke: {
            width: 5,
            color: '#009e00',
          },
        }"
      />
      <OlMapHtml :position="[113.061999, 23.230592]">
        <div style="background-color: aquamarine;">
          HTML覆盖物
        </div>
        <button>test</button>
      </OlMapHtml>
</OlMap>

Related Packages

v-openlayers

基于vue3+openlayers封装的组件库

3,599
vue-openlayers

humble wrapper for the powerful openlayers map api

1,146 46
my-openlayer

my-openlayer 是一个基于 OpenLayers 的现代地图组件库,专为 Web GIS 应用开发者设计...

9,722 9
gis-map-szdp

GIS通用组件 - Vue 3 超图版本

6,714
dnn-vue-ol

基于 openlayers 的二次封装

1,272

Version History

Version Released License
0.0.3 MIT
0.0.2 MIT
0.0.1 MIT