多应用+插件架构,代码干净,二开方便,首家独创一键云编译技术,文档视频完善,免费商用码云13.8K 广告
[TOC] # 微信小程序 ## map.js ``` Page({ /** * 页面的初始数据 */ data: { longitude: 114.333649, latitude: 30.537094, circles:[{ longitude: 114.333649, latitude: 30.537094, fillColor:"#8DE25066", radius: 30, }], markers:[{ iconPath:"/images/icon/map1.png", longitude: 114.333649, latitude: 30.537094, width:60, height:60, title: "极客营公司", id:0, label:{ content:"极客营", color:"#ee5e78", borderWidth:1, borderColor:"#ee5e78", borderRadius:5, padding:5, }, callout:{ content:"极客营公司", color:"#ee5e7b", borderWidth: 1, borderColor: "#ee5e78", borderRadius: 5, padding: 5, } }] , }, marker(){ } }) ``` ## map.wxml ``` <map id='map' markers="{{markers}}" longitude="{{longitude}}" latitude="{{latitude}}" scale="25" show-location="{{true}}" bindmarkertap="marker" circles="{{circles}}"></map> ``` ## map.wxss ``` page{ height: 100%; } #map{ width: 100%; height: 100%; } ```