Skip to content
This repository has been archived by the owner on Jul 16, 2023. It is now read-only.

Commit

Permalink
Close #4 -> publish new package
Browse files Browse the repository at this point in the history
  • Loading branch information
tuyen-vuduc committed Jul 25, 2017
1 parent f61f7c3 commit 3d8f2f3
Show file tree
Hide file tree
Showing 6 changed files with 159 additions and 82 deletions.
Binary file not shown.
144 changes: 75 additions & 69 deletions Naxam.Mapbox.Droid/Additions/Marker.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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<global::Com.Mapbox.Mapboxsdk.Geometry.LatLng>[] 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<global::Com.Mapbox.Mapboxsdk.Annotations.PolygonOptions>(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&lt;com.mapbox.mapboxsdk.geometry.LatLng&gt;...']]"
[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<global::Com.Mapbox.Mapboxsdk.Geometry.LatLng>[] 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<global::Com.Mapbox.Mapboxsdk.Annotations.PolygonOptions>(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<T>(this BaseMarkerOptions options) where T : BaseMarkerOptions
{
return (T)options.This;
}

public static T This<T>(this BaseMarkerViewOptions options) where T : BaseMarkerViewOptions
{
return (T)options.This;
}

}

}
}
8 changes: 4 additions & 4 deletions Naxam.Mapbox.Droid/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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("")]
Expand All @@ -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.
Expand Down
62 changes: 62 additions & 0 deletions Naxam.Mapbox.Droid/Transforms/Metadata.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,66 @@
<remove-node path="/api/package[@name='com.almeros.android.multitouch.gesturedetectors']/class[@name='TwoFingerGestureDetector']/method[@name='handleStartProgressEvent']" />

<remove-node 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&lt;com.mapbox.mapboxsdk.geometry.LatLng&gt;...']]" />

<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerOptions']/method[@name='setIcon' and count(parameter)=1]" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerOptions']/method[@name='setPosition' and count(parameter)=1]" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerOptions']/method[@name='setSnippet' and count(parameter)=1]" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerOptions']/method[@name='setTitle' and count(parameter)=1]" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerOptions</attr>

<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerOptions']/field[@name='icon']" name="managedName">_icon</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerOptions']/field[@name='position']" name="managedName">_position</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerOptions']/field[@name='snippet']" name="managedName">_snippet</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerOptions']/field[@name='title']" name="managedName">_title</attr>

<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='alpha']" name="managedName">_alpha</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='anchorU']" name="managedName">_anchorU</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='anchorV']" name="managedName">_anchorV</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='flat']" name="managedName">_flat</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='icon']" name="managedName">_icon</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='infoWindowAnchorU']" name="managedName">_infoWindowAnchorU</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='infoWindowAnchorV']" name="managedName">_infoWindowAnchorV</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='position']" name="managedName">_position</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='rotation']" name="managedName">_rotation</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='selected']" name="managedName">_selected</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='snippet']" name="managedName">_snippet</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='title']" name="managedName">_title</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/field[@name='visible']" name="managedName">_visible</attr>

<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['alpha']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['anchorU']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['anchorV']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['flat']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['icon']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['infoWindowAnchorU']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['infoWindowAnchorV']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['position']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['rotation']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['selected']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['snippet']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['title']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method['visible']" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerViewOptions</attr>

<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method[@name='getMarker']" name="return">com.mapbox.mapboxsdk.annotations.MarkerView</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerViewOptions']/method[@name='getMarker']" name="visibility">public</attr>

<attr path="/api/package[@name='com.almeros.android.multitouch.gesturedetectors']/class[@name='BaseGestureDetector']/field[@name='context']" name="managedName">_context</attr>
<attr path="/api/package[@name='com.almeros.android.multitouch.gesturedetectors']/class[@name='BaseGestureDetector']/field[@name='currEvent']" name="managedName">_currEvent</attr>
<attr path="/api/package[@name='com.almeros.android.multitouch.gesturedetectors']/class[@name='BaseGestureDetector']/field[@name='currPressure']" name="managedName">_currPressure</attr>
<attr path="/api/package[@name='com.almeros.android.multitouch.gesturedetectors']/class[@name='BaseGestureDetector']/field[@name='gestureInProgress']" name="managedName">_gestureInProgress</attr>
<attr path="/api/package[@name='com.almeros.android.multitouch.gesturedetectors']/class[@name='BaseGestureDetector']/field[@name='prevEvent']" name="managedName">_prevEvent</attr>
<attr path="/api/package[@name='com.almeros.android.multitouch.gesturedetectors']/class[@name='BaseGestureDetector']/field[@name='prevPressure']" name="managedName">_prevPressure</attr>
<attr path="/api/package[@name='com.almeros.android.multitouch.gesturedetectors']/class[@name='BaseGestureDetector']/field[@name='timeDelta']" name="managedName">_timeDelta</attr>

<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='MarkerViewOptions']/method[@name='getThis' and count(parameter)=0]" name="managedName">ThisMarkerViewOptions</attr>

<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='Annotation']/field[@name='mapView']" name="managedName">_mapView</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='Annotation']/field[@name='mapboxMap']" name="managedName">_mapboxMap</attr>

<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='InfoWindow']/field[@name='view']" name="managedName">_view</attr>

<attr path="/api/package[@name='com.mapbox.mapboxsdk.style.layers']/class[@name='PropertyValue']/field[@name='value']" name="managedName">_value</attr>

<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerOptions']/method[@name='getThis' and count(parameter)=0]" name="return">com.mapbox.mapboxsdk.annotations.BaseMarkerOptions</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='BaseMarkerOptions']/method[@name='getMarker' and count(parameter)=0]" name="return">com.mapbox.mapboxsdk.annotations.Marker</attr>
<attr path="/api/package[@name='com.mapbox.mapboxsdk.annotations']/class[@name='MarkerOptions']/method[@name='getThis' and count(parameter)=0]" name="managedName">ThisMarkerOptions</attr>
</metadata>
13 changes: 11 additions & 2 deletions demo/Naxam.MapboxQs/MainActivity.cs
Original file line number Diff line number Diff line change
Expand Up @@ -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
{
Expand All @@ -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<MarkerOptions>();

MarkerViewOptions viewOptions = new MarkerViewOptions()
.InvokeTitle("Hello")
.This<MarkerViewOptions>();
}

protected override void OnStart()
Expand Down
14 changes: 7 additions & 7 deletions mapbox.nuspec
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@
<metadata>
<!-- Required elements-->
<id>Naxam.Mapbox.Droid</id>
<version>5.1.1.1</version>
<description>Xamarin Binding Library - Mapbox Android SDK</description>
<authors>Vu Duc Tuyen</authors>
<owners>NAXAM CO.,LTD</owners>
<version>5.1.1.2</version>
<authors>NAXAM</authors>
<owners>NAXAM COMPANY LIMITED</owners>
<requireLicenseAcceptance>false</requireLicenseAcceptance>

<!-- Optional elements -->
<title>Naxam - Mapbox Android SDK</title>
<summary>Xamarin Binding Library - Mapbox Android SDK</summary>
<description>Xamarin Binding Library - Mapbox Android SDK</description>
<iconUrl>https://avatars0.githubusercontent.com/u/600935</iconUrl>
<licenseUrl>https://opensource.org/licenses/MIT</licenseUrl>
<projectUrl>https://github.com/NAXAM/xam-mapbox-android</projectUrl>
<copyright>(c) 2017 NAXAM</copyright>
<copyright>Copyright (c) 2017 NAXAM</copyright>
<tags>Xamarin.Android, Mapbox</tags>
<dependencies>
<dependency id="Naxam.SquareUp.OkHttp3" version="3.7.0" />
Expand Down

0 comments on commit 3d8f2f3

Please sign in to comment.