Quantcast
Channel: Appcelerator Developer Center Q&A Unanswered Questions 20
Viewing all articles
Browse latest Browse all 8068

SelectAnnotation on Android doesn't center pin

$
0
0

I have the code working where i can programmatically select an annotation on my map for ios/android. On iOS the code below actually triggers my pin click event and also centers the pin for me.

On android the click event doesn't occur and also the pin is not centered (however the pin does show the white pop up like you clicked it)

here is the code .. am i missing anything?

var Ann1 = Alloy.Globals.Map.createAnnotation({ latitude:mydata.results[i].lat, longitude:mydata.results[i].lng, title:mydata.results[i].name, animate:true, image:pinimage, myid:i, // CUSTOM ATTRIBUTE THAT IS PASSED INTO EVENT OBJECTS }); pins.push(Ann1); $.mapview.addAnnotation(Ann1);

.....then later on i have...

cardview.addEventListener("singletap",function(e) { 

        $.mapview.selectAnnotation(pins[e.source.myid]);

    });

Viewing all articles
Browse latest Browse all 8068

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>