![](https://img-blog.csdnimg.cn/20200804160026352.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
openlayers
以实战为主,在项目过程中遇到的知识点分享。
snobodyx
这个作者很懒,什么都没留下…
展开
-
openlayers6实现可拖拽点位,点位可拖拽移动点击移动
openlayers6实现可拖拽点位实现功能:需要实现地图上点击出现点位,此点位可拖拽,并且点击移动,从而实现地图选点的功能使用技术:openlayers6 + react + 高德地图底图1. 第一步:初始化地图容器html代码:新增dom节点<div id="testMap" style={{width: '100vw', height: '100vh'}}></div>2. 第二步:初始化地图js代码:初始化时调用方法初始化高德地图const lngCente原创 2020-08-31 11:07:11 · 4592 阅读 · 0 评论 -
react中用openlayers6预览图片
import React from "react";import { Spin } from "antd";import ImageLayer from 'ol/layer/Image';import Map from 'ol/Map';import Projection from 'ol/proj/Projection';import Static from 'ol/source/ImageStatic';import View from 'ol/View';import { getCent原创 2020-07-28 15:54:20 · 297 阅读 · 0 评论