zIndex of annotations
Hi,
I have a map with a lot of annotations (locations of panoramio photos). Over all ist a helicopter annotation, its position is changed by event.
How can I realize the top position of this marker?
My code:
for (var i=0;i<datas.panoramio.length;i++) {
var p = datas.panoramio[i];
var a = Ti.Map.createAnnotation({
latitude : p.lat,longitude : p.lng,
image : './assets/map/p.png'
});
mapView.addAnnotation(a);
}
var heli= Ti.Map.createAnnotation({
latitude : datas.panoramio[ndx].lat,
longitude : datas.panoramio[ndx].lng,
image : '/assets/heli.png',
zIndex: 999
});
mapView.addAnnotation(heli);
And ofter changig ofheli position:
mapView.region={
latitude:datas.panoramio[lastndx].lat,
longitude:datas.panoramio[lastndx].lng,
latitudeDelta: 4.5,
longitudeDelta:4.5
};
mapView.removeAnnotation(heli);
heli.latitude = datas.panoramio[lastndx].lat;
heli.longitude = datas.panoramio[lastndx].lng;
mapView.addAnnotation(heli);
The heli is "under" the maker points. Is it possible the change the order?
Best regards from Hamburg
Rainer
PS: How can I change my photo on my profile page from avatar to my personal photo?
3 Answers
-
Could you provide more of an example of what your goal would look like?
As for the avatar, we use gravatar, so to update your avatar, you must se it at gravatar.com
-
Old question, but… any options here? I'm also trying to find a way to manage the z-index of annotations.
It looks like setting zIndex on the annotation itself isn't supported, and neither is setting a zIndex on a customView. Manipulating the order of the annotations in the array to be added doesn't seem to work either, which is kinda what I expected from reading the map view api docs.
-
Here is the full listing: http://pastie.org/2655407
My problem is only the zIndex of annotations.
Rainer