Info
Version: | 2.2.0.14-pre |
Author(s): | Thinkpower |
Last Update: | Tuesday, April 14, 2015 |
.NET Fiddle: | Create the first Fiddle |
Project Url: | http://www.nuget.org/packages/Thinkpower.BindingANDROID.AMap_Map/ |
NuGet Url: | https://www.nuget.org/packages/Thinkpower.BindingANDROID.AMap_Map |
Install
Install-Package Thinkpower.BindingANDROID.AMap_Map
dotnet add package Thinkpower.BindingANDROID.AMap_Map
paket add Thinkpower.BindingANDROID.AMap_Map
Thinkpower.BindingANDROID.AMap_Map Download (Unzip the "nupkg" after downloading)
Dependencies
Tags
// http://blog.csdn.net/thinkpower_support/article/details/45098943
[Activity(Label = "App1", MainLauncher = true, Icon = "@drawable/icon")]
[MetaData("com.amap.api.v2.apikey", Value = "your-apikey")]
public class MainActivity : Activity
{
Com.Amap.Api.Maps2d.MapView mapView = null;
protected override void OnCreate(Bundle bundle)
{
base.OnCreate(bundle);
var contentView = LayoutInflater.Inflate(Resource.Layout.Main, null);
SetContentView(contentView);
mapView = new MapView(this)
{
LayoutParameters = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.MatchParent, ViewGroup.LayoutParams.MatchParent)
};
mapView.OnCreate(bundle);
(contentView.Parent.Parent as LinearLayout).AddView(mapView);
}
}
//(代码于正式版时公开).