Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-18637] Windows: Initial Map region isn't always obeyed

GitHub Issuen/a
TypeBug
PriorityNone
StatusClosed
ResolutionFixed
Resolution Date2015-03-11T13:59:21.000+0000
Affected Version/sn/a
Fix Version/sRelease 4.1.0
ComponentsWindows
Labelsn/a
ReporterChristopher Williams
AssigneeChristopher Williams
Created2015-03-05T14:49:48.000+0000
Updated2017-03-14T20:08:59.000+0000

Description

I'm seeing an initial location somewhere in the South Pacific Ocean, in the middle of water, for the following code example:
var Map = require('ti.map');
var win = Titanium.UI.createWindow({
    backgroundColor: 'red'
});

var mountainView = Map.createAnnotation({
    latitude:37.390749,
    longitude:-122.081651,
    title:"Appcelerator Headquarters",
    subtitle:'Mountain View, CA',
    pincolor:Map.ANNOTATION_RED,
    myid:1 // Custom property to uniquely identify this annotation.
});

var mapview = Map.createView({
    mapType: Map.NORMAL_TYPE,
    region: {
        latitude: 37.390749, longitude: -122.081651,
            latitudeDelta:0.00, longitudeDelta:0.00},
    animate:true,
    regionFit:true,
    userLocation:true,
    annotations:[mountainView]
});

win.add(mapview);
win.open();
I'm not sure if it's trying to set the region too early, using the wrong coordinates, or what.

Comments

  1. Lee Morris 2017-03-14

    Closing ticket as fixed.

JSON Source