threeve threeve - 11 months ago 80
iOS Question

Appcelerator Titanium Map View - Show Annotation Title By Default

I have a map view:

<View id='map' class='smallMap' module='' />

I set it up:

latitude: r.y,
longitude: r.x,
latitudeDelta: 0.1,
longitudeDelta: 0.1

I add an annotation:

var annotation = mapModule.createAnnotation({
latitude: x,
longitude: y,
title: location.street,

The latest docs say this:

An annotation has two states: selected and deselected. A deselected annotation is marked by a pin image. When the user selects the pin, the full annotation is displayed.

Is there a way to cause the default state of the annotation to be selected, or to select it without user interaction. Using
was a bust. Must I overlay a custom view onto the map?

Answer Source

You can use the selectAnnotation method, example: