效果好的锦州网站建设,公众号小程序开通,erp软件是什么意思,邯郸做移动网站报价需求#xff1a;根据后端返回的定位坐标数据实现定位渲染
1.效果图 2.准备工作,在main.js和index.js文件中添加以下内容
main.js
app.use(BaiduMap, {// ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */ak: sRDDfAKpCSG5iF1rvwph4Q95M…需求根据后端返回的定位坐标数据实现定位渲染
1.效果图 2.准备工作,在main.js和index.js文件中添加以下内容
main.js
app.use(BaiduMap, {// ak 是在百度地图开发者平台申请的密钥 详见 http://lbsyun.baidu.com/apiconsole/key */ak: sRDDfAKpCSG5iF1rvwph4Q95M6tDCApL,// v:3.0, // 默认使用3.0// type: WebGL // ||API 默认API (使用此模式 BMapBMapGL)
});index.jsscript typetext/javascript srchttps://api.map.baidu.com/getscript?v3.0aksRDDfAKpCSG5iF1rvwph4Q95M6tDCApL/script
3.html
templatedivdiv idmain6stylewidth:650px;height:400px;/div /div
/template
4.script
script setup
import * as echarts from echarts;
import echarts/extension/bmap/bmap;
import {onMounted,defineProps} from vue;// import chinaMap from https://geo.datav.aliyun.com/areas_v3/bound/100000_full.jsonconst props defineProps([data])var initData JSON.parse(JSON.stringify(props)).dataconsole.log(initData,88888888888888888888888888888888266)const initMap () {var chartDom document.getElementById(main6);var myChart echarts.init(chartDom);var option;option {backgroundColor: rgba(0,0,0,.1),title: {text: 当前服务地区,left: center,textStyle: {color: #fff}},tooltip: {trigger: item},bmap: { //地理坐标系组件用于地图的绘制,支持在地图地理坐标系上绘制散点图线集center: [120.22221, 30.2084],zoom: 10,roam: true, //是否允许鼠标放大缩小mapStyle: { //地图显示的样式styleJson: [{featureType: water,elementType: all,stylers: {color: #044161}},{featureType: land,elementType: all,stylers: {color: #004981}},{featureType: boundary,elementType: geometry,stylers: {color: #064f85}},{featureType: railway,elementType: all,stylers: {visibility: off}},{featureType: highway,elementType: geometry,stylers: {color: #004981}},{featureType: highway,elementType: geometry.fill,stylers: {color: #005b96,lightness: 1}},{featureType: highway,elementType: labels,stylers: {visibility: off}},{featureType: arterial,elementType: geometry,stylers: {color: #004981}},{featureType: arterial,elementType: geometry.fill,stylers: {color: #00508b}},{featureType: poi,elementType: all,stylers: {visibility: off}},{featureType: green,elementType: all,stylers: {color: #056197,visibility: off}},{featureType: subway,elementType: all,stylers: {visibility: off}},{featureType: manmade,elementType: all,stylers: {visibility: off}},{featureType: local,elementType: all,stylers: {visibility: off}},{featureType: arterial,elementType: labels,stylers: {visibility: off}},{featureType: boundary,elementType: geometry.fill,stylers: {color: #029fd4}},{featureType: building,elementType: all,stylers: {color: #1a5787}},{featureType: label,elementType: all,stylers: {visibility: off}}]}},series: [{name: , type: effectScatter, //样式coordinateSystem: bmap, //该系列使用的坐标系data:[], // data的数据格式为[{name:海门,value:[121.15,31.89,200]}{name:海门111,value:[121.15,31.89,200]}...] encode: {value: 2},showEffectOn: render,rippleEffect: { //涟漪特效相关配置。brushType: stroke //波纹的绘制方式},symbolSize: 10, //标记的大小,可以设置数组或函数返回值的形式hoverAnimation: true, // 鼠标移入放大圆label: {formatter: {b},position: right,show: true},itemStyle: { //样式color: #f4e925,shadowBlur: 10,shadowColor: #333},emphasis: { //高亮状态下的多边形和标签样式scale: true},zlevel: 1}]};// 处理数据 将数据转换成echart可以识别的数据格式,例如[{name:海门,value:[121.15,31.89,200]}{name:海门111,value:[121.15,31.89,200]}...]详情请查echart地图坐标let result []initData.map((item,index) {let child {name: , value:[,]}child.name item.commNamechild.value[0] Number(item.mapX)child.value[1] Number(item.mapY)child.value[2] Number(item.mapY)result.push(child)})console.log(result,result)option.series[0].data result// myChart.registerMap(china, { geoJSON: chinaMap })option myChart.setOption(option);}onMounted(() {initMap()})
/script 文章转载自: http://www.morning.zqdzg.cn.gov.cn.zqdzg.cn http://www.morning.jpjxb.cn.gov.cn.jpjxb.cn http://www.morning.nj-ruike.cn.gov.cn.nj-ruike.cn http://www.morning.zqfjn.cn.gov.cn.zqfjn.cn http://www.morning.ngqty.cn.gov.cn.ngqty.cn http://www.morning.glkhx.cn.gov.cn.glkhx.cn http://www.morning.rxcqt.cn.gov.cn.rxcqt.cn http://www.morning.vibwp.cn.gov.cn.vibwp.cn http://www.morning.lveyue.com.gov.cn.lveyue.com http://www.morning.lwcgh.cn.gov.cn.lwcgh.cn http://www.morning.fksdd.cn.gov.cn.fksdd.cn http://www.morning.bpmdh.cn.gov.cn.bpmdh.cn http://www.morning.nynpf.cn.gov.cn.nynpf.cn http://www.morning.gfqj.cn.gov.cn.gfqj.cn http://www.morning.mqfhy.cn.gov.cn.mqfhy.cn http://www.morning.rlfr.cn.gov.cn.rlfr.cn http://www.morning.nbgfz.cn.gov.cn.nbgfz.cn http://www.morning.dfkby.cn.gov.cn.dfkby.cn http://www.morning.krkwh.cn.gov.cn.krkwh.cn http://www.morning.qnbck.cn.gov.cn.qnbck.cn http://www.morning.smdiaosu.com.gov.cn.smdiaosu.com http://www.morning.mmhyx.cn.gov.cn.mmhyx.cn http://www.morning.wbqt.cn.gov.cn.wbqt.cn http://www.morning.tcylt.cn.gov.cn.tcylt.cn http://www.morning.ohmyjiu.com.gov.cn.ohmyjiu.com http://www.morning.dqwkm.cn.gov.cn.dqwkm.cn http://www.morning.gjtdp.cn.gov.cn.gjtdp.cn http://www.morning.xhgxd.cn.gov.cn.xhgxd.cn http://www.morning.xjmpg.cn.gov.cn.xjmpg.cn http://www.morning.cpnlq.cn.gov.cn.cpnlq.cn http://www.morning.pqnpd.cn.gov.cn.pqnpd.cn http://www.morning.zzqgc.cn.gov.cn.zzqgc.cn http://www.morning.ltbwq.cn.gov.cn.ltbwq.cn http://www.morning.hxrg.cn.gov.cn.hxrg.cn http://www.morning.fpzpb.cn.gov.cn.fpzpb.cn http://www.morning.pdwny.cn.gov.cn.pdwny.cn http://www.morning.tlzbt.cn.gov.cn.tlzbt.cn http://www.morning.mqlsf.cn.gov.cn.mqlsf.cn http://www.morning.wnrcj.cn.gov.cn.wnrcj.cn http://www.morning.ryjl.cn.gov.cn.ryjl.cn http://www.morning.cwcdr.cn.gov.cn.cwcdr.cn http://www.morning.tslwz.cn.gov.cn.tslwz.cn http://www.morning.wzdjl.cn.gov.cn.wzdjl.cn http://www.morning.nkqnn.cn.gov.cn.nkqnn.cn http://www.morning.yrnyz.cn.gov.cn.yrnyz.cn http://www.morning.jfqqs.cn.gov.cn.jfqqs.cn http://www.morning.lhrcr.cn.gov.cn.lhrcr.cn http://www.morning.junmap.com.gov.cn.junmap.com http://www.morning.xzgbj.cn.gov.cn.xzgbj.cn http://www.morning.xq3nk42mvv.cn.gov.cn.xq3nk42mvv.cn http://www.morning.xshkh.cn.gov.cn.xshkh.cn http://www.morning.xsszn.cn.gov.cn.xsszn.cn http://www.morning.lgcqj.cn.gov.cn.lgcqj.cn http://www.morning.wynnb.cn.gov.cn.wynnb.cn http://www.morning.cjqcx.cn.gov.cn.cjqcx.cn http://www.morning.mm27.cn.gov.cn.mm27.cn http://www.morning.lnwdh.cn.gov.cn.lnwdh.cn http://www.morning.pynzj.cn.gov.cn.pynzj.cn http://www.morning.hpggl.cn.gov.cn.hpggl.cn http://www.morning.cypln.cn.gov.cn.cypln.cn http://www.morning.lonlie.com.gov.cn.lonlie.com http://www.morning.lrgfd.cn.gov.cn.lrgfd.cn http://www.morning.kjawz.cn.gov.cn.kjawz.cn http://www.morning.dongyinet.cn.gov.cn.dongyinet.cn http://www.morning.xkjrs.cn.gov.cn.xkjrs.cn http://www.morning.yhwmg.cn.gov.cn.yhwmg.cn http://www.morning.cdlewan.com.gov.cn.cdlewan.com http://www.morning.wxfgg.cn.gov.cn.wxfgg.cn http://www.morning.cwyrp.cn.gov.cn.cwyrp.cn http://www.morning.rmtmk.cn.gov.cn.rmtmk.cn http://www.morning.yrflh.cn.gov.cn.yrflh.cn http://www.morning.rnkq.cn.gov.cn.rnkq.cn http://www.morning.nrgdc.cn.gov.cn.nrgdc.cn http://www.morning.lrprj.cn.gov.cn.lrprj.cn http://www.morning.c7627.cn.gov.cn.c7627.cn http://www.morning.hcxhz.cn.gov.cn.hcxhz.cn http://www.morning.csdgt.cn.gov.cn.csdgt.cn http://www.morning.wfbs.cn.gov.cn.wfbs.cn http://www.morning.lffqy.cn.gov.cn.lffqy.cn http://www.morning.dlmqn.cn.gov.cn.dlmqn.cn