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

Android: Clicking Map Annotation with Map added to table view row crashes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Fixed
    • Affects Version/s: Release 2.1.3, Release 2.1.4
    • Fix Version/s: Release 2.1.4, Release 3.0.0
    • Component/s: Android
    • Labels:
    • Environment:

      Titanium Mobile SDK, Android 2.3.3, Android 4.1.x

      Description

      Note that this bug does not occur in 3.0GA onwards. We have a customer using 2.1.4GA who needs this to be fixed.

      Adding Map view on table view row object and clicking on Map Annotation crashes the app.

      Steps to reproduce.

      1: Use the below mentioned sample.
      2: create a sample app and put the code in app.js file.
      3: Launch the app in android.
      4: Click on the map annotation. App should crash.

      var win = Ti.UI.createWindow({
          backgroundColor : "gray"
      });
       
      var tbView = Ti.UI.createTableView();
       
      var tbRow1 = Ti.UI.createTableViewRow({
          title:"row1",
          height:200,
          width:320
      });
       
      var tbRow2 = Ti.UI.createTableViewRow({
          title:"row2",
          height:200,
          width:320
      });
      var tbRow3 = Ti.UI.createTableViewRow({
          title:"row3",
          height:100,
          width:320
      });
       
       
       
      var locationMap = Ti.Map.createView({
          mapType : Titanium.Map.STANDARD_TYPE,
          region : {
              latitude : 0,
              longitude : 0,
              latitudeDelta : 0.01,
              longitudeDelta : 0.01
          },
          animate : true,
          regionFit : true,
          userLocation : false,
          height:150,
          width:320
      });
      var locationAnnotation = Ti.Map.createAnnotation({
          latitude : 28.65432,
          longitude : 74.23456,
          title : "employee.AddressName",
          subtitle : "employee.StreetFull",
          pincolor : Titanium.Map.ANNOTATION_RED,
          animate : true
      });
       
      locationMap.removeAllAnnotations();
      locationMap.addAnnotation(locationAnnotation);
       
      locationMap.setRegion({
          latitude : 28.65432,
          longitude : 75.23456,
          latitudeDelta : 0.01,
          longitudeDelta : 0.01
      });
       
       
       
      //=========
       
      var locationMap1 = Ti.Map.createView({
          mapType : Titanium.Map.STANDARD_TYPE,
          region : {
              latitude : 0,
              longitude : 0,
              latitudeDelta : 0.01,
              longitudeDelta : 0.01
          },
          animate : true,
          regionFit : true,
          userLocation : false,
          height:130,
          width:320
      });
      var locationAnnotation1 = Ti.Map.createAnnotation({
          latitude : 29.65432,
          longitude : 74.23456,
          title : "employee.AddressName",
          subtitle : "employee.StreetFull",
          pincolor : Titanium.Map.ANNOTATION_RED,
          animate : true
      });
       
      locationMap1.removeAllAnnotations();
      locationMap1.addAnnotation(locationAnnotation1);
       
      locationMap1.setRegion({
          latitude : 29.65432,
          longitude : 75.23456,
          latitudeDelta : 0.01,
          longitudeDelta : 0.01
      });
       
      //=========
       
      //tbRow1.add(locationMap);
      tbRow2.add(locationMap1);
      // tbRow3.add(locationMap);
       
      var datavar = [tbRow1,tbRow2,tbRow3];
       
      tbView.data = datavar;
      win.add(tbView);
       
      win.open();
      
      

        Attachments

          Activity

            People

            • Assignee:
              ingo Ingo Muschenetz
              Reporter:
              anigam Ashish Nigam
            • Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Source Code