【发布时间】:2015-04-24 05:09:46
【问题描述】:
我遇到了一些需要使用 OSMPublicTransport tilesource 的应用程序的问题。
点击here查看奇怪的 MapView。那么,为什么在我的应用中出现这种丑陋的东西? 其他 tilesource 的工作就像一个魅力。
我不知道为什么它会这样显示地图视图。 我在等官方website这样的结果
这是我的 XML 文件:
<?xml version="1.0" encoding="utf-8"?>
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:id="@+id/parent_container"
android:layout_width="match_parent"
android:layout_height="match_parent">
<org.osmdroid.views.MapView
android:id="@+id/mapview"
android:layout_width="match_parent"
android:layout_height="match_parent"
tilesource="OSMPublicTransport" />
</RelativeLayout>
以及我如何声明我的观点:
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
SetContentView(Resource.Layout.Main);
mapView = FindViewById<MapView> (Resource.Id.mapview);
mapView.SetTileSource (TileSourceFactory.PublicTransport);
mapView.SetBuiltInZoomControls (true);
mapView.SetMultiTouchControls (true);
}
提前谢谢你!
【问题讨论】: