[AC-1999] Particular images in annotations do not render on the mapView
GitHub Issue | n/a |
---|---|
Type | Bug |
Priority | n/a |
Status | Closed |
Resolution | Cannot Reproduce |
Resolution Date | 2014-02-09T06:40:45.000+0000 |
Affected Version/s | n/a |
Fix Version/s | n/a |
Components | Titanium SDK & CLI |
Labels | annotation, anyDensity, density, image, mapView |
Reporter | Joe Falcone |
Assignee | Ritu Agrawal |
Created | 2014-01-28T02:03:59.000+0000 |
Updated | 2016-03-08T07:40:56.000+0000 |
Description
We have images associated with annotations (replacing the default pins) and these are not showing up when we display an Android V2 mapView using the 3.20GA SDK. These icons did show up for annotations using the 3.13GA SDK. AnyDensity is set to True.
We create the annotations using:
var TiMap = require("ti.map");
var annot = TiMap.createAnnotation({
latitude : latitude,
longitude : longitude,
title : name,
subtitle : subtitle,
image : '/images/big_red_dot.png'
});
Icons for different screens are at /Resources/android/images/[density]/big_red_dot.png
where [density] is res-port-hdpi, etc, etc.
There is also a big_red_dot.png file in /Resources/images/
The annotations are pushed into an "spots" array and then createMapView is called. We know that the "spots" are in the "spotRegion" of the map.
var mapView = TiMap.createView({
left : 0,
top : 0,
width : Ti.UI.FILL,
height : Ti.UI.FILL,
mapType : TiMap.NORMAL_TYPE,
region : spotRegion,
animate : false,
regionFit : true,
userLocation : true,
annotations : spots,
});
The result is that the correct mapView is shown but with no annotation images, but the annotations are there and touching the map brings up the annotations.
See screenshot [http://postimg.org/image/9mjntx69l/]
We've done more testing and found that particular images trigger this behavior. This is an example of one of the images. It's a 36x36 24-bit PNG with transparency created in Photoshop. [http://s30.postimg.org/43s6x7w99/bigreddot.png]
So on an xhdpi or xxhdpi Android device, if the annotation image is single color or very simple, and around 36x36 with a transparent background, it appears that the map rendering code "optimizes it out" - because the annotations still pop up on the map when you touch the map even though the annotation images aren't there. I'm also changing the title because it is density dependent with respect to happening on xhdpi and xxhdpi devices - haven't tested on other lower density devices
Thanks for reporting and narrowing down this issue. Please provide a complete and runnable test case along with images so that we can reproduce the exact same issue you are running into. It would be best to zip up and attach the test case folder so that we can set it up exactly the way you have.
Resolving this issue as we cannot reproduce this issue and the reporter has not followed up on the requested information.