android – 如何修改Skobbler Annotation而不重新添加它

我必须修改SKAnnotation的图像.

注释构建器代码:

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;
}  

现在我的问题是将注释/图像更新为当前状态(位置,方向).有没有办法在不重新添加注释的情况下这样做?查看文档我找到了mapView.updateAnnotation()但它似乎只适用于添加了annotation.setImagePath(imagePath)的图像
有人可以帮助我吗?

最佳答案 很不幸的是,不行.

实现中存在不一致(我们将在未来的更新中解决这个问题),它允许仅使用从文件中获取的图标重新定位注释.

如果您想重新定位(任何)注释,您可以/应该将其删除并再次添加.

如果您想更改图标/视图 – 那么updateAnnotation API应该完成这项工作

点赞