I need to change the image of SKAnnotation. Annotation Builder Code:
private SKAnnotation getAnnotationFromView (int id,int minZoomLvl, View view) {
SKAnnotation annotation = new SKAnnotation();
SKAnnotationView annotationView = new SKAnnotationView();
annotationView.setView(view);
annotation.setUniqueID(id);
annotation.setOffset(new SKScreenPoint(annotationView.getWidth()/2, annotationView.getHeight()/2));
annotation.setAnnotationView(annotationView);
annotation.setMininumZoomLevel(minZoomLvl);
return annotation;
}
Now my task is to update the annotation / image to the current state (position, orientation). Is there a way to do this without re-adding the annotation? Having mapView.updateAnnotation()looked in the documentation, I found , but it seems to work only for images added with annotation.setImagePath(imagePath)
Can anyone help me with this?
source
share