The location is right (here I use user location to be sure), but the map is not centered.
var mapbox = require('com.polancomedia.mapbox');
var mapView;
Titanium.Geolocation.getCurrentPosition(function(e){
mapView = mapbox.createView({
id: 'mapview',
map: 'XXXXXXXXXXX',
minZoom: 6, //8,
maxZoom: 18, //10,
zoom: 16,
centerLatLng: [e.coords.latitude,e.coords.longitude],
width: Ti.UI.FILL,
height: Ti.UI.FILL,
hideAttribution: true, //defaults to: false. See Mapbox terms and conditions before removing
debugTiles:false,
userLocation: true
});
$.index.add(mapView);
$.index.open();
});
The location is right (here I use user location to be sure), but the map is not centered.