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

Android: Map View annotations can't see their image in density subdirectories

    Details

      Description

      Problem

      The annotations in a Map View can't find their image unless it is directly in the \Resources\android\images\ subdirectory. When multiple versions (sizes) of an image file are correctly placed in the density-specific subdirectories (\Resources\android\images\medium\, \Resources\android\images\high\, etc.), they cannot be found (aren't used), even after cleaning and rebuilding the project.

      Expected behavior

      The pin should show on the map.

      Actual behavior

      No pin shows on the map.

      Testcase

      Use the attached test project, which contains the entire project directory structure. The app.js contents are also shown here for completeness:

      app.js

      var win1 = Ti.UI.createWindow({
        backgroundColor:'#fff',
        exitOnClose:true,
        navBarHidden:true,
        layout:'vertical'
      });
       
      var map1=Ti.Map.createView({
                    mapType:Ti.Map.STANDARD_TYPE,
                    animate:true,
                    region:{latitude:37.423156, longitude:-122.084917,
                            latitudeDelta:0.01, longitudeDelta:0.01},
                    regionFit:true,
                    annotations:[Ti.Map.createAnnotation({
                                   latitude:37.423156,
                                   longitude:-122.084917,
                                   image:'/images/MapPin.png'
                                 })],
                    userLocation:true,
                    height:Ti.UI.Fill
                  });
      win1.add(map1);
       
      var square1=Ti.UI.createView({
                    height:20,
                    width:20,
                    backgroundColor:'red',
                    bottom:10,
                    left:10
                  });
      map1.add(square1);
       
      win1.open();
      

        Attachments

          Activity

            People

            • Assignee:
              pwang Ping Wang
              Reporter:
              bitshftr Shawn Lipscomb
              Reviewer:
              Allen Yeung
            • Watchers:
              0 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved:

                Backbone Issue Sync

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

                  Git Integration