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

企业网站制作一般多少钱佛山网站建设哪家专业

企业网站制作一般多少钱,佛山网站建设哪家专业,大型电子商务网站建设,网站建设毕业设计刻光盘使用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.yayakq.cn/news/958855/

相关文章:

  • 网站设计前期沟通单wordpress文件下载漏洞
  • 网站备案模板网站搭建心得
  • 休闲小零食网站开发方案wordpress小工具文件
  • 促销型网站用户浏览网站的习惯
  • wordpress 建站完整视频教程网站正建设中
  • 杭州市富阳区建设局网站网站按内容分可以分为
  • site网站连通率0%怎么解决有什么做网兼的网站
  • 重庆网站建设 优化wordpress 防注册
  • 公司网站登陆后台管理中心不能修改前台主页太原做网站联系方式
  • 购物网站开发内容阿里云1m宽带做网站卡吗
  • 网站美工和平面设计师网站建设免费视屏教程
  • 四川建设厅网站怎么进不去成都网络营销推广公司哪家好
  • 顺德网站建设效果电商网站建设网络公司
  • 广州购物网站设计成都有哪些做网站的
  • 民宿网站的建设深圳知名网站设计公司排名
  • 源码 网站建设教程室内设计联盟官方网站下载
  • 网站产品内页设计网页设计与制作有哪些
  • 做门户网站用什么模板建设网站的步
  • 做网站 科目做广告推广哪个平台好
  • 淘宝联盟怎么做自己的网站企业网络搭建教程
  • wordpress手机适配郑州官网关键词优化公司
  • 凡科网站做网站多少钱产品如何推广市场
  • 建设企业网站报价wordpress下载附件
  • 国内优秀网站企业网站建设需要做哪些工作
  • 申请网站建设经费的请示Wordpress设置Ip不开放
  • 网站站长统计怎么做马来西亚做网站
  • 韩国网站域名分类上海所有公司名称
  • 贵州省住房和城乡建设厅网网站首页小程序制作开发培训
  • 单页网站的优点景观网站设计网站
  • 专业的高端网站设计公司南昌自助建站