Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/android/228.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Android中的SKMaps不显示注释_Android_Skmaps - Fatal编程技术网

Android中的SKMaps不显示注释

Android中的SKMaps不显示注释,android,skmaps,Android,Skmaps,我创建了一个演示应用程序来了解SKMaps,它可以很好地添加注释。然而,现在我已经将代码移动到实际项目中,并具有相同的需求。未显示添加的批注。我尝试使用SKAnnotationView自定义视图和默认注释类型,如SKAnnotation.SK_Annotation_type_RED和SKAnnotation.SK_Annotation_type_PURPLE。地图上没有添加任何内容 我在同一个屏幕上有一个自定义的查看寻呼机,我删除了相同的,并检查了仍然不工作。动态添加SKMapViewHolde

我创建了一个演示应用程序来了解SKMaps,它可以很好地添加注释。然而,现在我已经将代码移动到实际项目中,并具有相同的需求。未显示添加的批注。我尝试使用SKAnnotationView自定义视图和默认注释类型,如SKAnnotation.SK_Annotation_type_RED和SKAnnotation.SK_Annotation_type_PURPLE。地图上没有添加任何内容

我在同一个屏幕上有一个自定义的查看寻呼机,我删除了相同的,并检查了仍然不工作。动态添加SKMapViewHolder

用于动态添加SKMapViewHolder的代码段:

SKMapViewHolder mMapHolder = new SKMapViewHolder(OfflineMapScreen.this);
mMapHolder.setLayoutParams(new ViewGroup.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT, ViewGroup.LayoutParams.FILL_PARENT));
RelativeLayout outerLayout = (RelativeLayout) findViewById(R.id.outer_layout);
outerLayout.addView(mMapHolder);
RelativeLayout.LayoutParams rlp = (android.widget.RelativeLayout.LayoutParams) mMapHolder.getLayoutParams();
rlp.addRule(RelativeLayout.BELOW, R.id.header);
mMapHolder.setLayoutParams(rlp);

mOSMMapView = mMapHolder.getMapSurfaceView();
mOSMMapView.setMapSurfaceListener(this);
mOSMMapView.getMapSettings().setFollowerMode(SKMapFollowerMode.NONE);
mOSMMapView.getMapSettings().setMapPanningEnabled(true);
mOSMMapView.getMapSettings().setInertiaPanningEnabled(true);
mOSMMapView.getMapSettings().setCompassShown(false);
mOSMMapView.getMapSettings().setCurrentPositionShown(false);
mOSMMapView.setZoomSmooth(14f, 500);

有人能解决这个问题吗?在这里可以看到添加注释的代码片段:

在您提供的图像中,我们注意到,在设置位置时,您正在对纬度和经度重复使用相同的值。使用类似于:

 annotationDrawable.setLocation(new SKCoordinate(Double.valueOf(aPlace.getLongitude()),Double.valueOf(aPlace.getLatitude())) ;

在您提供的图像中,我们注意到,在设置位置时,您正在对纬度和经度重复使用相同的值。使用类似于:

 annotationDrawable.setLocation(new SKCoordinate(Double.valueOf(aPlace.getLongitude()),Double.valueOf(aPlace.getLatitude())) ;

我们正在调查我们正在调查哇!非常感谢安藤。我确实有办法得到纬度。选择错误导致此处出现。。再次非常感谢……哇!非常感谢安藤。我确实有办法得到纬度。选择错误导致此处出现。。再次非常感谢。。