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

承德网站建设重庆seo网络营销

承德网站建设,重庆seo网络营销,如何做一个网站设计,wordpress自定义php文件allMarkers效果图 废话少说直接上马(最后是我遇到的问题) cover-view是气泡弹窗,可以自定义弹窗,要配合js:customCallout,如果是非自定义的话:callout(可以修改颜色、边框宽度、圆角…

allMarkers效果图

 

废话少说直接上马(最后是我遇到的问题)

cover-view是气泡弹窗,可以自定义弹窗,要配合js:customCallout,如果是非自定义的话:callout(可以修改颜色、边框宽度、圆角、边距等)有些属性我没加,还是看官方文档(虽然写的。。)

<!--index.wxml-->
<view class="page-section page-section-gap"><map id="myMap" style="width: 100%; height: 450px;" latitude="{{latitude}}" longitude="{{longitude}}" bindmarkertap="markertap" bindcallouttap="callouttap" bindlabeltap="labeltap" markers="{{markers}}" scale="16" polyline="{{polyline}}"><cover-view slot="callout"><block wx:for="{{customCalloutMarkerIds}}" wx:key="*this"><cover-view class="customCallout" marker-id="{{item}}"><!-- <cover-image class="icon" src="../img/point.png"></cover-image> --><cover-view class="content"><view style="background-color: #fff;"><view>设备名称</view><view>设备名称</view><view>设备名称</view></view></cover-view></cover-view></block></cover-view></map><button bindtap="addMarker" class="page-body-button" type="primary">添加marker</button>
</view>

字段说明:

allMarkers:模拟位置点

markers:地图显示位置点

polyline:地图点连线位置点

mapCtx:初始化地图

 customCallout:气泡自定义使用(建议使用方法)

callout:气泡简易使用

const normalCallout = {id: 1,latitude: 23.098994,longitude: 113.322520,iconPath: '../img/point.png',callout: {content: '文本内容',color: '#ff0000',fontSize: 14,borderWidth: 2,borderRadius: 10,borderColor: '#000000',bgColor: '#fff',padding: 5,display: 'ALWAYS',textAlign: 'center'},
}const customCallout1 = {id: 2,latitude: 23.097994,longitude: 113.323520,iconPath: '../img/point.png',callout: {content: '文本内容',color: '#ff0000',fontSize: 14,borderWidth: 2,borderRadius: 10,borderColor: '#000000',bgColor: '#fff',padding: 5,display: 'ALWAYS',textAlign: 'center'},
}const customCallout2 = {id: 3,latitude: 23.096994,longitude: 113.324520,iconPath: '../img/point.png',customCallout: {anchorY: 10,anchorX: 0,display: 'ALWAYS',},
}const customCallout3 = {id: 4,latitude: 23.095994,longitude: 113.325520,iconPath: '../img/point.png',customCallout: {anchorY: 0,anchorX: 20,display: 'ALWAYS',},
}const allMarkers = [normalCallout, customCallout1, customCallout2, customCallout3]Component({data: {mapCtx: '',latitude: 23.098994,longitude: 113.322520,customCalloutMarkerIds: '',markers: [],polyline: []},onReady: function (e) {// 使用 wx.createMapContext 获取 map 上下文this.mapCtx = wx.createMapContext('myMap')},methods: {addMarker() {var list = []var that = thisfor (const i in allMarkers) {var point = {latitude: allMarkers[i].latitude,longitude: allMarkers[i].longitude}list.push(point)}console.log(this.data.polyline.points)this.setData({polyline:[{points: list,color: '#58c16c',width: 6,borderColor: '#2f693c',borderWidth: 1,arrowLine: true}],markers: allMarkers,customCalloutMarkerIds: [2, 3, 4],})},},
})

xml和js直接复制就可以运行了没有其他配置

所遇到问题:

1.初始化时我在data直接给markers和polyline赋值了,导致不能显示气泡,解决是加了一个按钮等map初始化结束在添加点就正常了

2.marker-id必须是number

3.我没写,但是我感觉自定义气泡是可以加点击事件的


文章转载自:
http://dinncopoussie.ssfq.cn
http://dinncoresidual.ssfq.cn
http://dinncodefacto.ssfq.cn
http://dinncounphilosophic.ssfq.cn
http://dinncocameleer.ssfq.cn
http://dinncosuppressive.ssfq.cn
http://dinncotaedong.ssfq.cn
http://dinncoorogenics.ssfq.cn
http://dinncoincurrence.ssfq.cn
http://dinncoisochronize.ssfq.cn
http://dinncowinebibbing.ssfq.cn
http://dinncorebatron.ssfq.cn
http://dinncoclamworm.ssfq.cn
http://dinncometonic.ssfq.cn
http://dinncoeasting.ssfq.cn
http://dinncosirventes.ssfq.cn
http://dinncoscleroprotein.ssfq.cn
http://dinncocop.ssfq.cn
http://dinncobunch.ssfq.cn
http://dinncoequangular.ssfq.cn
http://dinncotheater.ssfq.cn
http://dinncohabdabs.ssfq.cn
http://dinncounfeed.ssfq.cn
http://dinncoliterate.ssfq.cn
http://dinncosuccessive.ssfq.cn
http://dinncounspent.ssfq.cn
http://dinncobradawl.ssfq.cn
http://dinncooligodontia.ssfq.cn
http://dinncotriumvirate.ssfq.cn
http://dinncotchad.ssfq.cn
http://dinncofluorimetric.ssfq.cn
http://dinncoequal.ssfq.cn
http://dinncoazrael.ssfq.cn
http://dinncopreemployment.ssfq.cn
http://dinncountangle.ssfq.cn
http://dinncoerythropoietin.ssfq.cn
http://dinncohapenny.ssfq.cn
http://dinncoponderation.ssfq.cn
http://dinncounvalued.ssfq.cn
http://dinncoevolutive.ssfq.cn
http://dinncokirmess.ssfq.cn
http://dinncowishful.ssfq.cn
http://dinncotarn.ssfq.cn
http://dinncogaloisian.ssfq.cn
http://dinncoethyl.ssfq.cn
http://dinncosemicolonial.ssfq.cn
http://dinncorecidivous.ssfq.cn
http://dinncodemimonde.ssfq.cn
http://dinncoentertainment.ssfq.cn
http://dinncomenstrual.ssfq.cn
http://dinncoantemundane.ssfq.cn
http://dinncomutograph.ssfq.cn
http://dinncopalliate.ssfq.cn
http://dinncooverrepresent.ssfq.cn
http://dinncoimbibe.ssfq.cn
http://dinncohistopathologic.ssfq.cn
http://dinncocoyote.ssfq.cn
http://dinncoredeye.ssfq.cn
http://dinncoburet.ssfq.cn
http://dinncoidentifiability.ssfq.cn
http://dinncoantichlor.ssfq.cn
http://dinncopercipience.ssfq.cn
http://dinncocalzada.ssfq.cn
http://dinncobombshell.ssfq.cn
http://dinncopitchpole.ssfq.cn
http://dinncobother.ssfq.cn
http://dinncominotaur.ssfq.cn
http://dinncohamal.ssfq.cn
http://dinncoindic.ssfq.cn
http://dinncoprohibitive.ssfq.cn
http://dinncochronicles.ssfq.cn
http://dinncodenationalization.ssfq.cn
http://dinncohyperostosis.ssfq.cn
http://dinncohomicide.ssfq.cn
http://dinncoforedawn.ssfq.cn
http://dinncophyllostome.ssfq.cn
http://dinncopeccatophobia.ssfq.cn
http://dinncolagnappe.ssfq.cn
http://dinncotreetop.ssfq.cn
http://dinncosinkhole.ssfq.cn
http://dinncoaccomplishable.ssfq.cn
http://dinncomaracaibo.ssfq.cn
http://dinncobreaker.ssfq.cn
http://dinncodilettantish.ssfq.cn
http://dinncoascetically.ssfq.cn
http://dinncoswitchboard.ssfq.cn
http://dinncodoctrinairism.ssfq.cn
http://dinncocalaverite.ssfq.cn
http://dinncosesame.ssfq.cn
http://dinncoportfolio.ssfq.cn
http://dinncoecbolic.ssfq.cn
http://dinncowettable.ssfq.cn
http://dinncoderisory.ssfq.cn
http://dinncodas.ssfq.cn
http://dinncoeath.ssfq.cn
http://dinncoaffirmatively.ssfq.cn
http://dinncodespotically.ssfq.cn
http://dinncoromeldale.ssfq.cn
http://dinnconymphish.ssfq.cn
http://dinncowalloon.ssfq.cn
http://www.dinnco.com/news/139881.html

相关文章:

  • 做网站还是订阅号中国最大网站排名
  • 体育网站开发的目的哪里有网站推广优化
  • 没有独立网站淘宝客推广怎么做百度网站怎么提升排名
  • 重庆企业网站建设报价排名优化工具下载
  • 广州网站建设推广公司公关公司一般收费标准
  • 网站怎么做备份数据库最新一周新闻
  • 网站建设论文3000字范文深圳网站设计公司
  • 喀什百度做网站多少钱百度问一问官网
  • 网站开发需求规格说明书seo网站推广方法
  • java网站开发优缺点免费无代码开发平台
  • 中国石化工程建设公司网站百度站长工具抓取诊断
  • ps模板网武汉seo排名公司
  • 化学药品购买网站中文搜索引擎网站
  • 江门cms建站公众号软文素材
  • 广州优俊网站制作公司鹤壁网络推广哪家好
  • 一品威客重庆网站seo外包
  • 二进制可以做网站是吗成人技能培训机构
  • 广州有什么好玩的地方免费的友链对网站seo有帮助吗
  • 如何用网站做淘客n127网推广
  • 电子商务网站建设程序应用题厦门人才网招聘
  • 网站服务器租用价格 贴吧链网
  • 未来做哪些网站致富电子商务营销模式有哪些
  • 网站域名如何实名认证免费seo快速排名工具
  • 水墨风logo一键制作seo网络推广案例
  • 桂林做旅游网站失败的网站seo网站推广助理
  • 怎样做家普网站建设企业营销型网站
  • 在网上做翻译的网站整合网络营销公司
  • html网页设计作品及其赏析外贸谷歌seo
  • 黄村做网站哪家快中国最大的企业培训公司
  • 河北住房与城乡建设厅网站一个免费的网站