| Platform | Since |
|---|---|
| Android | 0.8 |
| iPhone | 0.8 |
| iPad | 0.8 |
Map view is used for embedding native mapping capabilities as a view in your application.
With native maps, you can control the mapping location, the type of map, the zoom level
and you can add custom annotations directly to the map. Use the Titanium.Map.createView
method to create a map view.
For Android, you will need to obtain a map key from Google to use maps in your application.
On iPhone, you cannot call any methods on a map view until it has been added to a view.
| Name | Summary |
|---|---|
| add |
Adds a child to this view's hierarchy. |
| addAnnotation |
add a new annotation to the map |
| addAnnotations |
add one or more new annotation to the map |
| addEventListener |
Adds the specified callback as an event listener for the named event. |
| addRoute |
add a route. currently only supported on iphone |
| animate |
Animates this view. |
| convertPointToView |
Translates a point from this view's coordinate system to another view's coordinate system. |
| deselectAnnotation |
cause the annotation to be deselected (hidden). |
| fireEvent |
Fires a synthesized event to any registered listeners. |
| getAnchorPoint |
Gets the value of the anchorPoint property. (iPhone, iPad only.) |
| getAnimate |
Gets the value of the animate property. |
| getAnimatedCenterPoint |
Gets the value of the animatedCenterPoint property. |
| getAnnotations |
Gets the value of the annotations property. |
| getBackgroundColor |
Gets the value of the backgroundColor property. |
| getBackgroundDisabledColor |
Gets the value of the backgroundDisabledColor property. (Android only.) |
| getBackgroundDisabledImage |
Gets the value of the backgroundDisabledImage property. (Android only.) |
| getBackgroundFocusedColor |
Gets the value of the backgroundFocusedColor property. (Android only.) |
| getBackgroundFocusedImage |
Gets the value of the backgroundFocusedImage property. (Android only.) |
| getBackgroundGradient |
Gets the value of the backgroundGradient property. |
| getBackgroundImage |
Gets the value of the backgroundImage property. |
| getBackgroundLeftCap |
Gets the value of the backgroundLeftCap property. (iPhone, iPad only.) |
| getBackgroundSelectedColor |
Gets the value of the backgroundSelectedColor property. (Android, Mobile Web only.) |
| getBackgroundSelectedImage |
Gets the value of the backgroundSelectedImage property. (Android, Mobile Web only.) |
| getBackgroundTopCap |
Gets the value of the backgroundTopCap property. (iPhone, iPad only.) |
| getBorderColor |
Gets the value of the borderColor property. |
| getBorderRadius |
Gets the value of the borderRadius property. |
| getBorderWidth |
Gets the value of the borderWidth property. |
| getBottom |
Gets the value of the bottom property. |
| getCenter |
Gets the value of the center property. |
| getFocusable |
Gets the value of the focusable property. (Android only.) |
| getHeight |
Gets the value of the height property. |
| getKeepScreenOn |
Gets the value of the keepScreenOn property. (Android only.) |
| getLayout |
Gets the value of the layout property. |
| getLeft |
Gets the value of the left property. |
| getMapType |
Gets the value of the mapType property. |
| getOpacity |
Gets the value of the opacity property. |
| getRegion |
Gets the value of the region property. |
| getRegionFit |
Gets the value of the regionFit property. |
| getRight |
Gets the value of the right property. |
| getSize |
Gets the value of the size property. |
| getSoftKeyboardOnFocus |
Gets the value of the softKeyboardOnFocus property. (Android only.) |
| getTop |
Gets the value of the top property. |
| getTouchEnabled |
Gets the value of the touchEnabled property. |
| getTransform |
Gets the value of the transform property. |
| getUserLocation |
Gets the value of the userLocation property. |
| getVisible |
Gets the value of the visible property. |
| getWidth |
Gets the value of the width property. |
| getZIndex |
Gets the value of the zIndex property. |
| hide |
Hides this view. |
| remove |
Removes a child view from this view's hierarchy. |
| removeAllAnnotations |
removes all annotations added to the map |
| removeAnnotation |
remove an existing annotation from the map |
| removeAnnotations |
remove one or more existing annotations from the map |
| removeEventListener |
Removes the specified callback as an event listener for the named event. |
| removeRoute |
remove a previously added route. currently only supported on iphone |
| selectAnnotation |
cause the annotation to be selected (shown). |
| setAnchorPoint |
Sets the value of the anchorPoint property. (iPhone, iPad only.) |
| setAnimate |
Sets the value of the animate property. |
| setAnnotations |
Sets the value of the annotations property. |
| setBackgroundColor |
Sets the value of the backgroundColor property. |
| setBackgroundDisabledColor |
Sets the value of the backgroundDisabledColor property. (Android only.) |
| setBackgroundDisabledImage |
Sets the value of the backgroundDisabledImage property. (Android only.) |
| setBackgroundFocusedColor |
Sets the value of the backgroundFocusedColor property. (Android only.) |
| setBackgroundFocusedImage |
Sets the value of the backgroundFocusedImage property. (Android only.) |
| setBackgroundGradient |
Sets the value of the backgroundGradient property. |
| setBackgroundImage |
Sets the value of the backgroundImage property. |
| setBackgroundLeftCap |
Sets the value of the backgroundLeftCap property. (iPhone, iPad only.) |
| setBackgroundSelectedColor |
Sets the value of the backgroundSelectedColor property. (Android, Mobile Web only.) |
| setBackgroundSelectedImage |
Sets the value of the backgroundSelectedImage property. (Android, Mobile Web only.) |
| setBackgroundTopCap |
Sets the value of the backgroundTopCap property. (iPhone, iPad only.) |
| setBorderColor |
Sets the value of the borderColor property. |
| setBorderRadius |
Sets the value of the borderRadius property. |
| setBorderWidth |
Sets the value of the borderWidth property. |
| setBottom |
Sets the value of the bottom property. |
| setCenter |
Sets the value of the center property. |
| setFocusable |
Sets the value of the focusable property. (Android only.) |
| setHeight |
Sets the value of the height property. |
| setKeepScreenOn |
Sets the value of the keepScreenOn property. (Android only.) |
| setLayout |
Sets the value of the layout property. |
| setLeft |
Sets the value of the left property. |
| setLocation |
set and center the map location. |
| setMapType |
set the type of map (satellite, hybrid, standard) |
| setOpacity |
Sets the value of the opacity property. |
| setRegion |
Sets the value of the region property. |
| setRegionFit |
Sets the value of the regionFit property. |
| setRight |
Sets the value of the right property. |
| setSize |
Sets the value of the size property. |
| setSoftKeyboardOnFocus |
Sets the value of the softKeyboardOnFocus property. (Android only.) |
| setTop |
Sets the value of the top property. |
| setTouchEnabled |
Sets the value of the touchEnabled property. |
| setTransform |
Sets the value of the transform property. |
| setUserLocation |
Sets the value of the userLocation property. |
| setVisible |
Sets the value of the visible property. |
| setWidth |
Sets the value of the width property. |
| setZIndex |
Sets the value of the zIndex property. |
| show |
Makes this view visible. |
| toImage |
Returns an image of the rendered view, as a Blob. |
| zoom |
zoom in or out of the map |
| Name | Type | Summary |
|---|---|---|
| anchorPoint | Point |
Anchor point where animation should occur, relative to the view's boundaries. (iPhone, iPad only.) |
| animate | Boolean |
boolean is mapping actions should be animated |
| animatedCenterPoint | Point |
Current position of the view during an animation. read-only |
| annotations | Array<Object> |
an array of annotations to add to the map |
| backgroundColor | String |
Background color of the view. |
| backgroundDisabledColor | String |
Disabled background color of the view. (Android only.) |
| backgroundDisabledImage | String |
Disabled background image for the view, specified as a local file path or URL. (Android only.) |
| backgroundFocusedColor | String |
Focused background color of the view. (Android only.) |
| backgroundFocusedImage | String |
Focused background image for the view, specified as a local file path or URL. (Android only.) |
| backgroundGradient | Gradient |
A background gradient for the view. |
| backgroundImage | String |
Background image for the view, specified as a local file path or URL. |
| backgroundLeftCap | Number |
Size of the left end cap. (iPhone, iPad only.) |
| backgroundSelectedColor | String |
Selected background color of the view. (Android, Mobile Web only.) |
| backgroundSelectedImage | String |
Selected background image url for the view, specified as a local file path or URL. (Android, Mobile Web only.) |
| backgroundTopCap | Number |
Size of the top end cap. (iPhone, iPad only.) |
| borderColor | String |
Border color of the view. |
| borderRadius | Number |
Border radius of the view. |
| borderWidth | Number |
Border width of the view. |
| bottom | Number or String |
View's bottom position, in platform-specific units. |
| center | Point |
View's center position, in the parent view's coordinates. |
| focusable | Boolean |
Whether view should be focusable while navigating with the trackball. (Android only.) |
| height | Number or String |
View height, in platform-specific units. |
| keepScreenOn | Boolean |
Whether to keep the device screen on. (Android only.) |
| layout | String |
Specifies how the view positions its children. One of: 'absolute', 'vertical', or 'horizontal'. |
| left | Number or String |
View's left position, in platform-specific units. |
| mapType | Number |
the map type constant of either |
| opacity | Number |
Opacity of this view, from 0.0 (transparent) to 1.0 (opaque). |
| region | Object |
a dictionary that specifies the following properties specifying the region location to set the map: |
| regionFit | Boolean |
boolean to indicate if the map should attempt to fit the map view into the region in the visible view |
| right | Number or String |
View's right position, in platform-specific units. |
| size | Object |
Size of the view as a dictionary of width and height properties. |
| softKeyboardOnFocus | Number |
Determines keyboard behavior when this view is focused. (Android only.) |
| top | Number or String |
The view's top position. |
| touchEnabled | Boolean |
Whether view should receive touch events. |
| transform | Titanium.UI.2DMatrix or Titanium.UI.iOS.3DMatrix |
Transformation matrix to apply to the view. |
| userLocation | Boolean |
boolean to indicate if the map should show the user's current device location as a pin on the map |
| visible | Boolean |
Boolean value indicating whether the view is visible. |
| width | Number or String |
View's width, in platform-specific units. |
| zIndex | Number |
Z index position relative to other sibling views. |
| Name | Summary |
|---|---|
| click |
fired when the device detects a click (longer than touch) against the view |
| complete |
fired when the map completes loading |
| dblclick |
Fired when the device detects a double click against the view. |
| doubletap |
Fired when the device detects a double tap against the view. |
| error |
fired when the map receives a mapping error |
| loading |
fired when the map begins loading |
| longclick |
Fired when the device detects a long click. (Android only.) |
| longpress |
Fired when the device detects a long press. |
| pinch |
Fired when the device detects a pinch gesture. |
| regionChanged |
fired when the mapping region changes |
| singletap |
Fired when the device detects a single tap against the view. |
| swipe |
Fired when the device detects a swipe gesture (left or right) against the view. |
| touchcancel |
Fired when a touch event is interrupted by the device. |
| touchend |
Fired when a touch event is completed. |
| touchmove |
Fired as soon as the device detects movement of a touch. |
| touchstart |
Fired as soon as the device detects a touch gesture. |
| twofingertap |
Fired when the device detects a two-finger tap against the view. |