Issue
Using a mapView to display locations on map, when I open the map the first time it comes fine. But, when I try to access the map second time, the map does not come as expected, instead it comes as a cropped image.
Actual result
It covers only few portion of the screen (usually top-left). This image is draggable and can be moved on the screen.
On zooming also, I am not able to get the exact position of my location pins.
Tested on
Browsers - Safari 6.0.2
Steps to reproduce
1. Click on Open
2. Go back
3. Repeat steps 1 & 2 - note a cropped map - as seen as image attached
Repro sequence
function RootWindow() {
var win = Ti.UI.createWindow({
backgroundColor : '#ccc'
});
var btn = Ti.UI.createButton({
title : 'Open Map'
});
win.add(btn);
btn.addEventListener('click', function() {
var map = MapWindow();
Nav.open(map)
});
return win;
}
function MapWindow() {
var win = Ti.UI.createWindow({
backgroundColor : 'white'
});
var map = Ti.Map.createView({
region : {
latitude : 10,
longitude : 10
},
width : Ti.UI.FILL,
height : Ti.UI.FILL
});
win.add(map);
return win;
}
function NavigationGroup(_rootWindow) {
var win = Ti.UI.createWindow();
var nav = Titanium.UI.MobileWeb.createNavigationGroup({
window : _rootWindow
});
win.add(nav);
this.open = function(_win) {
if (_win) {
nav.open(_win, {
animated : true
});
} else {
win.open();
}
}
}
var Nav = new NavigationGroup(RootWindow());
Nav.open();
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/3565
This issue has not been fixed. The pull request has been reverted.
Pull Request: https://github.com/appcelerator/titanium_mobile/pull/3577
3_0_X PR: https://github.com/appcelerator/titanium_mobile/pull/3613
This is still happening with master. Shall I reopen?
@Mauro I just re-tested the test case provided in this ticket with master and it most certainly works in Chrome (Mac), Android 4.1 browser, and iOS 6. What browser are you seeing issues? Is the test case still the same?
It does work with: Titanium Studio, build: 3.0.2.201302191606 Titanium Studio, build: 3.0.2.GA Titanium Studio, build: 3.1.0.v20130227145654 Mac osx 10.8.2 Mountain Lion Chrome 24.0.13 Safari 6.0.2
Environment used for verification - Titanium SDK: 3.1.0.v20130226024607 Titanium SDK: 3.0.2.GA Titanium Studio:3.0.2.201302141201 Mac osx 10.8 Mountain Lion Chrome 23.0.1271.101 Safari 6.0