#### map
地图组件。
Map component.
地图组件用于展示地图,而定位API只是获取坐标,请勿混淆两者。
Map components are used to display the map, while positioning API is just to get the coordinates. Pay attention not to mixing them up.
**平台差异说明**
**Platform difference description**
|App|H5|微信小程序|支付宝小程序|百度小程序|字节跳动小程序、飞书小程序|QQ小程序|快应用|360小程序|快手小程序|京东小程序|
|App|H5|WeChat applet|Alipay applet|Baidu applet|ByteDance applet, Feishu applet|QQ applet|Quick application|360 applet|Kuishou applet|JD applet|
|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|:-:|
|√|√|√|√|√|1.63+|1.9.0+|√|x|x|√|
**地图服务商说明**
**Map Service Provider Description**
|地图服务商|App|H5|微信小程序|
|Map Service Provider|App|H5|WeChat Mini Program|
|:-:|:-:|:-:|:-:|
|高德|√|||
|Goolge|3.4+|3.2.10+||
|腾讯||√|√|
|Tencent||√|√|
**属性说明**
**Attribute description**
|属性名|类型|默认值|说明|平台差异说明|
| Attribute name| Type| Defaults| Instruction| Platform difference description|
|:-|:-|:-|:-|:-|
|longitude|Number||中心经度||
| longitude| Number| | Center longitude| |
|latitude|Number||中心纬度||
| latitude| Number| | Center latitude| |
|scale|Number|16|缩放级别,取值范围为3-20|高德地图缩放比例与微信小程序不同|
|scale|Number|16|Zoom level, the value range is 3-20|The zoom ratio of the AutoNavi map is different from that of the WeChat applet|
|theme|String|normal|主题(satellite 或 normal)只在初始化时有效,不能动态变更(仅Android支持)|京东小程序|
|theme|String|normal|Theme (satellite or normal) is only valid during initialization and cannot be changed dynamically (only supported by Android)|JD Mini Program|
|min-scale|Number|3|最小缩放级别|App-nvue 3.1.0+、微信小程序2.13+|
|min-scale|Number|3|Minimum zoom level|App-nvue 3.1.0+, WeChat applet 2.13+|
|max-scale|Number|20|最大缩放级别|App-nvue 3.1.0+、微信小程序2.13+|
|max-scale|Number|20|Maximum zoom level|App-nvue 3.1.0+, WeChat applet 2.13+|
|layer-style|Number/String|1|个性化地图|App-nvue 3.1.0+、微信小程序2.13+|
|layer-style|Number/String|1|Personalized map|App-nvue 3.1.0+, WeChat applet 2.13+|
|markers|Array||标记点||
| markers| Array| | Mark point| |
|polyline|Array||路线|飞书小程序不支持|
|polyline|Array||Route|Feishu applet does not support|
|circles|Array||圆||
| circles| Array| | Circle| |
|controls|Array||控件||
| controls| Array| | Control| |
|include-points|Array||缩放视野以包含所有给定的坐标点|App-nvue 2.1.5+、微信小程序、H5、百度小程序、支付宝小程序、京东小程序|
|include-points|Array||Zooms the field of view to include all given coordinate points|App-nvue 2.1.5+, WeChat applet, H5, Baidu applet, Alipay applet, Jingdong applet|
|enable-3D|Boolean|false|是否显示3D楼块|App-nvue 2.1.5+、微信小程序2.3.0|
|enable-3D|Boolean|false|Whether to display 3D building blocks|App-nvue 2.1.5+, WeChat applet 2.3.0|
|show-compass|Boolean|false|是否显示指南针|App-nvue 2.1.5+、微信小程序2.3.0|
|show-compass|Boolean|false|Whether to show the compass|App-nvue 2.1.5+, WeChat applet 2.3.0|
|enable-zoom|Boolean|true|是否支持缩放|App-nvue 2.1.5+、微信小程序2.3.0|
|enable-zoom|Boolean|true|Whether to support zoom|App-nvue 2.1.5+, WeChat applet 2.3.0|
|enable-scroll|Boolean|true|是否支持拖动|App-nvue 2.1.5+、微信小程序2.3.0|
|enable-scroll|Boolean|true|Whether to support dragging|App-nvue 2.1.5+, WeChat applet 2.3.0|
|enable-rotate|Boolean|false|是否支持旋转|App-nvue 2.1.5+、微信小程序2.3.0|
|enable-rotate|Boolean|false|Whether to support rotation|App-nvue 2.1.5+, WeChat applet 2.3.0|
|enable-overlooking|Boolean|false|是否开启俯视|App-nvue 2.1.5+、微信小程序2.3.0|
|enable-overlooking|Boolean|false|Whether to enable Overlooking|App-nvue 2.1.5+, WeChat Mini Program 2.3.0|
|enable-satellite|Boolean|false|是否开启卫星图|App-nvue 2.1.5+、微信小程序2.7.0|
|enable-satellite|Boolean|false|Whether to enable satellite images|App-nvue 2.1.5+, WeChat applet 2.7.0|
|enable-traffic|Boolean|false|是否开启实时路况|App-nvue 2.1.5+、微信小程序2.7.0|
|enable-traffic|Boolean|false|Whether to enable real-time traffic conditions|App-nvue 2.1.5+, WeChat applet 2.7.0|
|enable-poi|Boolean|false|是否展示 POI 点|App-nvue 3.1.0+|
| enable-poi| Boolean| false| Whether to show POI points| App-nvue 3.1.0+|
|enable-building|Boolean|false|是否展示建筑物|App-nvue 3.1.0+ 支持 (**废除原enable-3D属性 高德地图默认开启建筑物就是3D无法设置**)|
| enable-building| Boolean| false| Whether to display the building?| App-nvue 3.1.0+ is supported (**Abolish the original enable-3D attribute. The default open building of AutoNavi is that 3D cannot be set**)|
|show-location|Boolean||显示带有方向的当前定位点|微信小程序、H5、百度小程序、支付宝小程序、京东小程序|
|show-location|Boolean||Show the current location point with direction|WeChat applet, H5, Baidu applet, Alipay applet, Jingdong applet|
|polygons|Array.``||多边形|App-nvue 2.1.5+、App-vue 3.4.3+、H5 3.4.3+、微信小程序、百度小程序、支付宝小程序|
|polygons|Array.``||Polygon|App-nvue 2.1.5+, App-vue 3.4.3+, H5 3.4.3+, WeChat applet, Baidu applet, Alipay applet|
|enable-indoorMap|Boolean|false|是否展示室内地图|App-nvue 3.1.0+|
| enable-indoorMap| Boolean| false| Whether to display the indoor map?| App-nvue 3.1.0+|
|@markertap|EventHandle||点击标记点时触发,e.detail = {markerId}|App-nvue 2.3.3+、H5、微信小程序、支付宝小程序 (App和H5平台需要指定 marker 对象属性 id)|
|@markertap|EventHandle||Triggered when a marker is clicked, e.detail = {markerId}|App-nvue 2.3.3+, H5, WeChat applet, Alipay applet (App and H5 platforms need to specify the marker object attribute id) |
|@labeltap|EventHandle||点击label时触发,e.detail = {markerId} |微信小程序2.9.0|
|@labeltap|EventHandle||Triggered when the label is clicked, e.detail = {markerId} |WeChat applet 2.9.0|
|@callouttap|EventHandle||点击标记点对应的气泡时触发,e.detail = {markerId}||
| @callouttap| EventHandle| | Triggered when click on the bubble according to the marker, e.detail = {markerId}| |
|@controltap|EventHandle||点击控件时触发,e.detail = {controlId}||
| @controltap| EventHandle| | Triggered when click on the control, e.detail = {controlId}| |
|@regionchange|EventHandle||视野发生变化时触发|微信小程序、H5、百度小程序、支付宝小程序、京东小程序|
|@regionchange|EventHandle||Triggered when the field of view changes|WeChat applet, H5, Baidu applet, Alipay applet, Jingdong applet|
|@tap|EventHandle||点击地图时触发; App-nvue、微信小程序2.9支持返回经纬度||
|@tap|EventHandle||Triggered when the map is clicked; App-nvue, WeChat applet 2.9 support returning latitude and longitude||
|@updated|EventHandle||在地图渲染更新完成时触发|微信小程序、H5、百度小程序|
|@updated|EventHandle||Triggered when the map rendering update is completed|WeChat applet, H5, Baidu applet|
|@anchorpointtap|EventHandle||点击定位标时触发,e.detail = {longitude, latitude}|App-nvue 3.1.0+、微信小程序2.13+|
|@anchorpointtap|EventHandle||Triggered when the anchor is clicked, e.detail = {longitude, latitude}|App-nvue 3.1.0+, WeChat applet 2.13+|
|@poitap|EventHandle||点击地图poi点时触发,e.detail = {name, longitude, latitude}|微信小程序2.3.0+|
|@poitap|EventHandle||Triggered when the map poi point is clicked, e.detail = {name, longitude, latitude}|WeChat applet 2.3.0+|
**注意**
**Notice**
- `