Titanium JIRA Archive
Titanium SDK/CLI (TIMOB)

[TIMOB-17884] Map: Android - Google Maps v2 map tiles not showing when scrolling/zooming

GitHub Issuen/a
TypeBug
PriorityCritical
StatusClosed
ResolutionFixed
Resolution Date2014-10-24T22:34:54.000+0000
Affected Version/sn/a
Fix Version/sRelease 3.4.1, Release 3.4.2, Release 3.5.0, Release 4.0.0
ComponentsAndroid
LabelsTCSupport, api, cache, google, leak, map, memory, module_androidmapv2, qe-testadded, tiles, v2
ReporterBernhard Dengler
AssigneeHieu Pham
Created2014-07-25T09:06:03.000+0000
Updated2014-12-17T15:00:01.000+0000

Description

After starting a map view, everything works fine for a while. If you do a lot of scrolling and zooming, you don't see any map details any more after a while on some devices (e.g. Samsung Galaxy S4 w Android 4.2.1, Oppo Find 7 w Android 4.4, Google Nexus 7 w Android 4.4 etc.). * You can still scroll and zoom, but the map stays blurry (street names still appear). * Switching between satellite and standard view doesn't change the bevhaviour. * Sometimes the app crashes after heavy zooming and scrolling. * After clearing the cache (application settings) and restarting the app, the map works fine again for some time. So I assume it's a memory issue. * In addition some users report that the performance of the map view is, compared to the Google Maps app, worse and the use of internet traffic is higher. I attached a sample project. You just have to enter your Google API key and adapt the app id. If you have any questions or need more information feel free to post a comment.

Attachments

FileDateSize
Map Test.zip2014-07-25T09:06:03.000+00002453760

Comments

  1. Bernhard Dengler 2014-07-25

    There are also some other users reporting the same issue: http://developer.appcelerator.com/question/174865/caching-of-google-map-tiles-android#answer-281124
  2. Bernhard Dengler 2014-07-29

    Were you able to verify this?
  3. Rainer Schleevoigt 2014-08-04

    Useless: cache clearing, app data clearing Time to time force quit of app helps.
  4. Eduardo Gomez 2014-08-14

    [~bedengler], The sample you posted seems to be adding the Map to a modal Window.
       	//var win = Titanium.UI.currentWindow;
       	var win = Titanium.UI.createWindow({
       		barColor : '#a1c653',
       		navBarHidden : true,
       	    backgroundColor : "white",
               //backgroundImage : '/images/Hintergrund_h1200.png',
               title: 'Karte',
       	    modal:true
       	});
       
    - http://docs.appcelerator.com/titanium/latest/#!/guide/Google_Maps_v2_for_Android-section-36739898_GoogleMapsv2forAndroid-Mapappearsblurry You may want to double check using a smaller sample and see if the issue persist.
       var win = Ti.UI.createWindow({});
       
       var mapObject = require("ti.map");
       var map = mapObject.createView({
       	width : Ti.UI.FILL,
       	height : Ti.UI.FILL,
       	userLocation : true,
       	regionFit : true,
       	mapType : mapObject.NORMAL_TYPE
       });
       
       win.setNavBarHidden(true);
       
       win.add(map);
       
       win.open();
       
  5. Joshua Rhinehart 2014-08-15

    Using the suggested code from Eduardo's comment directly above this, I was able to reproduce the issue on an HTC One M7 running 4.2.2 compiled with 3.3.0. TESTING ENVIRONMENT: Titanium SDK: 3.3.0.GA Titanium CLI: 3.3.0 OS X Version: 10.9.3 Android Version: 4.2.2 Map Module 2.1.4 STEPS TO TEST: Create a simple project. Update project using sample test code Add Map module 2.1.4 in tiapp.xml Run on android device Zoom in/out repeatedly, eventually map fails to load new data
  6. Seth Toda 2014-08-18

    Hey guys, please clone tickets and then move them to the correct project. We keep getting emails of community users loosing their tickets. If you want to make a community facing comment please make it on TC-4584 - Seth
  7. Lokesh Choudhary 2014-09-02

    Tried on 2 devices 1. HTC One 2. Samsung galaxy S5 Was able to reproduce the issue on the HTC one easily. The issue could not be seen on galaxy S5. Might be samsung devices take a long time to show the issue. Environment: Titanium SDK: 3.3.0.GA Titanium CLI: 3.3.0 OS X Version: 10.9.3 Android Version: 4.2.2 (HTC One) , 4.4.2(Samsung Galaxy S5) Map Module 2.1.4
  8. Ingo Muschenetz 2014-09-18

    Investigate fragment lifecycle.
  9. Mauro Parra-Miranda 2014-10-15

  10. Ingo Muschenetz 2014-10-15

    Not yet, unfortunately. However, you can I think resolve that other ticket since I've now moved this one into TIMODOPEN.
  11. Hieu Pham 2014-10-22

    ti.map module PR: https://github.com/appcelerator-modules/ti.map/pull/67 master PR: https://github.com/appcelerator/titanium_mobile/pull/6256 3_4_1 PR: https://github.com/appcelerator/titanium_mobile/pull/6273 3_4_X PR: https://github.com/appcelerator/titanium_mobile/pull/6274
  12. Bernhard Dengler 2014-10-25

    Seems to be solved, sounds good, thank you! I appreciate your work
  13. Wilson Luu 2014-10-28

    Closing ticket as fixed. Verified that with the new ti.map module (2.2.1), tiles will be loaded after scrolling and zooming a lot. Tested on: Appcelerator Studio, build: 3.4.1.201410191611 SDK build: 3.4.1.v20141027160917 CLI: 3.4.1-dev Alloy: 1.5.1 Android SDK Build-tools: 20 Android SDK Platform-tools: 21 Android SDK Tools: 23.0.5 Device: HTC One (4.2.2), Samsung Galaxy S4 (4.4.2)
  14. Bernhard Dengler 2014-12-17

    I've tried it now with ti.map plugin version 2.2.1 and Ti Studio V 3.4.1 (btw: it was really hard to find ti.map version 2.2.1 as the official link from marketplace still points to 2.1.4). Basically it's working except for the satelite/hybrid view. If you're in satelite/hybrid view and scrolling a lot, after some time the pictures stay blurred although the streets and streetnames sharpen. So there's still something not working perfectly. "Normal" mode works fine and when switching to "normal" mode (when the satelite view stays blurry), normal mode still works fine. Tested on Samsung Galaxy S3 with Android 4.4.4 and Google Nexus 7 with Android 5.0.

JSON Source