Uploaded image for project: 'Titanium SDK/CLI'
  1. Titanium SDK/CLI
  2. TIMOB-11912

MobileWeb: Unable to open map correctly second time

    Details

      Description

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

        Attachments

          Activity

            People

            • Assignee:
              bhughes Bryan Hughes
              Reporter:
              egomez Eduardo Gomez (Inactive)
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

                • Titanium SDK/CLI <> Titanium Mobile
                  Synced with:
                  TIMOB-15057
                  Sync status:
                  ERROR
                  Last received:
                  Last sent:

                  Git Source Code