I am trying to customize custom image annotations in the Android SDK and I cannot. If I create an annotation with a default image with code:
annotation.setAnnotationType(SKAnnotation.SK_ANNOTATION_TYPE_GREEN);
An annotation is displayed. But when I set my own image with code:
annotation.setImagePath(getActivity().getFilesDir() + "/" + data.getMapImagePath());
annotation.setImageSize(64);
Annotation is not displayed. Variables in the image path are enabled (for example): "/data/data/com.kolobee.mini/files/stings_chueca.me9d_map.png".
These images are generated dynamically by the application by creating a file pngfrom Bitmapwith the code:
FileOutputStream fos = context.openFileOutput(path, Context.MODE_PRIVATE);
bitmap.compress(CompressFormat.PNG, 75, fos);
fos.close();
Why are annotations not displayed?
source
share