## map.xxx 該map和前面介紹的地圖一致
[02.地圖](https://www.kancloud.cn/lixu/wechat_mp/790217)
### map.wxml
```
<!--pages/index/index.wxml-->
<map id="map" longitude="{{longitude}}" latitude="{{latitude}}" scale="25" markers="{{markers}}" circles='{{circles}}' bindmarkertap='marker'></map>
```
### map.wxss
```
image{
width: 100%;
}
page{
height: 100%;
}
#map{
width: 100%;
height: 100%;
}
```
### map.js
```
// pages/index/index.js
Page({
onLoad(){
wx.showLoading({
title:"加载中..."
})
wx.hideLoading();
wx.setNavigationBarTitle({
title:'地图'
});
},
data: {
latitude: 30.591110,
longitude: 114.365920,
circles: [{
latitude: 30.591110,
longitude: 114.365920,
fillColor: "#12345699",
radius: 30
}],
markers: [{
iconPath: "/images/地图.png",
latitude: 30.591110,
longitude: 114.365920,
width: 30,
height: 30,
id: 0,
title: "爱家国际华城",
label: {
content: "爱家国际华城",
color: "#ee5e7b",
borderWidth: 2,
borderColor: "#ee5e7b",
borderRadius: 5,
padding: 5,
},
callout: {
content: "地址:湖北省武汉市洪山区团结大道1026",
color: "#ee5e7b",
bgColor: "#fff",
borderWidth: 2,
borderColor: "#ee5e7b",
borderRadius: 5,
padding: 5,
}
}]
},
marker() {
}
})
```
- 项目启动配置
- 01.欢迎页
- 03.点击图片切换——事件绑定bindtap、catchtap
- 04.底方分页切换tabBar
- 20.音乐播放
- 06.豆瓣电影列表
- 1.App
- 2.template
- 3.movies-detail 页面详情
- 组件
- 02.地图
- 05.轮播图swiper
- 07.点击预览图片previewImage结合scroll-view
- 11.web-page
- 14.form表单
- 08.头像图片更换chooseImage
- 09.上拉刷新OnReachBottom
- 10.使用缓存(收藏、分享状态)
- 12.导航条加载、页面加载、导航标题设置
- 13.弹出框
- 15.demo
- data
- local.js
- pages
- welcome(欢迎页)
- index
- index.wxml
- index.wxss
- index.js
- index-detail
- index-detail.wxml
- index-detail.wxss
- index-detail.js
- template
- yuedu-list.wxml
- yuedu-list.wxss
- map
- movies
- movies.wxml
- movies.wxss
- movies.js
- movies-grid
- movies-grid-template.wxml
- movies-grid-template.wxss
- movies-item
- movies-item-template.wxml
- movies-item-template.wxss
- movies-more
- movies-more.wxml
- movies-more.wxss
- movies-more.js
- movie-detail
- movie-detail.wxss
- movie-detail.wxml
- movie-detail.js
- star
- star-template.wxml
- star-template.wxss
- web-page
- web-page.wxml
- web-page.js
- post-img
- post-img.wxml
- post-img.js
- post-img.wxss
- 演员列表图
- 列表图.wxml
- 列表图.wxss
- 列表图.js
- utils
- utils.js
- app.js
- app.json
- app.wxss
- 16.事件冒泡
- 18.Tip
- 框架
- 17.模板
- 19.组件模板和样式(slot)
- component构造器
- 组件事件
- behaviors
- wxs
- HTTP封装
- models使用封装HTTP
- 更多有关promise封装的例子
- 生命周期
- 注意: