Android 在Skobbler3.0中,如何在地图上的注释中设置自定义图像
新库、类SKAnnotation没有以下方法:Android 在Skobbler3.0中,如何在地图上的注释中设置自定义图像,android,android-studio,skobbler-maps,Android,Android Studio,Skobbler Maps,新库、类SKAnnotation没有以下方法: annotation.setImagePath(mImagePath) 请使用如下代码 SKAnnotation annotation = new SKAnnotation(itemId); annotation.setLocation(new SKCoordinate(lat, lon)); SKAnnotationView annotationView = new SKAnnotationView(); RelativeLayout c
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);