Skip to content

Commit

Permalink
Update map.md
Browse files Browse the repository at this point in the history
  • Loading branch information
wanganxp committed Oct 30, 2019
1 parent c2627bf commit 344b97d
Showing 1 changed file with 13 additions and 12 deletions.
25 changes: 13 additions & 12 deletions docs/component/map.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
|circles|Array||||
|controls|Array||控件||
|include-points|Array||缩放视野以包含所有给定的坐标点|App-nvue 2.1.5+、微信小程序、H5、百度小程序、支付宝小程序|
|show-location|Boolean||显示带有方向的当前定位点|微信小程序、H5、百度小程序、支付宝小程序|
|show-location|Boolean||显示带有方向的当前定位点|微信小程序、H5、百度小程序、支付宝小程序|
|polygons|Array.`<polygon>`||多边形|App-nvue 2.1.5+、微信小程序、百度小程序、支付宝小程序|
|@markertap|EventHandle||点击标记点时触发|App-nvue 2.3.3+, App平台需要指定 marker 对象属性 id|
|@callouttap|EventHandle||点击标记点对应的气泡时触发||
Expand Down Expand Up @@ -96,16 +96,17 @@
|arrowIconPath|更换箭头图标|String||在arrowLine为true时生效|App-nvue 2.1.5+、微信小程序、百度小程序|
|borderColor|线的边框颜色|String|||App-nvue 2.1.5+、微信小程序、H5、百度小程序|
|borderWidth|线的厚度|Number|||App-nvue 2.1.5+、微信小程序、H5、百度小程序|

**polygon**<br>
指定一系列坐标点,根据 points 坐标数据生成闭合多边形

属性|说明|类型|必填|备注:--|:--|:--|:--|:--|
points|经纬度数组|array|是|[{latitude: 0, longitude: 0}]
strokeWidth|描边的宽度|Number|否|
strokeColor|描边的颜色|String|否|十六进制|
fillColor|填充颜色|String|否|十六进制|
zIndex|设置多边形 Z 轴数值|Number|否|

**polygon**<br>
指定一系列坐标点,根据 points 坐标数据生成闭合多边形

属性|说明|类型|必填|备注
:--|:--|:--|:--|:--|
points|经纬度数组|array|是|[{latitude: 0, longitude: 0}]
strokeWidth|描边的宽度|Number|否|
strokeColor|描边的颜色|String|否|十六进制|
fillColor|填充颜色|String|否|十六进制|
zIndex|设置多边形 Z 轴数值|Number|否|

**circles**

Expand Down Expand Up @@ -191,7 +192,7 @@ map 组件相关操作的 JS API:[uni.createMapContext](api/location/map?id=cr
- 小程序和 app-vue 中,css 动画对 `<map>` 组件无效。
- map 组件使用的经纬度是国测局坐标,调用 uni.getLocation 接口需要指定 type 为 gcj02。
- `<map>` 组件在不同平台的底层引擎是不同的:H5、微信小程序为腾讯地图;App、支付宝小程序为高德地图;百度小程序端为百度地图。app-vue也可以使用百度地图,在manifest中配置,但app-nvue只支持高德地图。
- map 组件默认的api是参考微信小程序的,如需要使用plus.map,可以通过`$getAppMap`获取原生地图对象,[详见](https://uniapp.dcloud.io/api/location/map)
- map 组件默认的api是参考微信小程序的,如需要使用plus.map,可以通过`$getAppMap`获取原生地图对象,[详见](https://uniapp.dcloud.io/api/location/map)。注意nvue的map组件不是plus.map对象,无法使用`$getAppMap`
- H5 端获取定位信息,需要部署在 **https** 服务上,本地预览(localhost)仍然可以使用 http 协议。
- 无 GPS 模块的 PC 设备使用 Chrome 浏览器的时候,位置信息是连接谷歌服务器获取的,国内用户可能获取位置信息失败。
- App 端使用地图组件需要向高德或百度等三方服务商申请SDK资质,获取AppKey,打包时需要在manifest文件中勾选相应模块,在SDK配置中填写Appkey。注意申请包名和打包时的包名需匹配一致。在manifest可视化界面有详细申请指南。
Expand Down

0 comments on commit 344b97d

Please sign in to comment.