Map组件属性说明:BoundingBox地图的边界
Sets or gets the current boundary for the map’s drawn view. The value is a list of lists containing the northwest and southeast coordinates of the current view in the form ((North West) (South East)).
设置或获取地图的边界,值是一个包含了西北和东南坐标的嵌套列表,格式为((北西)(南东))
CenterFromString地图中心
Set the initial center coordinate of the map. The value is specified as a comma-separated pair of decimal latitude and longitude coordinates, for example, 42.359144, -71.093612.
In blocks code, it is recommended for performance reasons to use
PanTo with numerical latitude and longitude rather than convert to the string representation for use with this property.
设置显示在手机屏幕上的地图中心的坐标。值是一对由逗号分隔的十进制坐标,如42.359144, -71.093612,注意纬度在前,经度在后。
在逻辑设计中,如果需要对地图进行平衡,推荐使用数值型的坐标而非转换成字符串的坐标。
EnablePan允许平移地图
Enables or disables the ability of the user to move the Map.
EnableRotation允许旋转地图
Enables or disables the two-finger rotation gesture to rotate the Map.
允许/禁止使用两个手指的手势来旋转地图
EnableZoom允许缩放
Enables or disables the two-finger pinch gesture to zoom the Map.
Features地图特征
Gets the list of features attached to the Map (without regard to the value of the feature’s Visible property). This list also includes any features created on the Map by calls to
FeatureFromDescription.
获取地图特征列表(地图特征即map,marker,circle等)
Height地图组件的高度
Specifies the Map’s vertical height, measured in pixels.
HeightPercent地图组件的百分比
Specifies the Map’s vertical height as a percentage of the
Screen’s Height.
Latitude地图中心点的纬度
Gets the latitude of the center of the Map. To change the latitude, use the
PanTo method.
获取地图中心点的纬度。可以使用Pan平移方法来改变纬度。
LocationSensor位置传感器
Uses the provided
LocationSensor for user location data rather than the built-in location provider.
如果要获取用户位置数据,使用手机的位置传感器效果要优于内置的位置提供者。
Longitude地图中心点的经度
Gets the longitude of the center of the Map. To change the longitude, use the
PanTo method.
获取地图中心点的经度。可以使用Pan平移方法来改变经度。
MapType地图类型
Sets or gets the tile layer used to draw the Map background. Defaults to Roads. Valid values are:
RoadsAerialTerrain
Note: Road layers are provided by OpenStreetMap and aerial and terrain layers are provided by the U.S. Geological Survey.
Rotation旋转
Specifies the rotation of the map in decimal degrees, if any.
ScaleUnits标尺单位(公制或英制)
Specifies the units used for the scale overlay. 1 (the default) will give metric units (km, m) whereas 2 will give imperial units (mi, ft).
ShowCompass显示罗盘
Specifies whether to a compass overlay on the Map. The compass will be rotated based on the device’s orientation if a digital compass is present in hardware.
ShowScale显示标尺
Shows a scale reference on the map.
ShowUser显示用户(小人)
Shows or hides an icon indicating the user’s current location on the
Map. The availability and accuracy of this feature will depend on whether the user has location services enabled and which location providers are available.
显示/隐藏地图上当前位置的用户图标。这个功能和位置精度取决于用户是否允许开启位置服务以及可能的位置服务商是谁。
ShowZoom显示缩放按钮(+/-+)
Specifies whether to show zoom controls or not.
UserLatitude用户纬度
Returns the user’s latitude if ShowUser is enabled.
如果显示用户是启用的话,返回用户的纬度
UserLongitude用户经度
Returns the user’s longitude if ShowUser is enabled.
如果显示用户是启用的话,返回用户的经度
Visible可见性
Specifies whether the Map should be visible on the screen. Value is true if the Map is showing and false if hidden.
Width地图组件的显示宽度
Specifies the horizontal width of the Map, measured in pixels.
WidthPercent地图组件的显示百分比
Specifies the horizontal width of the Map as a percentage of the
Screen’s Width.
ZoomLevel缩放级别
Specifies the zoom level of the map. Valid values of ZoomLevel are dependent on the tile provider and the latitude and longitude of the map. For example, zoom levels are more constrained over oceans than dense city centers to conserve space for storing tiles, so valid values may be 1-7 over ocean and 1-20 over cities. Tile providers may send warning or error tiles if the zoom level is too great for the server to support.
指定地图的缩放级别。 ZoomLevel 的有效值取决于图块提供者以及地图的纬度和经度。 例如,海洋的缩放级别比密集的城市中心更受限制,以节省存储图块的空间,因此海洋的 ZoomLevel有效值可能是 1-7,城市的ZoomLevel有效值 为 1-20。 如果缩放级别太大而服务器无法支持,则图块提供者可能会发送警告或显示错误的图块。