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

MobileWeb: When hiding a Ti.map view and showing it again the view is reloaded

    Details

    • Story Points:
      8
    • Sprint:
      2014 Sprint 24 Tooling

      Description

      Issue

      When working on mobile web and using ti.map if the map visible property is set to false and the is set to true again the map will be reloaded to the original state instead of keeping the same location and zoom.

      Steps to repro

      1. Run test code
      2. Move and zoom in the map view
      3. Click on the toggle button to hide it
      4. Click on the toggle button to show it

      Expected Result

      The map will be shown again with the last location and zoom

      Actual Result

      The map is reloaded to the original state

      Test code

      var win = Ti.UI.createWindow({
      	layout:'vertical'
      });
       
      var bt = Ti.UI.createButton({
      	top:20,
      	title:'Toggle'
      });
       
      var map = Ti.Map.createView({
      	visible:true,
      	top:20,
      	userLocation:true
      });
       
      Ti.Geolocation.MobileWeb.locationTimeout = 10000; 
      Ti.Geolocation.getCurrentPosition(locationCallback); 
       
      function locationCallback(e) { 
      	console.log(e); 
      } 
      var last;
      bt.addEventListener('click',function(){
      	map.visible = !map.visible;
      });
       
      win.add(bt);
      win.add(map);
      win.open();
      

        Attachments

          Activity

            People

            • Assignee:
              cbarber Chris Barber
              Reporter:
              mcota Marco Cota (Inactive)
              Reviewer:
              Tim Poulsen
            • Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration