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

map view can't zoom to click pin

$
0
0

Hello I've problem , when i click on a ping on the map its not zooming to clicked pin

any advice ?

var mapview = Titanium.Map.createView({mapType: Titanium.Map.STANDARD_TYPE,
                                                   region: {latitude:25.7602295, longitude:44.8881224,
                                                   latitudeDelta:0.1, longitudeDelta: 13},
                                                   animate:true,
                                                   regionFit:false,
                                                   userLocation:false,
                                                   enableZoomControls: false,
                                                  //focusable : false,
                                                   annotations: annotations
                                                    });
 
 
 exports.views.mapview  = mapview;
  exports.views.parent.add(exports.views.mapview);
 
 
  // Handle click events on any annotations on this map.
  mapview.addEventListener('click', function(evt) {
    Ti.API.info("Annotation " + evt.title + " clicked, id: " + evt.annotation.myid);
 
       var region ={
        latitude: evt.annotation.latitude,
        longitude: evt.annotation.longitude,
        latitudeDelta : 0.05,
        longitudeDelta: 0.05,
        regionFit: true,
        animate: true,
    };
 
       mapview.setLocation(region);
 
 
  });

Viewing all articles
Browse latest Browse all 8068

Trending Articles



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