I'm trying to setup custom image annotations in the Android SDK and I'm no able to. If I create the annotation with a default image with the code:
annotation.setAnnotationType(SKAnnotation.SK_ANNOTATION_TYPE_GREEN);
The annotation is displayed. But when I set my custom image with the code:
annotation.setImagePath(getActivity().getFilesDir() + "/" + data.getMapImagePath());
annotation.setImageSize(64);
The annotation is not displayed. The variables in the image path resolve to (for example): "/data/data/com.kolobee.mini/files/stings_chueca.me9d_map.png"
.
This images are generated dynamically by the app by creating a png
file from a Bitmap
with the code:
FileOutputStream fos = context.openFileOutput(path, Context.MODE_PRIVATE);
bitmap.compress(CompressFormat.PNG, 75, fos);
fos.close();
Why are annotations not being displayed?