如何修改Skobbler注释无需重新添加它 [英] How to modify a Skobbler Annotation without re adding it
问题描述
我要修改SKAnnotation的形象。
注释建设者code:
I have to modify the image of a 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;
}
现在我的问题是标注/图片更新到当前状态(位置,方向)。有没有办法这样做,无需重新添加注释?展望我发现文档 mapView.updateAnnotation()
但它似乎只是为了与 annotation.setImagePath(的ImagePath)$ C添加的图像工作$ C>结果
有人能帮助我吗?
Now my problem is to update the annotation/image to the current state (position, orientation). Is there a way doing that without re adding the annotation? Looking into the documentation I found mapView.updateAnnotation()
but it seems to work just for images added with annotation.setImagePath(imagePath)
Can someone help me with that?
推荐答案
可惜没有。
有是在执行不一致(我们将解决在以后的更新),允许一个重新定位只用注释从文件中获取的图标。
There is an inconsistency in the implementation (we'll address that in a future update) that allows one to reposition only annotations with the icon taken from an file.
如果您想重新定位(任意)注解你可以/应该将其删除,然后重新添加。
If you'd like to reposition an (any) annotation you could/should remove it and add it again.
如果您想更改图标/视图 - 那么 updateAnnotation
API应该做的工作。
If you'd like to change the icon/view - then the updateAnnotation
API should do the job
这篇关于如何修改Skobbler注释无需重新添加它的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!