MapView

A View containing a Google Map.

Examples

A map with markes bound to a list of objects and circles bound to a list as well.
<MapView width="fill_parent" height="fill_parent" markerItems="#{markers}"
	circleItems="#{markers}"
	latitude="#{?location.latitude}"
	longitude="#{?location.longitude}"
	zoomLevel="#{zoomLevel}"
	zoomControlsEnabled="true"
	animationDurationMs="2000"
	zoomGesturesEnabled="true"
	animate="true">
	<MarkerTemplate longitude="#{item.longitude}" title="#{item.title}"
		latitude="#{item.latitude}" />
	<CircleTemplate if="#{item.title  != empty}"
		longitude="#{item.longitude}" fillColor="#3f00" strokeColor="red"
		latitude="#{item.latitude}" radius="300" />
	<CircleTemplate longitude="#{item.longitude}"
		fillColor="#30f0" strokeColor="green" latitude="#{item.latitude}"
		radius="30000" zIndex="2" />
</MapView>

Children

Optional MarkerTemplates and/or CircleTemplates - see below.

MapView Attributes

Name Type Default Binding Description

Inherits all attributes from View and adds the following attributes:

latitude

latitudeType

Latitude of the center center position of the map.

longitude

longitudeType

Longitude of the center position of the map.

zoomLevel

unsigned float

A value between 2.0 and 21.0.

mapType

enum

normal

One of normal, satellite, terrain or hybrid.

compassEnabled

boolean

Toggles the compass overlay.

locationButtonEnabled

boolean

Toggles the location button overlay.

rotateGesturesEnabled

boolean

true

Toggles the the rotate gesture detection.

scrollGesturesEnabled

boolean

true

Toggles the the scroll gesture detection.

tiltGesturesEnabled

boolean

true

Toggles the the tilt gesture detection.

zoomControlsEnabled

boolean

false

Toggles the zoom control overlay.

zoomGesturesEnabled

boolean

true

Toggles the the zoom gesture detection.

animationDurationMs

unsigned int

0

Duration of all animations - bind this property to modify all following animations

cameraBearing

degreesType

0

Direction that the camera is pointing in, in degrees clockwise from north.

cameraTilt

degreesType

90

The angle, in degrees, of the camera angle from the nadir (directly facing the Earth).

animate

boolean

true

Toggles animation for all camera changes.

buildingsEnabled

boolean

false

Turns the 3D buildings layer on or off. Note: Buildings are only visible in high zoom levels.

indoorEnabled

boolean

false

Sets whether indoor maps should be enabled. Currently, indoor maps can only be shown on one map at a time and by default, this is the first map added to your application. To enable indoor maps on another map, you must first disable indoor maps on the original map. If you try to enable indoor maps when it is enabled on another map, nothing will happen.

trafficEnabled

boolean

false

markerItems

expression

Binding for the markers to display on the map.

circleItems

expression

Binding for the circles to display on the map.

MapTemplateType Attributes

This type is an abstract super type for MarkerTemplate and CircleTemplate which are described below.

Name Type Default Binding Description

if

expression

An expression to determine, whether this template should be applied to a given item.

latitude

latitudeType

The latitude of the element on the map.

longitude

longitudeType

The longitude of the element on the map.

visible

boolean

Toggles visibility of the element on the map.

zIndex

unsigned int

Sets the zIndex. Overlays (such as circles) with higher zIndices are drawn above those with lower indices.

onClick

expression

Action binding for the click event.

MarkerTemplate Attributes

Name Type Default Binding Description

Inherits all attributes from MapTemplateType and adds the following attributes:

alpha

expression

1.0

Sets the alpha (opacity) of the marker. This is a value from 0 to 1, where 0 means the marker is completely transparent and 1 means the marker is completely opaque.

flat

latitudeType

Sets whether this marker should be flat against the map true or a billboard facing the camera false.

rotation

longitudeType

Sets the rotation of the marker in degrees clockwise about the marker’s anchor point.

snippet

string

The snippet text that is shown, when the marker is selected.

title

string

The title text that is shown when the marker is selected.

CircleTemplate Attributes

Name Type Default Binding Description

Inherits all attributes from MapTemplateType and adds the following attributes:

radius

unsigned double

Radius in meters (reproduction scale will be applied automatically).

flat

boolean

Sets whether this marker should be flat against the map true or a billboard facing the camera false.

rotation

degreesType

Sets the rotation of the marker in degrees clockwise about the marker’s anchor point.

snippet

string

The snippet text that is shown, when the marker is selected.

title

string

The title text that is shown when the marker is selected.


Parts of this documentation are a derivate of the Android Developer Documentation by Google used under CC-BY-2.5.

results matching ""

    No results matching ""