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

Ti.Map View - Region Delta has no effect

$
0
0

Hello,

I'm using a mapView and I want much zoom but latitudeDelta and longitudeDelta haven't got effect. My location and an annotation are well painted but the zoom is ver low... I need the max zoom possible.

This is my code:

var longitude, latitude;
 
Titanium.Geolocation.getCurrentPosition(function(e) {
    if(!e.success || e.error) {
        Ti.API.info('error:' + JSON.stringify(e.error));
        return;
    }
 
    longitude = e.coords.longitude;
    latitude = e.coords.latitude;
    var altitude = e.coords.altitude;
    var heading = e.coords.heading;
    var accuracy = e.coords.accuracy;
    var speed = e.coords.speed;
    var timestamp = e.coords.timestamp;
    var altitudeAccuracy = e.coords.altitudeAccuracy;
 
    Titanium.API.info('geo - current location: ' + new Date(timestamp) + ' long ' + longitude + ' lat ' + latitude + ' accuracy ' + accuracy);
});
 
var mapview = Map.createView({
    mapType: Map.NORMAL_TYPE,
    region: {latitude:latitude, longitude:longitude,
            latitudeDelta:0.001, longitudeDelta:0.001},
    animate:true,
    regionFit:false,
    userLocation:true,
    annotations:[mountainView]
});

Viewing all articles
Browse latest Browse all 8068

Trending Articles



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