新库,类SKAnnotation没有方法:
annotation.setImagePath(mImagePath);
最佳答案
请使用如下代码
SKAnnotation annotation = new SKAnnotation(itemId);
annotation.setLocation(new SKCoordinate(lat, lon));
SKAnnotationView annotationView = new SKAnnotationView();
RelativeLayout customView = (RelativeLayout) ((LayoutInflater)getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE)).inflate(
R.layout.layout_custom_pin, null, false);
annotationView.setView(customView);
annotation.setAnnotationView(annotationView);
mapView.addAnnotation(annotation, SKAnimationSettings.ANIMATION_NONE);
关于android - 在 skobbler 3.0 中如何在 map 上的注释中设置自定义图像,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39041405/