Skip to content

[Bug] setCenterLatLng is wrong #8

Description

@micromalice

The location is right (here I use user location to be sure), but the map is not centered.

img_0426

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();
});

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions