Titanium Community Questions & Answer Archive

We felt that 6+ years of knowledge should not die so this is the Titanium Community Questions & Answer Archive

Map Annotations

Hi

Basically I am wanting the annotation information to display as soon as the pin lands on the map, instead of the user having to click on the pin to display it.

Can anyone shed any light on this?

Cheers
Jamesy

— asked June 8th 2010 by Richard James
  • annotation
  • geolocation
  • mapview
0 Comments

1 Answer

  • This does it for me.

    var mapview = Titanium.Map.createView({
        mapType: Titanium.Map.STANDARD_TYPE,
        region: {latitude:msg.fieldByName('lat'), longitude:msg.fieldByName('lon'), latitudeDelta:0.06, longitudeDelta:0.06},
        animate:true,
        regionFit:true,
        userLocation:true,
        annotations:[id07]// this is my createAnnotation reference
    });
    
    win.add(mapview);
    
    
    setTimeout(function(){
            mapview.selectAnnotation(mapview.annotations[0].title,true);
        },1500);
    
    — answered June 22nd 2010 by Mark Pierce
    permalink
    1 Comment
    • Can't get mapview.selectAnnotation function to do anything in Titanium 1.2.1. Has anybody been able to programmatically display a pin's info window?

      — commented December 9th 2010 by Simon Phoenix
The ownership of individual contributions to this community generated content is retained by the authors of their contributions.
All trademarks remain the property of the respective owner.