![](https://img-blog.csdnimg.cn/20201014180756926.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
openlayers
月影星云
这个作者很懒,什么都没留下…
展开
-
openlayers常用方法封装
import 'ol/ol.css';import { isPlainObject } from '@/utils/assist';import { Map, View, Tile, Feature, Overlay } from 'ol';import { XYZ, Vector as VectorSource, ImageStatic, ImageCanvas as ImageCanvasSource, Cluster } from 'ol/source';import { Tile as Ti原创 2021-12-21 09:03:52 · 1258 阅读 · 0 评论 -
openlayers实现四周遮罩,特定区域透明效果
1、效果如图所示2、地图标签<template> <div id="icingliveMap" class="icingliveMap"></div></template>3、样式<style>html, body, #app, .icingliveMap{ width: 100%; height: 100%;}</style>4、导入openlayers的API、导入axiosimport "ol/ol原创 2021-09-09 09:06:28 · 3116 阅读 · 3 评论 -
openlayers鼠标经过指定图层箭头变成手势
this.map.on('pointermove', e => { //鼠标经过箭头变手势,,可以在if的条件中加入指定的图层layerId即可 let pixel = this.map.getEventPixel(e.originalEvent); let hit = this.map.hasFeatureAtPixel(pixel, { layerFilter: layer => { let layerId = layer.ge原创 2021-08-04 15:14:39 · 1476 阅读 · 0 评论 -
如何获取两个经纬度点之间的中心点的经纬度
export function getCenterLonLat(oneLon, oneLat, twoLon, twoLat) { //oneLon:第一个点的经度;oneLat:第一个点的纬度;twoLon:第二个点的经度;twoLat:第二个点的纬度; let aLon = 0, aLat = 0; let bLon = Number(oneLon) - Number(twoLon); let bLat = Number(oneLat) - Number(twoLat);原创 2021-08-03 09:14:17 · 3960 阅读 · 0 评论