diff --git a/Naxam.Mapbox.Droid.5.1.1.1.nupkg b/Naxam.Mapbox.Droid.5.1.1.2.nupkg similarity index 74% rename from Naxam.Mapbox.Droid.5.1.1.1.nupkg rename to Naxam.Mapbox.Droid.5.1.1.2.nupkg index 5253cce..83eed67 100644 Binary files a/Naxam.Mapbox.Droid.5.1.1.1.nupkg and b/Naxam.Mapbox.Droid.5.1.1.2.nupkg differ diff --git a/Naxam.Mapbox.Droid/Additions/Marker.cs b/Naxam.Mapbox.Droid/Additions/Marker.cs index 1955a84..b86aedc 100644 --- a/Naxam.Mapbox.Droid/Additions/Marker.cs +++ b/Naxam.Mapbox.Droid/Additions/Marker.cs @@ -3,83 +3,89 @@ namespace Com.Mapbox.Mapboxsdk.Annotations { - public partial class Marker - { - public override int CompareTo(Java.Lang.Object obj) - { - return CompareTo((Marker)obj); - } - } + public partial class Marker + { + public override int CompareTo(Java.Lang.Object obj) + { + return CompareTo((Marker)obj); + } + } - public partial class Polygon - { - public override int CompareTo(Java.Lang.Object obj) - { - return CompareTo((Polygon)obj); - } - } + public partial class Polygon + { + public override int CompareTo(Java.Lang.Object obj) + { + return CompareTo((Polygon)obj); + } + } - public partial class Polyline - { - public override int CompareTo(Java.Lang.Object obj) - { - return CompareTo((Polyline)obj); - } - } + public partial class Polyline + { + public override int CompareTo(Java.Lang.Object obj) + { + return CompareTo((Polyline)obj); + } + } - public partial class MarkerOptions - { - protected override Java.Lang.Object RawMarker - { - get { return Marker; } - } + public partial class MarkerOptions + { + public override BaseMarkerOptions This + { + get { return ThisMarkerOptions(); } + } + } - protected override Java.Lang.Object RawThis - { - get { return This; } - } - } + public partial class MarkerViewOptions + { + public override BaseMarkerViewOptions This + { + get { return ThisMarkerViewOptions(); } + } + } + partial class PolygonOptions + { - public partial class MarkerViewOptions - { - protected override Java.Lang.Object RawMarker - { - get { return Marker; } - } + static IntPtr id_addHole_arrayLjava_util_List_; + // Metadata.xml XPath method reference: path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='PolygonOptions']/method[@name='addHole' and count(parameter)=1 and parameter[1][@type='java.util.List<com.mapbox.mapboxsdk.geometry.LatLng>...']]" + [Register("addHole", "([Ljava/util/List;)Lcom/mapbox/mapboxsdk/annotations/PolygonOptions;", "")] + public unsafe global::Com.Mapbox.Mapboxsdk.Annotations.PolygonOptions AddHole(params global::System.Collections.Generic.IList[] p0) + { + if (id_addHole_arrayLjava_util_List_ == IntPtr.Zero) + id_addHole_arrayLjava_util_List_ = JNIEnv.GetMethodID(class_ref, "addHole", "([Ljava/util/List;)Lcom/mapbox/mapboxsdk/annotations/PolygonOptions;"); + IntPtr native_p0 = JNIEnv.NewArray(p0); + try + { + JValue* __args = stackalloc JValue[1]; + __args[0] = new JValue(native_p0); + global::Com.Mapbox.Mapboxsdk.Annotations.PolygonOptions __ret = Java.Lang.Object.GetObject(JNIEnv.CallObjectMethod(((global::Java.Lang.Object)this).Handle, id_addHole_arrayLjava_util_List_, __args), JniHandleOwnership.TransferLocalRef); + return __ret; + } + finally + { + if (p0 != null) + { + JNIEnv.CopyArray(native_p0, p0); + JNIEnv.DeleteLocalRef(native_p0); + } + } + } - protected override Java.Lang.Object RawThis - { - get { return This; } - } - } + } - partial class PolygonOptions { - static IntPtr id_addHole_arrayLjava_util_List_; - // Metadata.xml XPath method reference: path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='PolygonOptions']/method[@name='addHole' and count(parameter)=1 and parameter[1][@type='java.util.List<com.mapbox.mapboxsdk.geometry.LatLng>...']]" - [Register("addHole", "([Ljava/util/List;)Lcom/mapbox/mapboxsdk/annotations/PolygonOptions;", "")] - public unsafe global::Com.Mapbox.Mapboxsdk.Annotations.PolygonOptions AddHole(params global::System.Collections.Generic.IList[] p0) - { - if (id_addHole_arrayLjava_util_List_ == IntPtr.Zero) - id_addHole_arrayLjava_util_List_ = JNIEnv.GetMethodID(class_ref, "addHole", "([Ljava/util/List;)Lcom/mapbox/mapboxsdk/annotations/PolygonOptions;"); - IntPtr native_p0 = JNIEnv.NewArray(p0); - try - { - JValue* __args = stackalloc JValue[1]; - __args[0] = new JValue(native_p0); - global::Com.Mapbox.Mapboxsdk.Annotations.PolygonOptions __ret = Java.Lang.Object.GetObject(JNIEnv.CallObjectMethod(((global::Java.Lang.Object)this).Handle, id_addHole_arrayLjava_util_List_, __args), JniHandleOwnership.TransferLocalRef); - return __ret; - } - finally - { - if (p0 != null) - { - JNIEnv.CopyArray(native_p0, p0); - JNIEnv.DeleteLocalRef(native_p0); - } - } - } + public static class BaseOptionsExtensions + { + public static T This(this BaseMarkerOptions options) where T : BaseMarkerOptions + { + return (T)options.This; + } + + public static T This(this BaseMarkerViewOptions options) where T : BaseMarkerViewOptions + { + return (T)options.This; + } + + } - } } diff --git a/Naxam.Mapbox.Droid/Properties/AssemblyInfo.cs b/Naxam.Mapbox.Droid/Properties/AssemblyInfo.cs index 4fc0700..c64bfbd 100644 --- a/Naxam.Mapbox.Droid/Properties/AssemblyInfo.cs +++ b/Naxam.Mapbox.Droid/Properties/AssemblyInfo.cs @@ -6,10 +6,10 @@ // Change them to the values specific to your project. [assembly: AssemblyTitle("Naxam.Mapbox.Droid")] -[assembly: AssemblyDescription("")] +[assembly: AssemblyDescription("Xamarin Binding Library - Mapbox for Android")] [assembly: AssemblyConfiguration("")] -[assembly: AssemblyCompany("NAXAM CO.,LTD")] -[assembly: AssemblyProduct("")] +[assembly: AssemblyCompany("NAXAM COMPANY LIMITED")] +[assembly: AssemblyProduct("X Bindings")] [assembly: AssemblyCopyright("Copyright (c) 2017 NAXAM")] [assembly: AssemblyTrademark("NAXAM")] [assembly: AssemblyCulture("")] @@ -18,7 +18,7 @@ // The form "{Major}.{Minor}.*" will automatically update the build and revision, // and "{Major}.{Minor}.{Build}.*" will update just the revision. -[assembly: AssemblyVersion("5.1.1")] +[assembly: AssemblyVersion("5.1.1.2")] // The following attributes are used to specify the signing key for the assembly, // if desired. See the Mono documentation for more information about signing. diff --git a/Naxam.Mapbox.Droid/Transforms/Metadata.xml b/Naxam.Mapbox.Droid/Transforms/Metadata.xml index bda13b4..b9e9041 100644 --- a/Naxam.Mapbox.Droid/Transforms/Metadata.xml +++ b/Naxam.Mapbox.Droid/Transforms/Metadata.xml @@ -13,4 +13,66 @@ + + com.mapbox.mapboxsdk.annotations.BaseMarkerOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerOptions + + _icon + _position + _snippet + _title + + _alpha + _anchorU + _anchorV + _flat + _icon + _infoWindowAnchorU + _infoWindowAnchorV + _position + _rotation + _selected + _snippet + _title + _visible + + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions + + com.mapbox.mapboxsdk.annotations.MarkerView + public + + _context + _currEvent + _currPressure + _gestureInProgress + _prevEvent + _prevPressure + _timeDelta + + ThisMarkerViewOptions + + _mapView + _mapboxMap + + _view + + _value + + com.mapbox.mapboxsdk.annotations.BaseMarkerOptions + com.mapbox.mapboxsdk.annotations.Marker + ThisMarkerOptions \ No newline at end of file diff --git a/demo/Naxam.MapboxQs/MainActivity.cs b/demo/Naxam.MapboxQs/MainActivity.cs index 9d1feb8..3518f80 100644 --- a/demo/Naxam.MapboxQs/MainActivity.cs +++ b/demo/Naxam.MapboxQs/MainActivity.cs @@ -6,6 +6,7 @@ using Android.Support.V7.App; using Com.Mapbox.Mapboxsdk.Camera; using Com.Mapbox.Mapboxsdk.Geometry; +using Com.Mapbox.Mapboxsdk.Annotations; namespace Naxam.MapboxQs { @@ -30,9 +31,17 @@ protected override void OnCreate(Bundle bundle) mapView.GetMapAsync(this); - //global::Xamarin.Forms.Forms.Init(this, bundle); + //global::Xamarin.Forms.Forms.Init(this, bundle); - //LoadApplication(new App()); + //LoadApplication(new App()); + + MarkerOptions options = new MarkerOptions() + .SetTitle("Hello") + .This(); + + MarkerViewOptions viewOptions = new MarkerViewOptions() + .InvokeTitle("Hello") + .This(); } protected override void OnStart() diff --git a/mapbox.nuspec b/mapbox.nuspec index bd35ea8..5bb03a8 100644 --- a/mapbox.nuspec +++ b/mapbox.nuspec @@ -3,17 +3,17 @@ Naxam.Mapbox.Droid - 5.1.1.1 - Xamarin Binding Library - Mapbox Android SDK - Vu Duc Tuyen - NAXAM CO.,LTD + 5.1.1.2 + NAXAM + NAXAM COMPANY LIMITED false - - Naxam - Mapbox Android SDK + Xamarin Binding Library - Mapbox Android SDK + Xamarin Binding Library - Mapbox Android SDK + https://avatars0.githubusercontent.com/u/600935 https://opensource.org/licenses/MIT https://github.com/NAXAM/xam-mapbox-android - (c) 2017 NAXAM + Copyright (c) 2017 NAXAM Xamarin.Android, Mapbox