本文整理汇总了C#中MapView.setTileSource方法的典型用法代码示例。如果您正苦于以下问题:C# MapView.setTileSource方法的具体用法?C# MapView.setTileSource怎么用?C# MapView.setTileSource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MapView
的用法示例。
在下文中一共展示了MapView.setTileSource方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: onCreate
//<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION"/>
//<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"/>
//<uses-permission android:name="android.permission.ACCESS_WIFI_STATE" />
//<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
//<uses-permission android:name="android.permission.INTERNET" />
//<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
protected override void onCreate(global::android.os.Bundle savedInstanceState)
{
base.onCreate(savedInstanceState);
//requestWindowFeature(Window.FEATURE_NO_TITLE);
//getWindow().setFlags(WindowManager_LayoutParams.FLAG_FULLSCREEN, WindowManager_LayoutParams.FLAG_FULLSCREEN);
//this.ShowToast("jsc-solutions.net\nWait while map loads...");
// http://stackoverflow.com/questions/8037101/how-to-get-attributeset-properties
//var a = this;
//var sv = new ScrollView(a);
//var ll = new LinearLayout(a);
////ll.setOrientation(LinearLayout.VERTICAL);
//sv.addView(ll);
//myOpenMapView = new MapView(this, null);
//myOpenMapView.setLayoutParams(
// new ViewGroup.LayoutParams(
// ViewGroup.LayoutParams.FILL_PARENT,
// ViewGroup.LayoutParams.FILL_PARENT
// )
//);
//myOpenMapView.AttachTo(ll);
//a.setContentView(sv);
setContentView(R.layout.main);
myOpenMapView = (MapView)findViewById(R.id.openmapview);
// http://code.google.com/p/osmdroid/source/browse/trunk/osmdroid-android/src/main/java/org/osmdroid/views/MapView.java
// http://stackoverflow.com/questions/157119/c-sharp-can-i-override-with-derived-types
myMapController = (MapController)((IMapView)myOpenMapView).getController();
myOpenMapView.setTileSource(TileSourceFactory.MAPNIK);
myOpenMapView.setBuiltInZoomControls(true);
myOpenMapView.setMultiTouchControls(true);
myMapController.setZoom(16);
myMapController.setCenter(new GeoPoint(51496994, -134733));
}