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

网站建设技术架构和语言sem推广软件

网站建设技术架构和语言,sem推广软件,网站做icp备案需要多久,网站建设方案ppt 枫子科技目录 效果展示代码引入地图服务地址弹框中输入框 - 支持手动输入经纬度/地图选点按钮地图选点弹框组件 当前文章 - 地图功能与 https://blog.csdn.net/m0_53562074/article/details/143677335 功能类似 效果展示 代码 引入地图服务地址 public/index.html <!-- 互联网地图…

目录

  • 效果展示
  • 代码
    • 引入地图服务地址
    • 弹框中输入框 - 支持手动输入经纬度/地图选点按钮
    • 地图选点弹框组件

当前文章 - 地图功能与 https://blog.csdn.net/m0_53562074/article/details/143677335 功能类似

效果展示

在这里插入图片描述

代码

引入地图服务地址

public/index.html

<!-- 互联网地图 -->
<script src="https://map.qq.com/api/gljs?v=2.exp&key=自己申请的key"></script><!-- 如果有用到编辑器 new TMap.tools.GeometryEditor() ,地图服务地址上查询参数要加 libraries=tools -->
<!-- https://map.qq.com/api/gljs?libraries=tools&v=2.exp&key=自己申请的key -->

弹框中输入框 - 支持手动输入经纬度/地图选点按钮

已删除无关代码,只展示地图选点相关代码

<template><el-dialogv-if="dialogVisible"title="弹框展示选点":visible.sync="dialogVisible":show-close="true"width="700px":close-on-click-modal="false":close-on-press-escape="false":before-close="handleClose"append-to-body><!-- ... --><div class="position"><el-input v-model="formData.position" placeholder="请输入勤务地点" size="mini" /><i class="iconfont ico-dituxuanze" @click="setPosition" /></div><SetPointMap ref="SetPointMapRef" @updatePoint="updatePointHandler" /></el-dialog>
</template><script>
// ...
import SetPointMap from './SetPointMap'export default {name: 'ResultEntry',components: { SetPointMap },data() {return {// /...formData: {position: ''},dialogVisible: false}},methods: {// ...showDetail() {this.dialogVisible = true},setPosition() {const { position } = this.formDataconst arr = position.split(/,|,/)const pointer = {jd: arr[0],wd: arr[1]}this.$refs.SetPointMapRef.open(pointer)},updatePointHandler({ jd, wd }) {this.formData.position = `${jd},${wd}`},handleClose() {// ...// 关闭弹窗this.dialogVisible = false}}
}
</script>
<style lang="scss" scoped>
// ....position {display: flex;.el-input {flex: 1;margin-right: 10px;}.iconfont {cursor: pointer;}
}
</style>

地图选点弹框组件

SetPointMap.vue

<!-- 地图选点 -->
<template><el-drawerv-if="drawerVisible"title="地图标注"size="65%"append-to-body:before-close="handleClose":visible.sync="drawerVisible"><div :id="idName" class="TMap" /></el-drawer>
</template><script>
import { mapGetters } from 'vuex'export default {name: 'SetPointMap',data() {return {drawerVisible: false,idName: 'setPointMap',map: null,multiMarker: null, // 点位图标point: {},clickPoint: {}}},computed: {...mapGetters(['sysConfigData'])},watch: {clickPoint: {handler(val) {if (val.jd) {this.$confirm(`确定标注以下经纬度吗?<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;经度 ${val.jd}<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;纬度 ${val.wd}`,'提示',{confirmButtonText: '确定',cancelButtonText: '取消',type: 'warning',dangerouslyUseHTMLString: true}).then((_) => {this.drawerVisible = falsethis.$emit('updatePoint', val)}).catch((_) => {this.$message.info('取消经纬度标注')this.clickPoint = {}})}}}},mounted() {this.initMap()},methods: {open(pointer) {this.drawerVisible = truethis.point = pointer // 保存初始经纬度},initMap() {var location = (this.sysConfigData.map_location || '121.427648,28.661939').split(',')this.map = new TMap.Map(this.idName, {zoom: this.sysConfigData.map_level || 14,center: new TMap.LatLng(Number(location[1]), Number(location[0]))})this.map.removeControl(TMap.constants.DEFAULT_CONTROL_ID.ROTATION) // 移除腾讯地图旋转控件this.map.removeControl(TMap.constants.DEFAULT_CONTROL_ID.ZOOM) // 移除腾讯地图缩放控件if (this.point.jd && this.point.wd) {// 将初始经纬度在地图上进行标点this.setPoint({ ...this.point }, true)}this.map.on('click', (e) => {// 点击地图获取经纬度this.removePoint() // 移除已有标点this.clickPoint = {jd: e.latLng.lat,wd: e.latLng.lng}// 点击位置进行标点this.setPoint({ ...this.clickPoint })})},setPoint({ jd, wd }, isSetCenter = false) {isSetCenter && this.map.setCenter(new TMap.LatLng(Number(jd), Number(wd)))this.MultiMarker = new TMap.MultiMarker({id: 'marker-layer',map: this.map,styles: {marker: new TMap.MarkerStyle({width: 25,height: 35,anchor: { x: 16, y: 32 }})},geometries: [{id: 'demo',styleId: 'marker',position: new TMap.LatLng(jd * 1, wd * 1),properties: {title: 'marker'}}]})},removePoint() {this.MultiMarker?.setMap(null)},handleClose(done) {this.$confirm('还有未保存的工作,确定关闭吗?').then((_) => {done()}).catch((_) => {})}}
}
</script><style lang='scss' scoped>
.TMap {width: 100%;height: 100%;
}::v-deep .el-drawer {.el-drawer__body {padding: 0;}
}
</style>
http://www.dtcms.com/wzjs/213949.html

相关文章:

  • 织梦sms网站里面怎么更换广告图片seo优化排名软件
  • 怎么介绍自己的优势四川seo推广
  • 安庆哪里做网站福建百度seo排名点击软件
  • 网站建设和管理如何制作一个自己的网站
  • 网站怎么做翻页江门关键词排名工具
  • 怎么做音乐mp3下载网站抖音指数查询
  • 设计工作室装修效果图seo和sem的联系
  • 做网站用什么平台某产品网络营销推广方案
  • 招聘网站建设方案模板网站建设优化的技巧
  • 可以下载各种软件的网站google seo实战教程
  • 青岛做公司网站的多吗网推平台
  • 怎么样给公司做网站草根seo博客
  • 部标平台软件网站开发sem百度竞价推广
  • 网站建设找什么公司免费seo视频教程
  • 做网站需要做优化吗深圳百度推广
  • 免费自建手机网站百度网盘app下载安装 官方下载
  • 网站建设课程简介乐陵市seo关键词优化
  • 电子商务网站建设成都个人发布信息免费推广平台
  • 房地产网站广告销售怎么做营销管理
  • 东莞齐诺做网站上海百度推广方案
  • 网站建设安全吗东莞营销网站建设推广
  • 做网站应该学什么专业搜狗网站收录提交入口
  • 网站建设竞价托管外包做网站需要什么技术
  • 网站改版合同可以免费做网站推广的平台
  • 网站开发工单网站建设小程序开发
  • 网站服务器是注册域名平台吗站群seo
  • 艾米艾园wordpress商丘seo公司
  • 网站制作网站建设网络营销方法有哪几种
  • 时时彩怎么做网站上海百度公司地址
  • 郑州手机网站制作公司哪家好网站开发步骤