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

Commit 7325bd5

Browse files
committed
#3 Mapbox iOS v3.7.0
1 parent fd0ddf1 commit 7325bd5

File tree

181 files changed

+1183
-3370
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

181 files changed

+1183
-3370
lines changed
Binary file not shown.

Naxam.Mapbox.iOS/ApiDefinitions.cs

Lines changed: 213 additions & 21 deletions
Large diffs are not rendered by default.

Naxam.Mapbox.iOS/Naxam.Mapbox.iOS.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@
4444
<ObjcBindingCoreSource Include="StructsAndEnums.cs" />
4545
</ItemGroup>
4646
<ItemGroup>
47-
<NativeReference Include="..\sharpie\Binding\Mapbox.framework">
47+
<NativeReference Include="..\frameworks\Mapbox.framework">
4848
<Kind>Framework</Kind>
4949
<SmartLink>False</SmartLink>
5050
</NativeReference>

Naxam.Mapbox.iOS/Properties/AssemblyInfo.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
// Change them to the values specific to your project.
1414

1515
[assembly: AssemblyTitle("Naxam.Mapbox.iOS")]
16-
[assembly: AssemblyDescription("Xamarin binding library for Mapbox iOS SDK")]
16+
[assembly: AssemblyDescription("Xamarin.iOS binding library for Mapbox SDK")]
1717
[assembly: AssemblyConfiguration("")]
1818
[assembly: AssemblyCompany("NAXAM CO.,LTD")]
1919
[assembly: AssemblyProduct("X Bindings")]
@@ -25,8 +25,7 @@
2525
// The form "{Major}.{Minor}.*" will automatically update the build and revision,
2626
// and "{Major}.{Minor}.{Build}.*" will update just the revision.
2727

28-
[assembly: AssemblyVersion("3.6.0.3")]
29-
[assembly: AssemblyInformationalVersion("3.6.0.3")]
28+
[assembly: AssemblyVersion("3.7.0")]
3029

3130
// The following attributes are used to specify the signing key for the assembly,
3231
// if desired. See the Mono documentation for more information about signing.

Naxam.Mapbox.iOS/StructsAndEnums.cs

Lines changed: 82 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,71 @@
88

99
namespace Mapbox
1010
{
11+
[Native]
12+
public enum MGLIconAnchor : ulong
13+
{
14+
/**
15+
The center of the icon is placed closest to the anchor.
16+
*/
17+
Center,
18+
/**
19+
The left side of the icon is placed closest to the anchor.
20+
*/
21+
Left,
22+
/**
23+
The right side of the icon is placed closest to the anchor.
24+
*/
25+
Right,
26+
/**
27+
The top of the icon is placed closest to the anchor.
28+
*/
29+
Top,
30+
/**
31+
The bottom of the icon is placed closest to the anchor.
32+
*/
33+
Bottom,
34+
/**
35+
The top left corner of the icon is placed closest to the anchor.
36+
*/
37+
TopLeft,
38+
/**
39+
The top right corner of the icon is placed closest to the anchor.
40+
*/
41+
TopRight,
42+
/**
43+
The bottom left corner of the icon is placed closest to the anchor.
44+
*/
45+
BottomLeft,
46+
/**
47+
The bottom right corner of the icon is placed closest to the anchor.
48+
*/
49+
BottomRight,
50+
}
51+
[Native]
52+
public enum MGLIconPitchAlignment : ulong
53+
{
54+
/**
55+
The icon is aligned to the plane of the map.
56+
*/
57+
Map,
58+
/**
59+
The icon is aligned to the plane of the viewport.
60+
*/
61+
Viewport,
62+
/**
63+
Automatically matches the value of `iconRotationAlignment`.
64+
*/
65+
Auto,
66+
}
67+
68+
69+
[Native]
70+
public enum MGLCirclePitchAlignment : ulong
71+
{
72+
Map = 0,
73+
ViewPort
74+
}
75+
1176
[Native]
1277
public enum MGLAnnotationViewDragState : ulong
1378
{
@@ -26,7 +91,8 @@ public enum MGLErrorCode : long
2691
BadServerResponse = 2,
2792
ConnectionFailed = 3,
2893
ParseStyleFailed = 4,
29-
LoadStyleFailed = 5
94+
LoadStyleFailed = 5,
95+
SnapshotFailed = 6
3096
}
3197

3298
[Native]
@@ -73,17 +139,26 @@ public enum MGLCircleTranslationAnchor : ulong
73139
[StructLayout(LayoutKind.Sequential)]
74140
public struct MGLCoordinateSpan
75141
{
76-
public double latitudeDelta;
142+
public double LatitudeDelta;
77143

78-
public double longitudeDelta;
144+
public double LongitudeDelta;
145+
}
146+
147+
[StructLayout(LayoutKind.Sequential)]
148+
public struct MGLCoordinateQuad
149+
{
150+
public CLLocationCoordinate2D TopLeft;
151+
public CLLocationCoordinate2D TopRight;
152+
public CLLocationCoordinate2D BottomLeft;
153+
public CLLocationCoordinate2D BottomRight;
79154
}
80155

81156
[StructLayout(LayoutKind.Sequential)]
82157
public struct MGLCoordinateBounds
83158
{
84-
public CLLocationCoordinate2D sw;
159+
public CLLocationCoordinate2D Sw;
85160

86-
public CLLocationCoordinate2D ne;
161+
public CLLocationCoordinate2D Ne;
87162
}
88163

89164
[Native]
@@ -192,7 +267,8 @@ public enum MGLResourceKind : ulong
192267
Tile,
193268
Glyphs,
194269
SpriteImage,
195-
SpriteJSON
270+
SpriteJSON,
271+
Image
196272
}
197273

198274
[StructLayout(LayoutKind.Sequential)]

Naxam.Mapbox.sln

Lines changed: 4 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "nuget", "nuget", "{D8F96117
1212
mapbox-ios.nuspec = mapbox-ios.nuspec
1313
EndProjectSection
1414
EndProject
15-
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Naxam.Mapbox.Common", "Naxam.Mapbox.Common\Naxam.Mapbox.Common.csproj", "{A80B2873-6EAF-48A1-8445-2896815EFEE0}"
15+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "demo", "demo", "{22E7F713-BE34-4A11-939A-E358DA858995}"
1616
EndProject
1717
Global
1818
GlobalSection(SolutionConfigurationPlatforms) = preSolution
@@ -48,20 +48,11 @@ Global
4848
{3A2E7243-0208-4292-92B4-8C25F27B9843}.Release|iPhoneSimulator.Build.0 = Release|iPhoneSimulator
4949
{3A2E7243-0208-4292-92B4-8C25F27B9843}.Debug|iPhone.ActiveCfg = Debug|iPhone
5050
{3A2E7243-0208-4292-92B4-8C25F27B9843}.Debug|iPhone.Build.0 = Debug|iPhone
51-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
52-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Debug|Any CPU.Build.0 = Debug|Any CPU
53-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Release|Any CPU.ActiveCfg = Release|Any CPU
54-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Release|Any CPU.Build.0 = Release|Any CPU
55-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Debug|iPhoneSimulator.ActiveCfg = Debug|Any CPU
56-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Debug|iPhoneSimulator.Build.0 = Debug|Any CPU
57-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Release|iPhone.ActiveCfg = Release|Any CPU
58-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Release|iPhone.Build.0 = Release|Any CPU
59-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Release|iPhoneSimulator.ActiveCfg = Release|Any CPU
60-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Release|iPhoneSimulator.Build.0 = Release|Any CPU
61-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Debug|iPhone.ActiveCfg = Debug|Any CPU
62-
{A80B2873-6EAF-48A1-8445-2896815EFEE0}.Debug|iPhone.Build.0 = Debug|Any CPU
6351
EndGlobalSection
6452
GlobalSection(SolutionProperties) = preSolution
6553
HideSolutionNode = FALSE
6654
EndGlobalSection
55+
GlobalSection(NestedProjects) = preSolution
56+
{3A2E7243-0208-4292-92B4-8C25F27B9843} = {22E7F713-BE34-4A11-939A-E358DA858995}
57+
EndGlobalSection
6758
EndGlobal

README.md

Lines changed: 30 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,63 +1,46 @@
1-
# Xamarin Binding - Mapbox iOS SDK
1+
<img src="./art/repo_header.png" alt="Mapbox for Xamarin.iOS" width="728" />
22

3-
> This binding library is in internal verification and testing.
4-
> Any forks are warmly welcome to make it quicker and better.
3+
# Mapbox for Xamarin.iOS
4+
A Xamarin.iOS binding library for [Mapbox](https://www.mapbox.com/ios-sdk/) library.
55

6-
```
7-
Install-Package Naxam.Mapbox.iOS -Pre
8-
```
9-
10-
## Mapbox Access Token
11-
12-
An access token is necessary to use Mapbox services and APIs, such as maps, directions, and geocoding. Your access tokens can be managed in your account settings, where you can retrieve current tokens and generate new ones. You should create a new token for each of your apps, which will help you track usage and minimize disruption in the event a token needs to be revoked.
6+
## About
7+
This project is maintained by Naxam Co.,Ltd.<br>
8+
We specialize in developing mobile applications using Xamarin and native technology stack.<br>
139

14-
Visit http://mapbox.com to create an account and generate an access token.
10+
**Looking for developers for your project?**<br>
1511

16-
### Configure your iOS project
12+
<a href="mailto:tuyen@naxam.net">
13+
<img src="https://github.com/NAXAM/naxam.github.io/blob/master/assets/img/hire_button.png?raw=true" height="40"></a> <br>
1714

18-
Once you have generated an access token, you need to set it up within your app. There are two ways to provide an access token in your app:
15+
## Installation
1916

20-
1. In the Info.plist file set MGLMapboxAccessToken with the value of your token.
21-
2. In the AppDelegate.FinishedLaunching method, call AccountManager.AccessToken = "YOUR-TOKEN";
22-
23-
## Metrics Opt-Out
24-
25-
The Mapbox Terms of Service require your app to provide users with a way to individually opt out of Mapbox Metrics. You can provide this opt out in one of two ways:
26-
27-
1. Add a setting to your app’s section in the system Settings app (via a Settings.bundle in your application bundle). You can download a [sample Settings.bundle](https://www.mapbox.com/guides/data/ios/Settings.bundle.zip) file to help you implement this.
28-
2. Integrate the setting directly into your app. Hook the UISwitch control up to the MGLMapboxMetricsEnabled Boolean user default, which should be YES by default. Then set MGLMapboxMetricsEnabledSettingShownInApp to YES in your app’s Info.plist file.
17+
```
18+
Install-Package Naxam.Mapbox.iOS
19+
```
2920

30-
## Location Services
21+
## Usage
3122

32-
In order to show the user’s position on the map, you must first ask for their permission. In iOS 8 and above, this is accomplished by creating and setting the NSLocationAlwaysUsageDescription key in the Info.plist file.
23+
Plz follow the official guide [here](https://www.mapbox.com/ios-sdk/).
3324

34-
For developers on the free Starter plan, background location services must also be enabled. You can find instructions on how to do this in our First Steps guide.
25+
## License
3526

36-
## Add Nuget package
37-
```
38-
Install-Package Naxam.Mapbox.iOS
39-
```
27+
Mapbox binding library for iOS is released under the MIT license.
28+
See [LICENSE](./LICENSE) for details.
4029

41-
## Show it up
30+
# Get our showcases on AppStore/PlayStore
31+
Try our showcases to know more about our capabilities.
4232

43-
Creating a map is very simple using the MapView class:
33+
<a href="https://itunes.apple.com/us/developer/tuyen-vu/id1255432728/" >
34+
<img src="https://github.com/NAXAM/imagepicker-android-binding/raw/master/art/apple_store.png" width="117" height="34"></a>
4435

45-
```c#
46-
// Create a MapView and set the coordinates/zoom
47-
mapView = new MGLMapView (View.Bounds);
48-
mapView.SetCenterCoordinate (new CLLocationCoordinate2D (40.7326808, -73.9843407), false);
49-
mapView.SetZoomLevel (11, false);
36+
<a href="https://play.google.com/store/apps/developer?id=NAXAM+CO.,+LTD" >
37+
<img src="https://github.com/NAXAM/imagepicker-android-binding/raw/master/art/google_store.png" width="117" height="34"></a>
5038

51-
View.AddSubview (mapView);
52-
```
39+
Contact us if interested.
5340

54-
You can add annotations to your map like this:
41+
<a href="mailto:tuyen@naxam.net">
42+
<img src="https://github.com/NAXAM/naxam.github.io/blob/master/assets/img/hire_button.png" height="34"></a> <br>
43+
<br>
5544

56-
```
57-
// Add new annotation
58-
mapView.AddAnnotation (new MGLPointAnnotation {
59-
Coordinate = new CLLocationCoordinate2D (40.7326808, -73.9843407),
60-
Title = "Sample Marker",
61-
Subtitle = "This is the subtitle"
62-
});
63-
```
45+
Follow us for the latest updates<br>[![Twitter URL](https://img.shields.io/twitter/url/http/shields.io.svg?style=social)](https://twitter.com/intent/tweet?text=https://github.com/NAXAM/mapbox-ios-binding)
46+
[![Twitter Follow](https://img.shields.io/twitter/follow/naxamco.svg?style=social)](https://twitter.com/naxamco)

art/repo_header.png

46.1 KB
Loading
3.1 KB
Binary file not shown.

0 commit comments

Comments
 (0)