当前位置: 首页 > news >正文

推广方法有哪些技巧seo搜索优化费用

推广方法有哪些技巧,seo搜索优化费用,安徽六安特产有哪些,小程序登录授权使用addInteraction添加交互draw绘制&#xff0c;预期removeInteraction删除交互draw绘制时不再绘制&#xff0c;但是删除绘制不起作用&#xff0c;各种找原因&#xff0c;结果把data中的map变量注释掉即可&#xff0c;原因未知。 <template><div><div id"…

使用addInteraction添加交互draw绘制,预期removeInteraction删除交互draw绘制时不再绘制,但是删除绘制不起作用,各种找原因,结果把data中的map变量注释掉即可,原因未知。

<template><div><div id="map" style="position:absolute;width:100vw;height:100vh"></div><div style="position: absolute; left: 50px; top:10px"><el-button @click="addInteractions">绘制</el-button><el-button @click="removeInteractions">取消</el-button></div></div>
</template>
<script src="./index.js"></script>
<style lang="scss" src="./index.scss" scoped></style>
import "ol/ol.css";
import GeoJSON from 'ol/format/GeoJSON'
import { Map, View } from "ol";
import TileLayer from "ol/layer/Tile";
import { fromLonLat } from "ol/proj";
import { Select, Modify, Draw, Snap } from 'ol/interaction';
import { Tile, Vector as VectorLayer } from 'ol/layer'
import { Point } from 'ol/geom'
import { XYZ, TileWMS, Vector as VectorSource } from 'ol/source'
import MapOne from '@/components/MapOne/index.vue';export default {components: {MapOne},data() {return {// map: null, // 不要声明,否则removeInteraction不起作用}},computed: {},watch: {},mounted() {this.initMap()},created() {},methods: {initMap() {this.map = new Map({target: "map",view: new View({center: fromLonLat([113.53450137499999, 34.44104525]),zoom: 5}),layers: [new TileLayer({source: new XYZ({url: 'http://wprd0{1-4}.is.autonavi.com/appmaptile?lang=zh_cn&size=1&style=7&x={x}&y={y}&z={z}'}),}),],});this.selectSource = new VectorSource({format: new GeoJSON(),})var selectLayer = new VectorLayer({source: this.selectSource,})this.map.addLayer(selectLayer)},addInteractions() {this.select = new Select({wrapX: false,});this.modify = new Modify({features: this.select.getFeatures(),});this.draw = new Draw({type: 'Polygon',source: this.selectSource,});this.snap = new Snap({source: this.selectSource,});this.changeInteractions('draw')},removeInteractions() {this.map.removeInteraction(this.modify);this.map.removeInteraction(this.select);this.map.removeInteraction(this.draw);this.map.removeInteraction(this.select);},changeInteractions(value) {this.removeInteractions();switch (value) {case 'draw': {this.map.addInteraction(this.draw);this.map.addInteraction(this.snap);break;}case 'modify': {this.map.addInteraction(this.select);this.map.addInteraction(this.modify);this.map.addInteraction(this.snap);break;}default: {// pass}}},}
}

http://www.zhongyajixie.com/news/25638.html

相关文章:

  • 做网站和论坛区别网站策划书
  • 信息最全的网站sem网络推广公司
  • 引流效果最好的平台seo网站分析工具
  • 他人委托我做网站抖音seo优化排名
  • dw怎么做phpcms网站教育机构培训
  • 重庆黔江做防溺水的网站seo专业培训中心
  • 广州网站建设好做吗谷歌搜索排名规则
  • 制作网站教学项目网站
  • 所有做运动的网站如何网站关键词优化
  • 精通网站建设 100seo怎么读
  • 做一些网站的弹出页面百度网页版链接
  • 几何图形生成网站软件注册推广平台
  • 免费模板网站下载国际军事新闻
  • 苏州设置网站建设怎么申请网站空间
  • 山东圣大建设集团网站引流推广怎么做
  • 手机数据线东莞网站建设地推的方法和技巧
  • 怎么做类似淘宝的网站链接平台
  • 如何选择网站模板哪个平台可以免费推广
  • 宁波外贸公司招聘关键词优化推广排名多少钱
  • 做高效能的父母网站搜索引擎优化人员优化
  • 怎么样子做网站近一周新闻热点事件
  • 政府网站平台安全建设方案网络推广培训课程内容
  • 长沙建网站企业谷歌地球
  • 厂房网关键词优化排名怎么做
  • 广州沙河一起做网站的网址百度seo排名规则
  • 住房和城乡建设部网站证书查询免费投放广告的平台
  • 日本漫画网站模板东莞seo优化推广
  • 网站二次开发费用2345网址导航删除办法
  • 网站url改版乐天seo视频教程
  • 2015做微网站多少钱下载百度搜索