diff --git a/Assets/Adaptive Performance/AdaptivePerformanceGeneralSettings.asset b/Assets/Adaptive Performance/AdaptivePerformanceGeneralSettings.asset
index 95cc1d1..a60f715 100644
--- a/Assets/Adaptive Performance/AdaptivePerformanceGeneralSettings.asset
+++ b/Assets/Adaptive Performance/AdaptivePerformanceGeneralSettings.asset
@@ -13,7 +13,7 @@ MonoBehaviour:
m_Name: Android Settings
m_EditorClassIdentifier:
m_LoaderManagerInstance: {fileID: 5581875199608903843}
- m_InitManagerOnStart: 0
+ m_InitManagerOnStart: 1
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 2
@@ -43,4 +43,5 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_AutomaticLoading: 0
m_AutomaticRunning: 0
- m_Loaders: []
+ m_Loaders:
+ - {fileID: 11400000, guid: f08b21e1d44b2fa4c9057fa53f0fb7fe, type: 2}
diff --git a/Assets/Adaptive Performance/Provider.meta b/Assets/Adaptive Performance/Provider.meta
new file mode 100644
index 0000000..f6f7865
--- /dev/null
+++ b/Assets/Adaptive Performance/Provider.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 45170d2d138779945abc12011ba5b4a3
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Adaptive Performance/Provider/Samsung Android Provider Loader.asset b/Assets/Adaptive Performance/Provider/Samsung Android Provider Loader.asset
new file mode 100644
index 0000000..8d8e1bd
--- /dev/null
+++ b/Assets/Adaptive Performance/Provider/Samsung Android Provider Loader.asset
@@ -0,0 +1,14 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 2
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 12368ffd90e3c4ac4889486ab7b2aa78, type: 3}
+ m_Name: Samsung Android Provider Loader
+ m_EditorClassIdentifier:
diff --git a/Assets/Adaptive Performance/Provider/Samsung Android Provider Loader.asset.meta b/Assets/Adaptive Performance/Provider/Samsung Android Provider Loader.asset.meta
new file mode 100644
index 0000000..8fce164
--- /dev/null
+++ b/Assets/Adaptive Performance/Provider/Samsung Android Provider Loader.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: f08b21e1d44b2fa4c9057fa53f0fb7fe
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Adaptive Performance/Settings/Samsung Android Provider Settings.asset b/Assets/Adaptive Performance/Settings/Samsung Android Provider Settings.asset
new file mode 100644
index 0000000..1eddc1c
--- /dev/null
+++ b/Assets/Adaptive Performance/Settings/Samsung Android Provider Settings.asset
@@ -0,0 +1,318 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!114 &11400000
+MonoBehaviour:
+ m_ObjectHideFlags: 2
+ m_CorrespondingSourceObject: {fileID: 0}
+ m_PrefabInstance: {fileID: 0}
+ m_PrefabAsset: {fileID: 0}
+ m_GameObject: {fileID: 0}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 02a364304553d4fe797810bd5c88f9d8, type: 3}
+ m_Name: Samsung Android Provider Settings
+ m_EditorClassIdentifier:
+ m_Logging: 1
+ m_AutomaticPerformanceModeEnabled: 1
+ m_EnableBoostOnStartup: 1
+ m_StatsLoggingFrequencyInFrames: 50
+ m_IndexerSettings:
+ m_Active: 1
+ m_ThermalActionDelay: 10
+ m_PerformanceActionDelay: 4
+ m_ScalerSettings:
+ m_AdaptiveFramerate:
+ m_Name: Adaptive Framerate
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 2
+ m_Target: 7
+ m_MaxLevel: 45
+ m_MinBound: 15
+ m_MaxBound: 60
+ m_AdaptiveResolution:
+ m_Name: Adaptive Resolution
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 0
+ m_Target: 6
+ m_MaxLevel: 9
+ m_MinBound: 0.5
+ m_MaxBound: 1
+ m_AdaptiveBatching:
+ m_Name: Adaptive Batching
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 1
+ m_MaxLevel: 1
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveLOD:
+ m_Name: Adaptive LOD
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 2
+ m_Target: 2
+ m_MaxLevel: 3
+ m_MinBound: 0.4
+ m_MaxBound: 1
+ m_AdaptiveLut:
+ m_Name: Adaptive Lut
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 3
+ m_MaxLevel: 1
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveMSAA:
+ m_Name: Adaptive MSAA
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 6
+ m_MaxLevel: 2
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveShadowCascade:
+ m_Name: Adaptive Shadow Cascade
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 3
+ m_MaxLevel: 2
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveShadowDistance:
+ m_Name: Adaptive Shadow Distance
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 0
+ m_Target: 2
+ m_MaxLevel: 3
+ m_MinBound: 0.15
+ m_MaxBound: 1
+ m_AdaptiveShadowmapResolution:
+ m_Name: Adaptive Shadowmap Resolution
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 0
+ m_Target: 2
+ m_MaxLevel: 3
+ m_MinBound: 0.15
+ m_MaxBound: 1
+ m_AdaptiveShadowQuality:
+ m_Name: Adaptive Shadow Quality
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 2
+ m_Target: 3
+ m_MaxLevel: 3
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveSorting:
+ m_Name: Adaptive Sorting
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 1
+ m_MaxLevel: 1
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveTransparency:
+ m_Name: Adaptive Transparency
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 2
+ m_Target: 2
+ m_MaxLevel: 1
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveViewDistance:
+ m_Name: Adaptive View Distance
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 2
+ m_Target: 2
+ m_MaxLevel: 40
+ m_MinBound: 50
+ m_MaxBound: 1000
+ m_AdaptivePhysics:
+ m_Name: Adaptive Physics
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 0
+ m_Target: 1
+ m_MaxLevel: 5
+ m_MinBound: 0.5
+ m_MaxBound: 1
+ m_AdaptiveDecals:
+ m_Name: Adaptive Decals
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 2
+ m_MaxLevel: 20
+ m_MinBound: 0.01
+ m_MaxBound: 1
+ m_AdaptiveLayerCulling:
+ m_Name: Adaptive Layer Culling
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 1
+ m_MaxLevel: 40
+ m_MinBound: 0.01
+ m_MaxBound: 1
+ m_scalerProfileList:
+ - m_AdaptiveFramerate:
+ m_Name: Adaptive Framerate
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 2
+ m_Target: 7
+ m_MaxLevel: 45
+ m_MinBound: 15
+ m_MaxBound: 60
+ m_AdaptiveResolution:
+ m_Name: Adaptive Resolution
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 0
+ m_Target: 6
+ m_MaxLevel: 9
+ m_MinBound: 0.5
+ m_MaxBound: 1
+ m_AdaptiveBatching:
+ m_Name: Adaptive Batching
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 1
+ m_MaxLevel: 1
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveLOD:
+ m_Name: Adaptive LOD
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 2
+ m_Target: 2
+ m_MaxLevel: 3
+ m_MinBound: 0.4
+ m_MaxBound: 1
+ m_AdaptiveLut:
+ m_Name: Adaptive Lut
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 3
+ m_MaxLevel: 1
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveMSAA:
+ m_Name: Adaptive MSAA
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 6
+ m_MaxLevel: 2
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveShadowCascade:
+ m_Name: Adaptive Shadow Cascade
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 3
+ m_MaxLevel: 2
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveShadowDistance:
+ m_Name: Adaptive Shadow Distance
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 0
+ m_Target: 2
+ m_MaxLevel: 3
+ m_MinBound: 0.15
+ m_MaxBound: 1
+ m_AdaptiveShadowmapResolution:
+ m_Name: Adaptive Shadowmap Resolution
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 0
+ m_Target: 2
+ m_MaxLevel: 3
+ m_MinBound: 0.15
+ m_MaxBound: 1
+ m_AdaptiveShadowQuality:
+ m_Name: Adaptive Shadow Quality
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 2
+ m_Target: 3
+ m_MaxLevel: 3
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveSorting:
+ m_Name: Adaptive Sorting
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 1
+ m_MaxLevel: 1
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveTransparency:
+ m_Name: Adaptive Transparency
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 2
+ m_Target: 2
+ m_MaxLevel: 1
+ m_MinBound: 0
+ m_MaxBound: 1
+ m_AdaptiveViewDistance:
+ m_Name: Adaptive View Distance
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 2
+ m_Target: 2
+ m_MaxLevel: 40
+ m_MinBound: 50
+ m_MaxBound: 1000
+ m_AdaptivePhysics:
+ m_Name: Adaptive Physics
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 0
+ m_Target: 1
+ m_MaxLevel: 5
+ m_MinBound: 0.5
+ m_MaxBound: 1
+ m_AdaptiveDecals:
+ m_Name: Adaptive Decals
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 2
+ m_MaxLevel: 20
+ m_MinBound: 0.01
+ m_MaxBound: 1
+ m_AdaptiveLayerCulling:
+ m_Name: Adaptive Layer Culling
+ m_Enabled: 0
+ m_Scale: 1
+ m_VisualImpact: 1
+ m_Target: 1
+ m_MaxLevel: 40
+ m_MinBound: 0.01
+ m_MaxBound: 1
+ m_Name: Default Scaler Profile
+ m_DefaultScalerProfilerIndex: 0
+ k_AssetVersion: 2
+ m_SamsungProviderLogging: 0
+ m_HighSpeedVRR: 0
+ m_AutomaticVRR: 1
diff --git a/Assets/Adaptive Performance/Settings/Samsung Android Provider Settings.asset.meta b/Assets/Adaptive Performance/Settings/Samsung Android Provider Settings.asset.meta
new file mode 100644
index 0000000..4770420
--- /dev/null
+++ b/Assets/Adaptive Performance/Settings/Samsung Android Provider Settings.asset.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: b29825bfa8e0698458dc3e10b74d8966
+NativeFormatImporter:
+ externalObjects: {}
+ mainObjectFileID: 11400000
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/GPScontroller.cs b/Assets/GPScontroller.cs
index 009e0a3..c692eeb 100644
--- a/Assets/GPScontroller.cs
+++ b/Assets/GPScontroller.cs
@@ -60,7 +60,7 @@ void Update()
Quaternion compass = Quaternion.Euler(0, -Input.compass.magneticHeading, 0);
angle = (int)(getBearing(curr_pos, wanna_be) - compass.eulerAngles.y);
- compass_rect.SetPositionAndRotation(compass_rect.transform.position, Quaternion.Euler(0, 0, angle - 90));
+ compass_rect.SetPositionAndRotation(compass_rect.transform.position, Quaternion.Euler(60, 0, angle - 90));
rotat.text = compass.eulerAngles.y.ToString() + " : " + getBearing(curr_pos, wanna_be).ToString() + " : " + angle.ToString() + " : " + Input.compass.headingAccuracy.ToString(); ;
}
diff --git a/Assets/Mapbox.meta b/Assets/Mapbox.meta
new file mode 100644
index 0000000..7abfcfe
--- /dev/null
+++ b/Assets/Mapbox.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 3ea1e493e9ceb4c06bdaaeeacb2e4d7c
+folderAsset: yes
+timeCreated: 1480534607
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core.meta b/Assets/Mapbox/Core.meta
new file mode 100644
index 0000000..ec23c44
--- /dev/null
+++ b/Assets/Mapbox/Core.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 9baba017b10fa4eaeab33dade1902adb
+folderAsset: yes
+timeCreated: 1481925241
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins.meta b/Assets/Mapbox/Core/Plugins.meta
new file mode 100644
index 0000000..3489c7a
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 59e7e6a60c29840a5b9d84b2ee53671a
+folderAsset: yes
+timeCreated: 1491243030
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android.meta b/Assets/Mapbox/Core/Plugins/Android.meta
new file mode 100644
index 0000000..e4128b6
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: e191eb758d41cba41b7f997ada0d41eb
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission.meta b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission.meta
new file mode 100644
index 0000000..c581b47
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 4aa6de0d65164fe48a9b01246c856fc8
+folderAsset: yes
+timeCreated: 1521070590
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/AndroidManifest-uniRP.xml b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/AndroidManifest-uniRP.xml
new file mode 100644
index 0000000..4aa919a
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/AndroidManifest-uniRP.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/AndroidManifest-uniRP.xml.meta b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/AndroidManifest-uniRP.xml.meta
new file mode 100644
index 0000000..cb3e6e4
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/AndroidManifest-uniRP.xml.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9a957c06543b147a1b950f050282d728
+timeCreated: 1458403910
+licenseType: Free
+TextScriptImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.cs b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.cs
new file mode 100644
index 0000000..245b067
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.cs
@@ -0,0 +1,111 @@
+using System;
+using UnityEngine;
+
+public class UniAndroidPermission : MonoBehaviour
+{
+ const string PackageName = "net.sanukin.PermissionManager";
+
+ static Action onAllowCallback;
+ static Action onDenyCallback;
+ static Action onDenyAndNeverAskAgainCallback;
+
+ void Awake()
+ {
+ DontDestroyOnLoad(gameObject);
+ }
+
+ public static bool IsPermitted(AndroidPermission permission)
+ {
+#if !UNITY_EDITOR && UNITY_ANDROID
+ using (var permissionManager = new AndroidJavaClass(PackageName))
+ {
+ return permissionManager.CallStatic("hasPermission", GetPermittionStr(permission));
+ }
+#else
+ return true;
+#endif
+ }
+
+ public static void RequestPermission(AndroidPermission permission, Action onAllow = null, Action onDeny = null, Action onDenyAndNeverAskAgain = null)
+ {
+#if !UNITY_EDITOR && UNITY_ANDROID
+ using (var permissionManager = new AndroidJavaClass(PackageName))
+ {
+ permissionManager.CallStatic("requestPermission", GetPermittionStr(permission));
+ onAllowCallback = onAllow;
+ onDenyCallback = onDeny;
+ onDenyAndNeverAskAgainCallback = onDenyAndNeverAskAgain;
+ }
+#else
+ Debug.LogWarning("UniAndroidPermission works only Androud Devices.");
+#endif
+ }
+
+ private static string GetPermittionStr(AndroidPermission permittion)
+ {
+ return "android.permission." + permittion.ToString();
+ }
+
+ private void OnAllow()
+ {
+ if (onAllowCallback != null)
+ {
+ onAllowCallback();
+ }
+ ResetAllCallBacks();
+ }
+
+ private void OnDeny()
+ {
+ if (onDenyCallback != null)
+ {
+ onDenyCallback();
+ }
+ ResetAllCallBacks();
+ }
+
+ private void OnDenyAndNeverAskAgain()
+ {
+ if (onDenyAndNeverAskAgainCallback != null)
+ {
+ onDenyAndNeverAskAgainCallback();
+ }
+ ResetAllCallBacks();
+ }
+
+ private void ResetAllCallBacks(){
+ onAllowCallback = null;
+ onDenyCallback = null;
+ onDenyAndNeverAskAgainCallback = null;
+ }
+}
+
+// Protection level: dangerous permissions 2015/11/25
+// http://developer.android.com/intl/ja/reference/android/Manifest.permission.html
+public enum AndroidPermission
+{
+ ACCESS_COARSE_LOCATION,
+ ACCESS_FINE_LOCATION,
+ ADD_VOICEMAIL,
+ BODY_SENSORS,
+ CALL_PHONE,
+ CAMERA,
+ GET_ACCOUNTS,
+ PROCESS_OUTGOING_CALLS,
+ READ_CALENDAR,
+ READ_CALL_LOG,
+ READ_CONTACTS,
+ READ_EXTERNAL_STORAGE,
+ READ_PHONE_STATE,
+ READ_SMS,
+ RECEIVE_MMS,
+ RECEIVE_SMS,
+ RECEIVE_WAP_PUSH,
+ RECORD_AUDIO,
+ SEND_SMS,
+ USE_SIP,
+ WRITE_CALENDAR,
+ WRITE_CALL_LOG,
+ WRITE_CONTACTS,
+ WRITE_EXTERNAL_STORAGE
+}
diff --git a/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.cs.meta b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.cs.meta
new file mode 100644
index 0000000..245fad8
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7df6f555c4d344871bf935752b861a45
+timeCreated: 1448444718
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.prefab b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.prefab
new file mode 100644
index 0000000..ffbe304
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.prefab
@@ -0,0 +1,53 @@
+%YAML 1.1
+%TAG !u! tag:unity3d.com,2011:
+--- !u!1 &134968
+GameObject:
+ m_ObjectHideFlags: 0
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 100100000}
+ serializedVersion: 5
+ m_Component:
+ - component: {fileID: 408032}
+ - component: {fileID: 11480548}
+ m_Layer: 0
+ m_Name: UniAndroidPermission
+ m_TagString: Untagged
+ m_Icon: {fileID: 0}
+ m_NavMeshLayer: 0
+ m_StaticEditorFlags: 0
+ m_IsActive: 1
+--- !u!4 &408032
+Transform:
+ m_ObjectHideFlags: 1
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 100100000}
+ m_GameObject: {fileID: 134968}
+ m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
+ m_LocalPosition: {x: 0, y: 0, z: 0}
+ m_LocalScale: {x: 1, y: 1, z: 1}
+ m_Children: []
+ m_Father: {fileID: 0}
+ m_RootOrder: 0
+ m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
+--- !u!114 &11480548
+MonoBehaviour:
+ m_ObjectHideFlags: 1
+ m_PrefabParentObject: {fileID: 0}
+ m_PrefabInternal: {fileID: 100100000}
+ m_GameObject: {fileID: 134968}
+ m_Enabled: 1
+ m_EditorHideFlags: 0
+ m_Script: {fileID: 11500000, guid: 7df6f555c4d344871bf935752b861a45, type: 3}
+ m_Name:
+ m_EditorClassIdentifier:
+--- !u!1001 &100100000
+Prefab:
+ m_ObjectHideFlags: 1
+ serializedVersion: 2
+ m_Modification:
+ m_TransformParent: {fileID: 0}
+ m_Modifications: []
+ m_RemovedComponents: []
+ m_ParentPrefab: {fileID: 0}
+ m_RootGameObject: {fileID: 134968}
+ m_IsPrefabParent: 1
diff --git a/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.prefab.meta b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.prefab.meta
new file mode 100644
index 0000000..0e191e2
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission.prefab.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: a83b9ab9f1dc0439fa3caaf9912be67d
+timeCreated: 1448447048
+licenseType: Pro
+NativeFormatImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission_v1_2.jar b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission_v1_2.jar
new file mode 100644
index 0000000..e8e9374
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission_v1_2.jar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission_v1_2.jar.meta b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission_v1_2.jar.meta
new file mode 100644
index 0000000..43c98c7
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/UniAndroidPermission/UniAndroidPermission_v1_2.jar.meta
@@ -0,0 +1,31 @@
+fileFormatVersion: 2
+guid: d6467263296c74b919030e7bfae469ca
+timeCreated: 1516304615
+licenseType: Pro
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/animated-vector-drawable-25.1.0.aar b/Assets/Mapbox/Core/Plugins/Android/animated-vector-drawable-25.1.0.aar
new file mode 100644
index 0000000..f4681db
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/animated-vector-drawable-25.1.0.aar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/animated-vector-drawable-25.1.0.aar.meta b/Assets/Mapbox/Core/Plugins/Android/animated-vector-drawable-25.1.0.aar.meta
new file mode 100644
index 0000000..483f6e8
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/animated-vector-drawable-25.1.0.aar.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 8dfdf5ea5fe324ed1bc8d2be7c19fae5
+timeCreated: 1495653440
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings: {}
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/appcompat-v7-25.1.0.aar b/Assets/Mapbox/Core/Plugins/Android/appcompat-v7-25.1.0.aar
new file mode 100644
index 0000000..e28d367
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/appcompat-v7-25.1.0.aar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/appcompat-v7-25.1.0.aar.meta b/Assets/Mapbox/Core/Plugins/Android/appcompat-v7-25.1.0.aar.meta
new file mode 100644
index 0000000..41e0e9c
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/appcompat-v7-25.1.0.aar.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 73194dfc41e074142a2b6f12dbc17753
+timeCreated: 1495651291
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings: {}
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/gson-2.8.5.jar b/Assets/Mapbox/Core/Plugins/Android/gson-2.8.5.jar
new file mode 100644
index 0000000..0d5baf3
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/gson-2.8.5.jar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/gson-2.8.5.jar.meta b/Assets/Mapbox/Core/Plugins/Android/gson-2.8.5.jar.meta
new file mode 100644
index 0000000..76d6bb7
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/gson-2.8.5.jar.meta
@@ -0,0 +1,31 @@
+fileFormatVersion: 2
+guid: 722d3995c52ed44d5b6e94102a354ae5
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/libcore-release.aar b/Assets/Mapbox/Core/Plugins/Android/libcore-release.aar
new file mode 100644
index 0000000..e40f9f1
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/libcore-release.aar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/libcore-release.aar.meta b/Assets/Mapbox/Core/Plugins/Android/libcore-release.aar.meta
new file mode 100644
index 0000000..d087230
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/libcore-release.aar.meta
@@ -0,0 +1,31 @@
+fileFormatVersion: 2
+guid: 042faa3fe836242dd9534732f1a4214d
+timeCreated: 1570582048
+licenseType: Pro
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/libtelemetry-full-release.aar b/Assets/Mapbox/Core/Plugins/Android/libtelemetry-full-release.aar
new file mode 100644
index 0000000..11d6cdf
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/libtelemetry-full-release.aar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/libtelemetry-full-release.aar.meta b/Assets/Mapbox/Core/Plugins/Android/libtelemetry-full-release.aar.meta
new file mode 100644
index 0000000..571d620
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/libtelemetry-full-release.aar.meta
@@ -0,0 +1,31 @@
+fileFormatVersion: 2
+guid: 49ff07903ab144ea4b84e994f55f875b
+timeCreated: 1570582048
+licenseType: Pro
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/okhttp-3.8.0.jar b/Assets/Mapbox/Core/Plugins/Android/okhttp-3.8.0.jar
new file mode 100644
index 0000000..5019d2f
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/okhttp-3.8.0.jar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/okhttp-3.8.0.jar.meta b/Assets/Mapbox/Core/Plugins/Android/okhttp-3.8.0.jar.meta
new file mode 100644
index 0000000..363a95a
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/okhttp-3.8.0.jar.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 62c5caa5230134240a6fdc0f7852937b
+timeCreated: 1495631325
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ enabled: 0
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/okio-1.13.0.jar b/Assets/Mapbox/Core/Plugins/Android/okio-1.13.0.jar
new file mode 100644
index 0000000..02c302f
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/okio-1.13.0.jar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/okio-1.13.0.jar.meta b/Assets/Mapbox/Core/Plugins/Android/okio-1.13.0.jar.meta
new file mode 100644
index 0000000..7817564
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/okio-1.13.0.jar.meta
@@ -0,0 +1,23 @@
+fileFormatVersion: 2
+guid: 3bf40023b8d50c0438abda790c4fc791
+timeCreated: 1495640456
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ enabled: 0
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-compat-25.1.0.aar b/Assets/Mapbox/Core/Plugins/Android/support-compat-25.1.0.aar
new file mode 100644
index 0000000..8d19b2a
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/support-compat-25.1.0.aar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-compat-25.1.0.aar.meta b/Assets/Mapbox/Core/Plugins/Android/support-compat-25.1.0.aar.meta
new file mode 100644
index 0000000..4cbade9
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/support-compat-25.1.0.aar.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: e17a471b7620c4bfea1b492c6dc05b6a
+timeCreated: 1495653735
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings: {}
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-core-ui-25.1.0.aar b/Assets/Mapbox/Core/Plugins/Android/support-core-ui-25.1.0.aar
new file mode 100644
index 0000000..a1d7215
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/support-core-ui-25.1.0.aar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-core-ui-25.1.0.aar.meta b/Assets/Mapbox/Core/Plugins/Android/support-core-ui-25.1.0.aar.meta
new file mode 100644
index 0000000..3e4b88f
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/support-core-ui-25.1.0.aar.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 039af650ac259437e8c7929c7ee6728f
+timeCreated: 1495653813
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings: {}
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-core-utils-25.1.0.aar b/Assets/Mapbox/Core/Plugins/Android/support-core-utils-25.1.0.aar
new file mode 100644
index 0000000..a911789
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/support-core-utils-25.1.0.aar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-core-utils-25.1.0.aar.meta b/Assets/Mapbox/Core/Plugins/Android/support-core-utils-25.1.0.aar.meta
new file mode 100644
index 0000000..793e890
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/support-core-utils-25.1.0.aar.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: f2bbfd04df8ed4471b7d29d26096ede5
+timeCreated: 1495653777
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings: {}
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-media-compat-25.1.0.aar b/Assets/Mapbox/Core/Plugins/Android/support-media-compat-25.1.0.aar
new file mode 100644
index 0000000..a38752b
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/support-media-compat-25.1.0.aar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-media-compat-25.1.0.aar.meta b/Assets/Mapbox/Core/Plugins/Android/support-media-compat-25.1.0.aar.meta
new file mode 100644
index 0000000..10e85c1
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/support-media-compat-25.1.0.aar.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: e5800669c4138443ab05c67805c05d5a
+timeCreated: 1495653736
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings: {}
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-v4-25.1.0.aar b/Assets/Mapbox/Core/Plugins/Android/support-v4-25.1.0.aar
new file mode 100644
index 0000000..f1e1c0b
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/support-v4-25.1.0.aar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-v4-25.1.0.aar.meta b/Assets/Mapbox/Core/Plugins/Android/support-v4-25.1.0.aar.meta
new file mode 100644
index 0000000..e702acd
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/support-v4-25.1.0.aar.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: bbcd24fa0afca44758499ceab55cf537
+timeCreated: 1495654023
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings: {}
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-vector-drawable-25.1.0.aar b/Assets/Mapbox/Core/Plugins/Android/support-vector-drawable-25.1.0.aar
new file mode 100644
index 0000000..55a459b
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Android/support-vector-drawable-25.1.0.aar differ
diff --git a/Assets/Mapbox/Core/Plugins/Android/support-vector-drawable-25.1.0.aar.meta b/Assets/Mapbox/Core/Plugins/Android/support-vector-drawable-25.1.0.aar.meta
new file mode 100644
index 0000000..baf30f6
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Android/support-vector-drawable-25.1.0.aar.meta
@@ -0,0 +1,24 @@
+fileFormatVersion: 2
+guid: 189b15356a17c426097dc0cdedbdfb13
+timeCreated: 1495653440
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings: {}
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox.meta b/Assets/Mapbox/Core/Plugins/Mapbox.meta
new file mode 100644
index 0000000..0d769c9
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2a5f99af2ce83514f822383e20066c54
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts.meta b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts.meta
new file mode 100644
index 0000000..53df8ad
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 379fde954e5274342ba547171ed89a78
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net35.meta b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net35.meta
new file mode 100644
index 0000000..b9f880e
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net35.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: f957f1079856147339d60a82ed5500b5
+folderAsset: yes
+timeCreated: 1567722208
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net35/MapboxAccountsUnity.dll b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net35/MapboxAccountsUnity.dll
new file mode 100644
index 0000000..f683315
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net35/MapboxAccountsUnity.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net35/MapboxAccountsUnity.dll.meta b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net35/MapboxAccountsUnity.dll.meta
new file mode 100644
index 0000000..44494f5
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net35/MapboxAccountsUnity.dll.meta
@@ -0,0 +1,112 @@
+fileFormatVersion: 2
+guid: a4d62bb9038704a8c84da77840aa84d1
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 0
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 1
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ AddToEmbeddedBinaries: false
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net4x.meta b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net4x.meta
new file mode 100644
index 0000000..7cc0e7b
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net4x.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: cc3724da731c645189d6f773016d164e
+folderAsset: yes
+timeCreated: 1567722324
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net4x/MapboxAccountsUnity.dll b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net4x/MapboxAccountsUnity.dll
new file mode 100644
index 0000000..dd44c12
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net4x/MapboxAccountsUnity.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net4x/MapboxAccountsUnity.dll.meta b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net4x/MapboxAccountsUnity.dll.meta
new file mode 100644
index 0000000..83c0158
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/MapboxAccounts/net4x/MapboxAccountsUnity.dll.meta
@@ -0,0 +1,116 @@
+fileFormatVersion: 2
+guid: 8d4cadd22d7994af2ae2a249b9d2a913
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 0
+ Exclude Editor: 1
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXUniversal: 0
+ Exclude WebGL: 0
+ Exclude Win: 0
+ Exclude Win64: 0
+ Exclude iOS: 0
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ WebGL: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ AddToEmbeddedBinaries: false
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs.meta
new file mode 100644
index 0000000..99e8e9d
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 5bf0a0cf94d3de74c8fe0a4ad76cfa8f
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46.meta
new file mode 100644
index 0000000..747a3b3
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: cf3b967d3d4405a4093e868e0440cf8a
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.ExtensionMethods.dll b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.ExtensionMethods.dll
new file mode 100644
index 0000000..9f27d27
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.ExtensionMethods.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.ExtensionMethods.dll.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.ExtensionMethods.dll.meta
new file mode 100644
index 0000000..7051eef
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.ExtensionMethods.dll.meta
@@ -0,0 +1,110 @@
+fileFormatVersion: 2
+guid: c864373fac3727545b44f740cc59abab
+timeCreated: 18446744011573954816
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 0
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXUniversal: 0
+ Exclude WebGL: 0
+ Exclude Win: 0
+ Exclude Win64: 0
+ Exclude WindowsStoreApps: 1
+ Exclude iOS: 0
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ WebGL: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.Geometry.dll b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.Geometry.dll
new file mode 100644
index 0000000..c63dd97
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.Geometry.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.Geometry.dll.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.Geometry.dll.meta
new file mode 100644
index 0000000..624d68c
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.Geometry.dll.meta
@@ -0,0 +1,110 @@
+fileFormatVersion: 2
+guid: 902ec3a15243ce7459db8517c8de3f12
+timeCreated: 18446744011573954816
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 0
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXUniversal: 0
+ Exclude WebGL: 0
+ Exclude Win: 0
+ Exclude Win64: 0
+ Exclude WindowsStoreApps: 1
+ Exclude iOS: 0
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ WebGL: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.PbfReader.dll b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.PbfReader.dll
new file mode 100644
index 0000000..43a24a4
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.PbfReader.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.PbfReader.dll.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.PbfReader.dll.meta
new file mode 100644
index 0000000..fccb1a4
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.PbfReader.dll.meta
@@ -0,0 +1,110 @@
+fileFormatVersion: 2
+guid: 34fcb52f9df13934786c32587147e4a0
+timeCreated: 18446744011573954816
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 0
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXUniversal: 0
+ Exclude WebGL: 0
+ Exclude Win: 0
+ Exclude Win64: 0
+ Exclude WindowsStoreApps: 1
+ Exclude iOS: 0
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ WebGL: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.VectorTileReader.dll b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.VectorTileReader.dll
new file mode 100644
index 0000000..bc1e8ff
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.VectorTileReader.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.VectorTileReader.dll.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.VectorTileReader.dll.meta
new file mode 100644
index 0000000..58dd434
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.VectorTileReader.dll.meta
@@ -0,0 +1,110 @@
+fileFormatVersion: 2
+guid: 57cd912f9e6427a44ac217871c381c40
+timeCreated: 18446744011573954816
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 0
+ Exclude Editor: 0
+ Exclude Linux: 0
+ Exclude Linux64: 0
+ Exclude LinuxUniversal: 0
+ Exclude OSXUniversal: 0
+ Exclude WebGL: 0
+ Exclude Win: 0
+ Exclude Win64: 0
+ Exclude WindowsStoreApps: 1
+ Exclude iOS: 0
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ - first:
+ WebGL: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10.meta
new file mode 100644
index 0000000..3c92cd2
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 97ce4689e1585a044b7e4dffd6bbc56c
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.ExtensionMethods.dll b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.ExtensionMethods.dll
new file mode 100644
index 0000000..918eb94
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.ExtensionMethods.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.ExtensionMethods.dll.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.ExtensionMethods.dll.meta
new file mode 100644
index 0000000..9957370
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.ExtensionMethods.dll.meta
@@ -0,0 +1,93 @@
+fileFormatVersion: 2
+guid: aa8511f503d809c42a273bde2c2f2021
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude WindowsStoreApps: 0
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.Geometry.dll b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.Geometry.dll
new file mode 100644
index 0000000..3f69e54
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.Geometry.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.Geometry.dll.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.Geometry.dll.meta
new file mode 100644
index 0000000..ca3f26e
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.Geometry.dll.meta
@@ -0,0 +1,105 @@
+fileFormatVersion: 2
+guid: 752172c26201c084c8526c6e9a837897
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude WindowsStoreApps: 0
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ DontProcess: false
+ PlaceholderPath: Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/net46/Mapbox.VectorTile.Geometry.dll
+ SDK: AnySDK
+ ScriptingBackend: AnyScriptingBackend
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.PbfReader.dll b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.PbfReader.dll
new file mode 100644
index 0000000..308efa4
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.PbfReader.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.PbfReader.dll.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.PbfReader.dll.meta
new file mode 100644
index 0000000..a261da2
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.PbfReader.dll.meta
@@ -0,0 +1,93 @@
+fileFormatVersion: 2
+guid: 11d5b9a726730e34ea222ff8e6b1def9
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude WindowsStoreApps: 0
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.VectorTileReader.dll b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.VectorTileReader.dll
new file mode 100644
index 0000000..ed33611
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.VectorTileReader.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.VectorTileReader.dll.meta b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.VectorTileReader.dll.meta
new file mode 100644
index 0000000..574e652
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/Mapbox/vector-tile-cs/portable-net45+uap10/Mapbox.VectorTile.VectorTileReader.dll.meta
@@ -0,0 +1,93 @@
+fileFormatVersion: 2
+guid: ea87c215fce9c204abdb685f22703bd0
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude WindowsStoreApps: 0
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty.meta b/Assets/Mapbox/Core/Plugins/ThirdParty.meta
new file mode 100644
index 0000000..848e350
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: c104ec983f3ab8449b282d2575d121be
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression.meta
new file mode 100644
index 0000000..467d11e
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d48f48be6a9fdf541a5f1be3255c1fab
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35.meta
new file mode 100644
index 0000000..695e390
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 24c715a612ec20a42a86ac2009f2abb7
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll
new file mode 100644
index 0000000..bc7328d
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll.mdb b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll.mdb
new file mode 100644
index 0000000..ac93506
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll.mdb differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll.mdb.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll.mdb.meta
new file mode 100644
index 0000000..0276adf
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll.mdb.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: ffdfdd9db619fcc47b48fad2e445b357
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll.meta
new file mode 100644
index 0000000..f00e32e
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.dll.meta
@@ -0,0 +1,133 @@
+fileFormatVersion: 2
+guid: 5702dec8310c4074e984765a688fa0d2
+timeCreated: 1489780328
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ data:
+ first:
+ Facebook: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 1
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ WebGL: WebGL
+ second:
+ enabled: 1
+ settings: {}
+ data:
+ first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.pdb b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.pdb
new file mode 100644
index 0000000..198842e
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.pdb differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.pdb.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.pdb.meta
new file mode 100644
index 0000000..294b944
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/net35/Mapbox.IO.Compression.pdb.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 15bea0e3925df0d479a6ca124c9a3774
+timeCreated: 1508486393
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10.meta
new file mode 100644
index 0000000..46e00ae
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: fcefe66a47d635d4e80cca2549f55493
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.dll b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.dll
new file mode 100644
index 0000000..cd7f7ba
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.dll.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.dll.meta
new file mode 100644
index 0000000..2962b55
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.dll.meta
@@ -0,0 +1,100 @@
+fileFormatVersion: 2
+guid: ce2a229872b27d142b0962c2e5e2ebc2
+timeCreated: 1490036479
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ data:
+ first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ data:
+ first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ data:
+ first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ data:
+ first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ data:
+ first:
+ Standalone: OSXIntel
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: OSXIntel64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ Windows Store Apps: WindowsStoreApps
+ second:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ first:
+ iPhone: iOS
+ second:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.pdb b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.pdb
new file mode 100644
index 0000000..99988f2
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.pdb differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.pdb.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.pdb.meta
new file mode 100644
index 0000000..12e30ca
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.IO.Compression/uap10/Mapbox.IO.Compression.pdb.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: afbf653d62ab51b4d992cd319bb39b99
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json.meta
new file mode 100644
index 0000000..05b8c31
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: bdaa6d5093c737940a8a9f76e2c9e5ce
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35.meta
new file mode 100644
index 0000000..07a6ae9
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: d1e6581f49522654daece42d507c423d
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll
new file mode 100644
index 0000000..4d03b8a
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll.mdb b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll.mdb
new file mode 100644
index 0000000..c23e92b
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll.mdb differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll.mdb.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll.mdb.meta
new file mode 100644
index 0000000..6b757c1
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll.mdb.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 9718acefc4a05354a83981a70b93a7cd
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll.meta
new file mode 100644
index 0000000..db44d22
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.dll.meta
@@ -0,0 +1,70 @@
+fileFormatVersion: 2
+guid: 5c4fdb215216a4b30aa29f0fa1b4ab1d
+timeCreated: 1489780328
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ platformData:
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ Linux:
+ enabled: 1
+ settings:
+ CPU: x86
+ Android:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ Linux64:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ LinuxUniversal:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXIntel:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXIntel64:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXUniversal:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ WebGL:
+ enabled: 1
+ settings: {}
+ Win:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ Win64:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ WindowsStoreApps:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ iOS:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.pdb b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.pdb
new file mode 100644
index 0000000..ae08158
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.pdb differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.pdb.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.pdb.meta
new file mode 100644
index 0000000..eac1fa3
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Net35/Mapbox.Json.pdb.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: f25c8a0e04e4ba24a9b4943833904d78
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable.meta
new file mode 100644
index 0000000..db5cca2
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 21756548d9556494f90734f953cd7fcf
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll
new file mode 100644
index 0000000..1e140a0
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll.mdb b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll.mdb
new file mode 100644
index 0000000..72a45a6
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll.mdb differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll.mdb.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll.mdb.meta
new file mode 100644
index 0000000..ae34dc5
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll.mdb.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 7390d38240d85e14883b2a17dd1b8c15
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll.meta
new file mode 100644
index 0000000..f530498
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.dll.meta
@@ -0,0 +1,55 @@
+fileFormatVersion: 2
+guid: 17a28c5bac36f4e7bbf6e500e16cf2f3
+timeCreated: 1490036479
+licenseType: Pro
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ platformData:
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ Linux:
+ enabled: 0
+ settings:
+ CPU: x86
+ Linux64:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ OSXIntel:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ OSXIntel64:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ Win:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ Win64:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ WindowsStoreApps:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ iOS:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.pdb b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.pdb
new file mode 100644
index 0000000..83e2825
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.pdb differ
diff --git a/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.pdb.meta b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.pdb.meta
new file mode 100644
index 0000000..6488f2a
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/ThirdParty/Mapbox.Json/Portable/Mapbox.Json.pdb.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: bf11d9a665ca3594e9f4eb14fe8c1b79
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS.meta b/Assets/Mapbox/Core/Plugins/iOS.meta
new file mode 100644
index 0000000..6591da8
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9e8a419c652caf246ad3b669af2971f6
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMetricsClient.m b/Assets/Mapbox/Core/Plugins/iOS/MapboxMetricsClient.m
new file mode 100644
index 0000000..cb5ed5c
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMetricsClient.m
@@ -0,0 +1,18 @@
+#import
+
+void initialize(const char* accessToken, const char* userAgentBase, const char* hostSDKVersion) {
+ [[MMEEventsManager sharedManager] initializeWithAccessToken:[NSString stringWithUTF8String:accessToken]
+ userAgentBase:[NSString stringWithUTF8String:userAgentBase]
+ hostSDKVersion:[NSString stringWithUTF8String:hostSDKVersion]];
+}
+
+void sendTurnstileEvent() {
+ [[MMEEventsManager sharedManager] sendTurnstileEvent];
+}
+
+void setLocationCollectionState(bool enable) {
+ [MMEEventsManager sharedManager].metricsEnabled = enable;
+}
+void setSkuId(const char* skuId){
+ [MMEEventsManager sharedManager].skuId = [NSString stringWithUTF8String:skuId];
+}
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMetricsClient.m.meta b/Assets/Mapbox/Core/Plugins/iOS/MapboxMetricsClient.m.meta
new file mode 100644
index 0000000..30936fb
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMetricsClient.m.meta
@@ -0,0 +1,26 @@
+fileFormatVersion: 2
+guid: 4172b185b7b5c4f4ab2f6d7bd134ea29
+timeCreated: 1495158819
+licenseType: Free
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ platformData:
+ Editor:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ data:
+ enabled: 0
+ settings: {}
+ iOS:
+ enabled: 1
+ settings: {}
+ tvOS:
+ enabled: 1
+ settings: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents.meta b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents.meta
new file mode 100644
index 0000000..3158b41
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 3fd6399794525486eb643e088be91043
+folderAsset: yes
+timeCreated: 1570559658
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include.meta b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include.meta
new file mode 100644
index 0000000..38bd597
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: e7e2d4a394d304e08bdabe8230a7df35
+folderAsset: yes
+timeCreated: 1570559763
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents.meta b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents.meta
new file mode 100644
index 0000000..71f9c92
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 942001b48b74c4874a534a287e791e27
+folderAsset: yes
+timeCreated: 1570559763
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEConstants.h b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEConstants.h
new file mode 100644
index 0000000..a3f3b3d
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEConstants.h
@@ -0,0 +1,197 @@
+#import
+#import "MMETypes.h"
+
+extern NSString * const MMEAPIClientBaseURL;
+extern NSString * const MMEAPIClientBaseAPIURL;
+extern NSString * const MMEAPIClientBaseChinaEventsURL;
+extern NSString * const MMEAPIClientBaseChinaAPIURL;
+extern NSString * const MMEAPIClientEventsPath;
+extern NSString * const MMEAPIClientEventsConfigPath;
+extern NSString * const MMEAPIClientAttachmentsPath;
+extern NSString * const MMEAPIClientHeaderFieldUserAgentKey;
+extern NSString * const MMEAPIClientHeaderFieldContentTypeKey;
+extern NSString * const MMEAPIClientHeaderFieldContentTypeValue;
+extern NSString * const MMEAPIClientAttachmentsHeaderFieldContentTypeValue;
+extern NSString * const MMEAPIClientHeaderFieldContentEncodingKey;
+extern NSString * const MMEAPIClientHTTPMethodPost;
+extern NSString * const MMEAPIClientHTTPMethodGet;
+
+// Debug types
+extern NSString * const MMEDebugEventType;
+extern NSString * const MMEDebugEventTypeError;
+extern NSString * const MMEDebugEventTypeFlush;
+extern NSString * const MMEDebugEventTypePush;
+extern NSString * const MMEDebugEventTypePost;
+extern NSString * const MMEDebugEventTypePostFailed;
+extern NSString * const MMEDebugEventTypeTurnstile;
+extern NSString * const MMEDebugEventTypeTurnstileFailed;
+extern NSString * const MMEDebugEventTypeBackgroundTask;
+extern NSString * const MMEDebugEventTypeMetricCollection;
+extern NSString * const MMEDebugEventTypeLocationManager;
+extern NSString * const MMEDebugEventTypeTelemetryMetrics;
+extern NSString * const MMEDebugEventTypeCertPinning;
+
+// Event types
+extern NSString * const MMEEventTypeAppUserTurnstile;
+extern NSString * const MMEEventTypeTelemetryMetrics;
+extern NSString * const MMEEventTypeMapLoad;
+extern NSString * const MMEEventTypeLocation;
+extern NSString * const MMEEventTypeVisit;
+extern NSString * const MMEEventTypeLocalDebug;
+extern NSString * const MMEventTypeOfflineDownloadStart;
+extern NSString * const MMEventTypeOfflineDownloadEnd;
+
+// Event keys
+extern NSString * const MMEEventKeyArrivalDate;
+extern NSString * const MMEEventKeyDepartureDate;
+extern NSString * const MMEEventKeyLatitude;
+extern NSString * const MMEEventKeyLongitude;
+extern NSString * const MMEEventKeyZoomLevel;
+extern NSString * const MMEEventKeyMaxZoomLevel;
+extern NSString * const MMEEventKeyMinZoomLevel;
+extern NSString * const MMEEventKeyEvent;
+extern NSString * const MMEEventKeyCreated;
+extern NSString * const MMEEventKeyStyleURL;
+extern NSString * const MMEEventKeyVendorId;
+extern NSString * const MMEEventKeyModel;
+extern NSString * const MMEEventKeyDevice;
+extern NSString * const MMEEventKeySkuId;
+extern NSString * const MMEEventKeyEnabledTelemetry;
+extern NSString * const MMEEventKeyOperatingSystem;
+extern NSString * const MMEEventKeyResolution;
+extern NSString * const MMEEventKeyAccessibilityFontScale;
+extern NSString * const MMEEventKeyOrientation;
+extern NSString * const MMEEventKeyPluggedIn;
+extern NSString * const MMEEventKeyWifi;
+extern NSString * const MMEEventKeyShapeForOfflineRegion;
+extern NSString * const MMEEventKeySource;
+extern NSString * const MMEEventKeySessionId;
+extern NSString * const MMEEventKeyApplicationState;
+extern NSString * const MMEEventKeyAltitude;
+extern NSString * const MMEEventKeyLocationAuthorization;
+extern NSString * const MMEEventKeyLocationEnabled;
+extern NSString * const MMEEventHorizontalAccuracy;
+extern NSString * const MMEEventSDKIdentifier;
+extern NSString * const MMEEventSDKVersion;
+extern NSString * const MMEEventKeyLocalDebugDescription;
+extern NSString * const MMEEventKeyErrorCode;
+extern NSString * const MMEEventKeyErrorDomain;
+extern NSString * const MMEEventKeyErrorDescription;
+extern NSString * const MMEEventKeyErrorFailureReason;
+extern NSString * const MMEEventKeyErrorNoReason;
+extern NSString * const MMEEventKeyErrorNoDomain;
+extern NSString * const MMEEventKeyFailedRequests;
+extern NSString * const MMEEventKeyHeader;
+extern NSString * const MMEEventKeyPlatform;
+extern NSString * const MMEEventKeyUserAgent;
+extern NSString * const MMEEventKeyiOS;
+extern NSString * const MMEEventKeyMac;
+extern NSString * const MMENavigationEventPrefix;
+extern NSString * const MMEVisionEventPrefix;
+extern NSString * const MMEEventTypeNavigationDepart;
+extern NSString * const MMEEventTypeNavigationArrive;
+extern NSString * const MMEEventTypeNavigationCancel;
+extern NSString * const MMEEventTypeNavigationFeedback;
+extern NSString * const MMEEventTypeNavigationReroute;
+extern NSString * const MMEventTypeNavigationCarplayConnect;
+extern NSString * const MMEventTypeNavigationCarplayDisconnect;
+extern NSString * const MMEEventTypeSearchSelected;
+extern NSString * const MMEEventTypeSearchFeedback;
+extern NSString * const MMESearchEventPrefix;
+extern NSString * const MMEEventDateUTC;
+extern NSString * const MMEEventRequests;
+extern NSString * const MMEEventTotalDataSent;
+extern NSString * const MMEEventCellDataSent;
+extern NSString * const MMEEventWiFiDataSent;
+extern NSString * const MMEEventTotalDataReceived;
+extern NSString * const MMEEventCellDataReceived;
+extern NSString * const MMEEventWiFiDataReceived;
+extern NSString * const MMEEventAppWakeups;
+extern NSString * const MMEEventEventCountPerType;
+extern NSString * const MMEEventEventCountFailed;
+extern NSString * const MMEEventEventCountTotal;
+extern NSString * const MMEEventEventCountMax;
+extern NSString * const MMEEventDeviceLat;
+extern NSString * const MMEEventDeviceLon;
+extern NSString * const MMEEventDeviceTimeDrift;
+extern NSString * const MMEEventConfigResponse;
+extern NSString * const MMEEventStatusDenied;
+extern NSString * const MMEEventStatusRestricted;
+extern NSString * const MMEEventStatusNotDetermined;
+extern NSString * const MMEEventStatusAuthorizedAlways;
+extern NSString * const MMEEventStatusAuthorizedWhenInUse;
+extern NSString * const MMEEventUnknown;
+
+extern NSString * const MMEResponseKey;
+
+/*! @brief SDK event source */
+extern NSString * const MMEEventSource;
+
+#pragma mark - mobile.crash Keys
+
+extern NSString * const MMEEventMobileCrash;
+extern NSString * const MMEEventKeyOSVersion;
+extern NSString * const MMEEventKeyBuildType;
+extern NSString * const MMEEventKeyIsSilentCrash;
+extern NSString * const MMEEventKeyStackTrace;
+extern NSString * const MMEEventKeyStackTraceHash;
+extern NSString * const MMEEventKeyInstallationId;
+extern NSString * const MMEEventKeyThreadDetails;
+extern NSString * const MMEEventKeyAppId;
+extern NSString * const MMEEventKeyAppVersion;
+extern NSString * const MMEEventKeyAppStartDate;
+extern NSString * const MMEEventKeyCustomData;
+
+#pragma mark - MMEErrorDomain
+
+/*! @brief NSErrorDomain for MapboxMobileEvents */
+extern NSErrorDomain const MMEErrorDomain;
+
+/*! @brief MMEErrorDomain Error Numbers
+ - MMENoError: No Error
+ - MMEErrorException for exceptions
+ - MMEErrorEventInit for errors when initlizing events
+ - MMEErrorEventInitMissingKey if the event attributes dictionary does not include the event key,
+ - MMEErrorEventInitException if an exception occured durring initWithAttributes:error:,
+ - MMEErrorEventInitInvalid if the provided eventAttributes cannot be converted to JSON objects
+*/
+typedef NS_ENUM(NSInteger, MMEErrorNumber) {
+ MMENoError = 0,
+ MMEErrorException = 10001,
+ MMEErrorEventInit = 10002,
+ MMEErrorEventInitMissingKey = 10003,
+ MMEErrorEventInitException = 10004,
+ MMEErrorEventInitInvalid = 10005,
+ MMEErrorEventEncoding = 10006,
+ MMEErrorEventCounting = 10007
+};
+
+/*! @brief key for MMEErrorEventInit userInfo dictionary containing the attributes which failed to create the event */
+extern NSString * const MMEErrorEventAttributesKey;
+
+/*! @brief key for MMEErrorDomain userInfo dictionary containing the underlying exception which triggered the error */
+extern NSString * const MMEErrorUnderlyingExceptionKey;
+
+#pragma mark - Deprecated
+
+extern NSString * const MMEErrorDescriptionKey; MME_DEPRECATED_MSG("Use NSLocalizedDescriptionKey")
+
+extern NSString * const MMEEventKeyVendorID MME_DEPRECATED_MSG("Use MMEEventKeyVendorId");
+extern NSString * const MMEEventKeyInstallationID MME_DEPRECATED_MSG("Use MMEEventKeyInstallationId");
+extern NSString * const MMEEventKeyAppID MME_DEPRECATED_MSG("Use MMEEventKeyInstallationId");
+
+extern NSString * const MMELoggerHTML MME_DEPRECATED;
+extern NSString * const MMELoggerShareableHTML MME_DEPRECATED;
+
+extern NSString * const MMEEventKeyGestureId MME_DEPRECATED;
+extern NSString * const MMEEventKeyGestureID MME_DEPRECATED;
+extern NSString * const MMEEventGestureSingleTap MME_DEPRECATED;
+extern NSString * const MMEEventGestureDoubleTap MME_DEPRECATED;
+extern NSString * const MMEEventGestureTwoFingerSingleTap MME_DEPRECATED;
+extern NSString * const MMEEventGestureQuickZoom MME_DEPRECATED;
+extern NSString * const MMEEventGesturePanStart MME_DEPRECATED;
+extern NSString * const MMEEventGesturePinchStart MME_DEPRECATED;
+extern NSString * const MMEEventGestureRotateStart MME_DEPRECATED;
+extern NSString * const MMEEventGesturePitchStart MME_DEPRECATED;
+extern NSString * const MMEEventTypeMapTap MME_DEPRECATED;
+extern NSString * const MMEEventTypeMapDragEnd MME_DEPRECATED;
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEConstants.h.meta b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEConstants.h.meta
new file mode 100644
index 0000000..5d663a6
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEConstants.h.meta
@@ -0,0 +1,26 @@
+fileFormatVersion: 2
+guid: 6718394795f184698a40cb2aaeb50e0f
+timeCreated: 1570560566
+licenseType: Pro
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEvent.h b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEvent.h
new file mode 100644
index 0000000..d2a85e4
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEvent.h
@@ -0,0 +1,172 @@
+#import
+#import "MMETypes.h"
+
+NS_ASSUME_NONNULL_BEGIN
+
+@class MMECommonEventData;
+
+/*! @brief represents a telemetry event, with a name, date and attributes */
+@interface MMEEvent : NSObject
+
+/*! @brief date on which the event occured - MMEEventKeyDateCreated */
+@property (nonatomic, readonly, copy) NSDate *date;
+
+/*! @brief name of the event, from MMEConstants.h - MMEEventKeyEvent */
+@property (nonatomic, readonly, copy) NSString *name;
+
+/*! @brief attributes of the event, a dictionary for which [NSJSONSerialization isValidJSONObject:] returns YES */
+@property (nonatomic, readonly, copy) NSDictionary *attributes;
+
+/*! @brief Designated Initilizer for events
+ @param eventAttributes attributes of the event
+ @param error present if the event could not be created with the properties provided
+ @return a new event with the date, name and attributes provided
+*/
+- (instancetype)initWithAttributes:(NSDictionary *)eventAttributes error:(NSError **)error NS_DESIGNATED_INITIALIZER;
+
+#pragma mark - Generic Events
+
+/*! @brief eventWithAttributes: - initilization errors are reported to the EventsManagerDelegate
+ @param attributes attrs
+ @return event
+*/
++ (instancetype)eventWithAttributes:(NSDictionary *)attributes;
+
+/*! @brief eventWithAttributes: - initilization errors are reported to the EventsManagerDelegate
+ @param attributes attrs
+ @return event
+*/
++ (instancetype)eventWithAttributes:(NSDictionary *)attributes error:(NSError **)error;
+
+#pragma mark - Custom Events
+
+/*! @brief turnstileEventWithAttributes:
+ @param attributes event attrs
+ @return turnstile event
+*/
++ (instancetype)turnstileEventWithAttributes:(NSDictionary *)attributes;
+
+/*! @brief visitEventWithAttributes:
+ @param attributes attrs
+ @return event
+*/
++ (instancetype)visitEventWithAttributes:(NSDictionary *)attributes;
+
+#pragma mark - Crash Events
+
+/*! @brief crashEventReporting:error:
+ @param eventsError error to report
+ @param createError pointer to an error creating the report
+ @return event
+*/
++ (instancetype)crashEventReporting:(NSError *)eventsError error:(NSError **)createError;
+
+#pragma mark - Debug Devents
+
+/*! @brief debugEventWithAttributes: debug logging event with attributes provided
+ @param attributes attrs
+ @return event
+*/
++ (instancetype)debugEventWithAttributes:(NSDictionary *)attributes MME_DEPRECATED;
+
+/*! @brief debugEventWithError: debug logging event with the error provided
+ @param error error
+ @return event
+*/
++ (instancetype)debugEventWithError:(NSError *)error MME_DEPRECATED;
+
+/*! @brief debugEventWithException: debug logging event the the exception provided
+ @param except exception
+ @return event
+*/
++ (instancetype)debugEventWithException:(NSException *)except MME_DEPRECATED;
+
+#pragma mark - Deprecated
+
+#pragma mark - Deprecated (MMECommonEventData)
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note please use eventWithAttributes:error:
+*/
++ (instancetype)locationEventWithAttributes:(NSDictionary *)attributes instanceIdentifer:(NSString *)instanceIdentifer commonEventData:(MMECommonEventData *)commonEventData
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note replacment TBD
+*/
++ (instancetype)mapLoadEventWithDateString:(NSString *)dateString commonEventData:(MMECommonEventData *)commonEventData
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+#pragma mark - Deprecated (Event Name)
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note please use eventWithAttributes:error:
+*/
++ (instancetype)eventWithName:(NSString *)eventName attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note please use eventWithAttributes:error:
+*/
++ (instancetype)navigationEventWithName:(NSString *)name attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note please use eventWithAttributes:error:
+*/
++ (instancetype)visionEventWithName:(NSString *)name attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note please use eventWithAttributes:error:
+*/
++ (instancetype)searchEventWithName:(NSString *)name attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+/*! brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note please use eventWithAttributes:error:
+*/
++ (instancetype)carplayEventWithName:(NSString *)name attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+#pragma mark - Deprecated (Date String)
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note please use eventWithName:attributes:
+*/
++ (instancetype)telemetryMetricsEventWithDateString:(NSString *)dateString attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note map gesture events are no longer supported
+*/
++ (instancetype)mapTapEventWithDateString:(NSString *)dateString attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_MSG("map gesture events are no longer supported");
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note map gesture events are no longer supported
+*/
++ (instancetype)mapDragEndEventWithDateString:(NSString *)dateString attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_MSG("map gesture events are no longer supported");
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note please use eventWithName:attributes:
+*/
++ (instancetype)mapOfflineDownloadStartEventWithDateString:(NSString *)dateString attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note please use eventWithName:attributes:
+*/
++ (instancetype)mapOfflineDownloadEndEventWithDateString:(NSString *)dateString attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+/*! @brief deprecated in MabboxMobileEvents 1.0.0 or later
+ @note please use eventWithName:attributes:
+*/
++ (instancetype)eventWithDateString:(NSString *)dateString name:(NSString *)name attributes:(NSDictionary *)attributes
+ MME_DEPRECATED_GOTO("use eventWithAttributes:error:", "-eventWithAttributes:error:");
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEvent.h.meta b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEvent.h.meta
new file mode 100644
index 0000000..99867fb
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEvent.h.meta
@@ -0,0 +1,26 @@
+fileFormatVersion: 2
+guid: 6c1879202f10e4c3da36b4eac7f010e1
+timeCreated: 1570560566
+licenseType: Pro
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEventsManager.h b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEventsManager.h
new file mode 100644
index 0000000..ea13bdc
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEventsManager.h
@@ -0,0 +1,152 @@
+#import
+#import
+
+#import "MMETypes.h"
+
+@class MMEEvent;
+@protocol MMEEventsManagerDelegate;
+
+NS_ASSUME_NONNULL_BEGIN
+
+/*! @brief Mapbox Mobile Events Manager */
+@interface MMEEventsManager : NSObject
+
+/*! @brief events manager delegate */
+@property (nonatomic, weak) id delegate;
+
+/*! @brief YES if metrics collection is enabled */
+@property (nonatomic, getter=isMetricsEnabled) BOOL metricsEnabled;
+
+/*! @brief YES if metrics collection is enabled in the simulator */
+@property (nonatomic, getter=isMetricsEnabledInSimulator) BOOL metricsEnabledInSimulator;
+
+/*! @brief YES if metrics collection is enabled when the app is in use */
+@property (nonatomic, getter=isMetricsEnabledForInUsePermissions) BOOL metricsEnabledForInUsePermissions;
+
+/*! @brief YES if debug logging is enabled */
+@property (nonatomic, getter=isDebugLoggingEnabled) BOOL debugLoggingEnabled;
+
+/*! @brief UserAgent base string, in RFC 2616 format
+ @link https://www.ietf.org/rfc/rfc2616.txt */
+@property (nonatomic, readonly) NSString *userAgentBase;
+
+/*! @brief SDK version, in Semantic Versioning 2.0.0 format
+ @link https://semver.org */
+@property (nonatomic, readonly) NSString *hostSDKVersion;
+
+/*! @brief SKU Identifier */
+@property (nonatomic, copy) NSString *skuId;
+
+/*! @brief Mapbox Access Token
+ @link https://account.mapbox.com */
+@property (nonatomic, copy) NSString *accessToken;
+
+/*! @brief baseURL */
+@property (nonatomic, null_resettable) NSURL *baseURL;
+
+/*! @brief accountType */
+@property (nonatomic) NSInteger accountType;
+
+#pragma mark -
+
+/*! @brief Shared Mabpox Mobile Events Manager */
++ (instancetype)sharedManager;
+
+#pragma mark - Exception Free API
+
+/*!
+ @brief designated initilizer
+ @param accessToken Mapbox Access Token
+ @param userAgentBase UserAgent base string, in RFC 2616 format
+ @param hostSDKVersion SDK version, in Semantic Versioning 2.0.0 format
+ @throws no exceptions
+*/
+- (void)initializeWithAccessToken:(NSString *)accessToken userAgentBase:(NSString *)userAgentBase hostSDKVersion:(NSString *)hostSDKVersion;
+
+/*! @brief pauseOrResumeMetricsCollectionIfRequired
+ @throws no exceptions */
+- (void)pauseOrResumeMetricsCollectionIfRequired;
+
+/*! @brief flush the events pipeline, sending any pending events
+ @throws no exceptions */
+- (void)flush;
+
+/*! @brief resetEventQueuing
+ @throws no exceptions */
+- (void)resetEventQueuing;
+
+/*! @brief sendTurnstileEvent
+ @throws no exceptions */
+- (void)sendTurnstileEvent;
+
+/*! @brief sendTelemetryMetricsEvent
+ @throws no exceptions */
+- (void)sendTelemetryMetricsEvent;
+
+/*! @brief disableLocationMetrics */
+- (void)disableLocationMetrics;
+
+#pragma mark -
+
+/*! @brief enqueueEventWithName:
+ @param name event name */
+- (void)enqueueEventWithName:(NSString *)name;
+
+/*! @brief enqueueEventWithName:attributes:
+ @param name event name
+ @param attributes event attributes */
+- (void)enqueueEventWithName:(NSString *)name attributes:(MMEMapboxEventAttributes *)attributes;
+
+/*! @brief postMetadata:filePaths:completionHander:
+ @param metadata array of metadat
+ @param filePaths array of file paths
+ @param completionHandler completion handler block
+*/
+- (void)postMetadata:(NSArray *)metadata filePaths:(NSArray *)filePaths completionHandler:(nullable void (^)(NSError * _Nullable error))completionHandler;
+
+- (void)displayLogFileFromDate:(NSDate *)logDate MME_DEPRECATED;
+
+#pragma mark - Error & Exception Reporting
+
+/*! @brief report an error to the telemetry service
+ @return the report event, for inspection or logging
+ @throws no exceptions */
+- (MMEEvent *)reportError:(NSError *)eventsError;
+
+/*! @brief report an exception to the telemetry service
+ @return the report event, for inspection or logging
+ @throws no exceptions */
+- (MMEEvent *)reportException:(NSException *)eventException;
+
+@end
+
+#pragma mark -
+
+/*! @brief delegate methods for MMEEventsManager */
+@protocol MMEEventsManagerDelegate
+
+@optional
+
+/*! @brief eventsManager:didUpdateLocations: reports location updates to the delegate
+ @param eventsManager shared manager
+ @param locations array of CLLocations
+*/
+- (void)eventsManager:(MMEEventsManager *)eventsManager didUpdateLocations:(NSArray *)locations;
+
+#if TARGET_OS_IOS
+/*! @brief eventsManager:didVisit: reports visits to the delegate
+ @param eventsManager shared manager
+ @param visit CLVisit
+*/
+- (void)eventsManager:(MMEEventsManager *)eventsManager didVisit:(CLVisit *)visit;
+#endif
+
+/** @brief reports errors encoutered by the Events Manager to the delegate
+ @param eventsManager the shared events manager
+ @param error the encountered NSError object
+*/
+- (void)eventsManager:(MMEEventsManager *)eventsManager didEncounterError:(NSError *)error;
+
+@end
+
+NS_ASSUME_NONNULL_END
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEventsManager.h.meta b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEventsManager.h.meta
new file mode 100644
index 0000000..73df47a
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMEEventsManager.h.meta
@@ -0,0 +1,26 @@
+fileFormatVersion: 2
+guid: 3edca867bab9748d6be5abf6b6006229
+timeCreated: 1570560566
+licenseType: Pro
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMETypes.h b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMETypes.h
new file mode 100644
index 0000000..ab032c5
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMETypes.h
@@ -0,0 +1,54 @@
+#import
+
+#ifndef NS_ARRAY_OF
+ // Foundation collection classes adopted lightweight generics in iOS 9.0 and OS X 10.11 SDKs.
+ #if __has_feature(objc_generics) && (__IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100)
+ /** Inserts a type specifier for a pointer to a lightweight generic with the given collection and object classes. Use a `*` for any non-`id` object classes but no `*` for the collection class. */
+ #define NS_ARRAY_OF(ObjectClass...) NSArray
+ #define NS_MUTABLE_ARRAY_OF(ObjectClass...) NSMutableArray
+ #define NS_SET_OF(ObjectClass...) NSSet
+ #define NS_MUTABLE_SET_OF(ObjectClass...) NSMutableSet
+ #define NS_DICTIONARY_OF(ObjectClass...) NSDictionary
+ #define NS_MUTABLE_DICTIONARY_OF(ObjectClass...) NSMutableDictionary
+ #else
+ #define NS_ARRAY_OF(ObjectClass...) NSArray
+ #define NS_MUTABLE_ARRAY_OF(ObjectClass...) NSMutableArray
+ #define NS_SET_OF(ObjectClass...) NSSet
+ #define NS_MUTABLE_SET_OF(ObjectClass...) NSMutableSet
+ #define NS_DICTIONARY_OF(ObjectClass...) NSDictionary
+ #define NS_MUTABLE_DICTIONARY_OF(ObjectClass...) NSMutableDictionary
+ #endif
+#endif
+
+typedef NS_DICTIONARY_OF(NSString *, id) MMEMapboxEventAttributes;
+typedef NS_MUTABLE_DICTIONARY_OF(NSString *, id) MMEMutableMapboxEventAttributes;
+
+#ifdef MME_DEPRECATION_WARNINGS
+
+#ifndef MME_DEPRECATED
+ #define MME_DEPRECATED __attribute__((deprecated))
+#endif
+
+#ifndef MME_DEPRECATED_MSG
+ #define MME_DEPRECATED_MSG(msg) __attribute((deprecated((msg))))
+#endif
+
+#ifndef MME_DEPRECATED_GOTO
+ #define MME_DEPRECATED_GOTO(msg,label) __attribute((deprecated((msg),(label))))
+#endif
+
+#else
+
+#ifndef MME_DEPRECATED
+ #define MME_DEPRECATED
+#endif
+
+#ifndef MME_DEPRECATED_MSG
+ #define MME_DEPRECATED_MSG(msg)
+#endif
+
+#ifndef MME_DEPRECATED_GOTO
+ #define MME_DEPRECATED_GOTO(msg,label)
+#endif
+
+#endif // MME_DEPRECATION_WARNINGS
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMETypes.h.meta b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMETypes.h.meta
new file mode 100644
index 0000000..8e637fb
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MMETypes.h.meta
@@ -0,0 +1,26 @@
+fileFormatVersion: 2
+guid: 7743c930e90e943f4941ec6e3ad1a58f
+timeCreated: 1570560566
+licenseType: Pro
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MapboxMobileEvents.h b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MapboxMobileEvents.h
new file mode 100644
index 0000000..a90ea2b
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MapboxMobileEvents.h
@@ -0,0 +1,14 @@
+#import
+
+//! Project version number for MapboxMobileEvents.
+FOUNDATION_EXPORT double MapboxMobileEventsVersionNumber;
+
+//! Project version string for MapboxMobileEvents
+FOUNDATION_EXPORT const unsigned char MapboxMobileEventsVersionString[];
+
+// In this header, you should import all the public headers of your framework using statements like #import
+
+#import
+#import
+#import
+#import
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MapboxMobileEvents.h.meta b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MapboxMobileEvents.h.meta
new file mode 100644
index 0000000..f9ed3dc
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/include/MapboxMobileEvents/MapboxMobileEvents.h.meta
@@ -0,0 +1,26 @@
+fileFormatVersion: 2
+guid: 458ba4499a3bc4d2aafae9f55ca4c37e
+timeCreated: 1570560566
+licenseType: Pro
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ Any:
+ second:
+ enabled: 1
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ DefaultValueInitialized: true
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/libMapboxMobileEventsStatic.a b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/libMapboxMobileEventsStatic.a
new file mode 100644
index 0000000..5185661
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/libMapboxMobileEventsStatic.a differ
diff --git a/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/libMapboxMobileEventsStatic.a.meta b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/libMapboxMobileEventsStatic.a.meta
new file mode 100644
index 0000000..4fcd74d
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/iOS/MapboxMobileEvents/libMapboxMobileEventsStatic.a.meta
@@ -0,0 +1,106 @@
+fileFormatVersion: 2
+guid: 902cd5fd1c6e74a17a41d7527de5b07b
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ defineConstraints: []
+ isPreloaded: 0
+ isOverridable: 0
+ isExplicitlyReferenced: 0
+ validateReferences: 1
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 1
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ Exclude iOS: 0
+ - first:
+ Android: Android
+ second:
+ enabled: 0
+ settings:
+ CPU: ARMv7
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ iPhone: iOS
+ second:
+ enabled: 1
+ settings:
+ AddToEmbeddedBinaries: false
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/link.xml b/Assets/Mapbox/Core/Plugins/link.xml
new file mode 100644
index 0000000..d316281
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/link.xml
@@ -0,0 +1,29 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/Plugins/link.xml.meta b/Assets/Mapbox/Core/Plugins/link.xml.meta
new file mode 100644
index 0000000..9a564e6
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/link.xml.meta
@@ -0,0 +1,7 @@
+fileFormatVersion: 2
+guid: 4cdb20be19794f045b7be9be4b5c0411
+TextScriptImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite.meta b/Assets/Mapbox/Core/Plugins/sqlite.meta
new file mode 100644
index 0000000..75588d9
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 9b6db522e589f6648ac1c512b86ffee7
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android.meta b/Assets/Mapbox/Core/Plugins/sqlite/Android.meta
new file mode 100644
index 0000000..fc385e8
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/Android.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: f9aa937fca8cbd945a3a1c9a32a2aeca
+folderAsset: yes
+timeCreated: 1445131378
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android/libs.meta b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs.meta
new file mode 100644
index 0000000..cffbabb
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 8ecc37cde00565d439803ae86521a2be
+folderAsset: yes
+timeCreated: 1445131378
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/arm64-v8a.meta b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/arm64-v8a.meta
new file mode 100644
index 0000000..9a815b8
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/arm64-v8a.meta
@@ -0,0 +1,8 @@
+fileFormatVersion: 2
+guid: 2325a98c27e0cd84a821f71d86995361
+folderAsset: yes
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/arm64-v8a/libsqlite3.so b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/arm64-v8a/libsqlite3.so
new file mode 100644
index 0000000..246d027
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/arm64-v8a/libsqlite3.so differ
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/arm64-v8a/libsqlite3.so.meta b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/arm64-v8a/libsqlite3.so.meta
new file mode 100644
index 0000000..6c5aaed
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/arm64-v8a/libsqlite3.so.meta
@@ -0,0 +1,94 @@
+fileFormatVersion: 2
+guid: aff4a781acb7b3e44ad44913092f0136
+PluginImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ isOverridable: 0
+ platformData:
+ - first:
+ '': Any
+ second:
+ enabled: 0
+ settings:
+ Exclude Android: 0
+ Exclude Editor: 1
+ Exclude Linux: 1
+ Exclude Linux64: 1
+ Exclude LinuxUniversal: 1
+ Exclude OSXUniversal: 1
+ Exclude WebGL: 1
+ Exclude Win: 1
+ Exclude Win64: 1
+ - first:
+ Android: Android
+ second:
+ enabled: 1
+ settings:
+ CPU: ARM64
+ - first:
+ Any:
+ second:
+ enabled: 0
+ settings: {}
+ - first:
+ Editor: Editor
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ - first:
+ Facebook: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Facebook: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Linux
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Linux64
+ second:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ - first:
+ Standalone: LinuxUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: None
+ - first:
+ Standalone: OSXUniversal
+ second:
+ enabled: 0
+ settings:
+ CPU: x86
+ - first:
+ Standalone: Win
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ - first:
+ Standalone: Win64
+ second:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/armeabi-v7a.meta b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/armeabi-v7a.meta
new file mode 100644
index 0000000..9c3fb54
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/armeabi-v7a.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 08b2651045c57a441975bfde798f2859
+folderAsset: yes
+timeCreated: 1445131378
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/armeabi-v7a/libsqlite3.so b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/armeabi-v7a/libsqlite3.so
new file mode 100644
index 0000000..d69ba56
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/armeabi-v7a/libsqlite3.so differ
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/armeabi-v7a/libsqlite3.so.meta b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/armeabi-v7a/libsqlite3.so.meta
new file mode 100644
index 0000000..db7f4be
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/armeabi-v7a/libsqlite3.so.meta
@@ -0,0 +1,70 @@
+fileFormatVersion: 2
+guid: a00620409803a41f598cabed0c2ecf9f
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings:
+ CPU: ARMv7
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ Linux:
+ enabled: 0
+ settings:
+ CPU: x86
+ Linux64:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ OSXIntel:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ OSXIntel64:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ SamsungTV:
+ enabled: 0
+ settings:
+ STV_MODEL: STANDARD_13
+ WP8:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DontProcess: False
+ PlaceholderPath:
+ Win:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ Win64:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ WindowsStoreApps:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DontProcess: False
+ PlaceholderPath:
+ SDK: AnySDK
+ iOS:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/x86.meta b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/x86.meta
new file mode 100644
index 0000000..d396f99
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/x86.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 450e0a9c89bf4a040b26f1fef13f5655
+folderAsset: yes
+timeCreated: 1445131378
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/x86/libsqlite3.so b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/x86/libsqlite3.so
new file mode 100644
index 0000000..d4d1203
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/x86/libsqlite3.so differ
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/x86/libsqlite3.so.meta b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/x86/libsqlite3.so.meta
new file mode 100644
index 0000000..2c6eee9
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/Android/libs/x86/libsqlite3.so.meta
@@ -0,0 +1,55 @@
+fileFormatVersion: 2
+guid: fa9cbdc3a67e5fd4baeb5d0dd3f4cf71
+timeCreated: 1445131383
+licenseType: Free
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ platformData:
+ Android:
+ enabled: 1
+ settings:
+ CPU: x86
+ Any:
+ enabled: 0
+ settings: {}
+ Editor:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ DefaultValueInitialized: true
+ OS: AnyOS
+ Linux:
+ enabled: 0
+ settings:
+ CPU: x86
+ Linux64:
+ enabled: 0
+ settings:
+ CPU: x86_64
+ OSXIntel:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ OSXIntel64:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ Win:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ Win64:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ iOS:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/x64.meta b/Assets/Mapbox/Core/Plugins/sqlite/x64.meta
new file mode 100644
index 0000000..049d532
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/x64.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: d080ad26255213a459eabfbd537e41b5
+folderAsset: yes
+timeCreated: 1445131378
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/x64/sqlite3.dll b/Assets/Mapbox/Core/Plugins/sqlite/x64/sqlite3.dll
new file mode 100644
index 0000000..6f07d5e
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/sqlite/x64/sqlite3.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/x64/sqlite3.dll.meta b/Assets/Mapbox/Core/Plugins/sqlite/x64/sqlite3.dll.meta
new file mode 100644
index 0000000..245e977
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/x64/sqlite3.dll.meta
@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: a3fee75616c5ab0449e841e6fc8a5172
+timeCreated: 1445131383
+licenseType: Free
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ platformData:
+ Android:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ Editor:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ DefaultValueInitialized: true
+ OS: AnyOS
+ Linux:
+ enabled: 1
+ settings:
+ CPU: x86
+ Linux64:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ LinuxUniversal:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXIntel:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXIntel64:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXUniversal:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ Win:
+ enabled: 0
+ settings:
+ CPU: None
+ Win64:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ data:
+ enabled: 0
+ settings: {}
+ iOS:
+ enabled: 1
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/x86.meta b/Assets/Mapbox/Core/Plugins/sqlite/x86.meta
new file mode 100644
index 0000000..a43b7b4
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/x86.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 854bb0734038dc44e81cdde1d571a00f
+folderAsset: yes
+timeCreated: 1445131378
+licenseType: Free
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/x86/sqlite3.dll b/Assets/Mapbox/Core/Plugins/sqlite/x86/sqlite3.dll
new file mode 100644
index 0000000..4cd5a11
Binary files /dev/null and b/Assets/Mapbox/Core/Plugins/sqlite/x86/sqlite3.dll differ
diff --git a/Assets/Mapbox/Core/Plugins/sqlite/x86/sqlite3.dll.meta b/Assets/Mapbox/Core/Plugins/sqlite/x86/sqlite3.dll.meta
new file mode 100644
index 0000000..e2f1296
--- /dev/null
+++ b/Assets/Mapbox/Core/Plugins/sqlite/x86/sqlite3.dll.meta
@@ -0,0 +1,63 @@
+fileFormatVersion: 2
+guid: 34afd3dfc3051f3438965ecf7bd8c8df
+timeCreated: 1445131383
+licenseType: Free
+PluginImporter:
+ serializedVersion: 1
+ iconMap: {}
+ executionOrder: {}
+ isPreloaded: 0
+ platformData:
+ Android:
+ enabled: 0
+ settings:
+ CPU: AnyCPU
+ Editor:
+ enabled: 1
+ settings:
+ CPU: x86
+ DefaultValueInitialized: true
+ OS: AnyOS
+ Linux:
+ enabled: 1
+ settings:
+ CPU: x86
+ Linux64:
+ enabled: 1
+ settings:
+ CPU: x86_64
+ LinuxUniversal:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXIntel:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXIntel64:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ OSXUniversal:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ Win:
+ enabled: 1
+ settings:
+ CPU: AnyCPU
+ Win64:
+ enabled: 0
+ settings:
+ CPU: None
+ data:
+ enabled: 0
+ settings: {}
+ iOS:
+ enabled: 0
+ settings:
+ CompileFlags:
+ FrameworkDependencies:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/cheap-ruler-cs.meta b/Assets/Mapbox/Core/cheap-ruler-cs.meta
new file mode 100644
index 0000000..3b9d2a3
--- /dev/null
+++ b/Assets/Mapbox/Core/cheap-ruler-cs.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 49cd92bb9fe9ed9428a22e83866f702c
+folderAsset: yes
+timeCreated: 1510755841
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/cheap-ruler-cs/CheapRuler.cs b/Assets/Mapbox/Core/cheap-ruler-cs/CheapRuler.cs
new file mode 100644
index 0000000..9850c99
--- /dev/null
+++ b/Assets/Mapbox/Core/cheap-ruler-cs/CheapRuler.cs
@@ -0,0 +1,164 @@
+namespace Mapbox.CheapRulerCs
+{
+
+ using System;
+
+
+ public enum CheapRulerUnits
+ {
+ Kilometers,
+ Miles,
+ NauticalMiles,
+ Meters,
+ Yards,
+ Feet,
+ Inches
+ }
+
+ public class CheapRuler
+ {
+
+
+ private double _kx;
+ private double _ky;
+
+
+ ///
+ /// Creates a ruler object that will approximate measurements around the given latitude. Units are one of: kilometers
+ ///
+ ///
+ public CheapRuler(double latitude, CheapRulerUnits outputUnits = CheapRulerUnits.Kilometers)
+ {
+
+ double factor;
+
+ switch (outputUnits)
+ {
+ case CheapRulerUnits.Kilometers:
+ factor = 1.0d;
+ break;
+ case CheapRulerUnits.Miles:
+ factor = 1000.0d / 1609.344;
+ break;
+ case CheapRulerUnits.NauticalMiles:
+ factor = 1000.0d / 1852.0d;
+ break;
+ case CheapRulerUnits.Meters:
+ factor = 1000.0d;
+ break;
+ case CheapRulerUnits.Yards:
+ factor = 1000.0d / 0.9144;
+ break;
+ case CheapRulerUnits.Feet:
+ factor = 1000.0d / 0.3048;
+ break;
+ case CheapRulerUnits.Inches:
+ factor = 1000.0d / 0.0254;
+ break;
+ default:
+ factor = 1.0d;
+ break;
+ }
+
+ var cos = Math.Cos(latitude * Math.PI / 180);
+ var cos2 = 2 * cos * cos - 1;
+ var cos3 = 2 * cos * cos2 - cos;
+ var cos4 = 2 * cos * cos3 - cos2;
+ var cos5 = 2 * cos * cos4 - cos3;
+
+ // multipliers for converting longitude and latitude degrees into distance (http://1.usa.gov/1Wb1bv7)
+ _kx = factor * (111.41513 * cos - 0.09455 * cos3 + 0.00012 * cos5);
+ _ky = factor * (111.13209 - 0.56605 * cos2 + 0.0012 * cos4);
+ }
+
+
+ ///
+ /// Creates a ruler object from tile coordinates.
+ ///
+ /// Y TileId
+ /// Zoom Level
+ ///
+ ///
+ public static CheapRuler FromTile(int y, int z, CheapRulerUnits units = CheapRulerUnits.Kilometers)
+ {
+ var n = Math.PI * (1 - 2 * (y + 0.5) / Math.Pow(2, z));
+ var lat = Math.Atan(0.5 * (Math.Exp(n) - Math.Exp(-n))) * 180 / Math.PI;
+ return new CheapRuler(lat, units);
+ }
+
+
+ ///
+ /// Given two points returns the distance.
+ ///
+ /// point [longitude, latitude]
+ /// point [longitude, latitude]
+ /// Distance
+ public double Distance(double[] a, double[] b)
+ {
+ var dx = (a[0] - b[0]) * _kx;
+ var dy = (a[1] - b[1]) * _ky;
+ return Math.Sqrt(dx * dx + dy * dy);
+ }
+
+
+ ///
+ /// Returns the bearing between two points in angles.
+ ///
+ /// a point [longitude, latitude]
+ /// b point [longitude, latitude]
+ /// Bearing
+ public double Bearing(double[] a, double[] b)
+ {
+ var dx = (b[0] - a[0]) * _kx;
+ var dy = (b[1] - a[1]) * _ky;
+ if (dx == 0 && dy == 0)
+ {
+ return 0;
+ }
+ var bearing = Math.Atan2(dx, dy) * 180 / Math.PI;
+ if (bearing > 180)
+ {
+ bearing -= 360;
+ }
+ return bearing;
+ }
+
+
+ ///
+ /// Returns a new point given distance and bearing from the starting point.
+ ///
+ ///
+ ///
+ /// point [longitude, latitude]
+ ///
+ public double[] Destination(double[] p, double distance, double bearing)
+ {
+ var a = (90 - bearing) * Math.PI / 180;
+ return offset(
+ p
+ , Math.Cos(a) * distance
+ , Math.Sin(a) * distance
+ );
+ }
+
+
+ ///
+ /// Returns a new point given easting and northing offsets (in ruler units) from the starting point.
+ ///
+ /// point [longitude, latitude]
+ /// dx easting
+ /// dy northing
+ /// point [longitude, latitude]
+ private double[] offset(double[] p, double dx, double dy)
+ {
+ return new double[]
+ {
+ p[0] + dx / _kx,
+ p[1] + dy / _ky
+ };
+ }
+
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/cheap-ruler-cs/CheapRuler.cs.meta b/Assets/Mapbox/Core/cheap-ruler-cs/CheapRuler.cs.meta
new file mode 100644
index 0000000..d8e07f9
--- /dev/null
+++ b/Assets/Mapbox/Core/cheap-ruler-cs/CheapRuler.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 70ae2609c58a0494fa3d7f9f58915037
+timeCreated: 1510756014
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/cheap-ruler-cs/Tests.meta b/Assets/Mapbox/Core/cheap-ruler-cs/Tests.meta
new file mode 100644
index 0000000..240aa35
--- /dev/null
+++ b/Assets/Mapbox/Core/cheap-ruler-cs/Tests.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: ad956bac3800e2347b757d68a78545fe
+folderAsset: yes
+timeCreated: 1515511351
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor.meta b/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor.meta
new file mode 100644
index 0000000..5f57978
--- /dev/null
+++ b/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 4f535415528489e4994bafd61109a75e
+folderAsset: yes
+timeCreated: 1515511390
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor/MapboxUnitTests_CheapRulerCs.cs b/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor/MapboxUnitTests_CheapRulerCs.cs
new file mode 100644
index 0000000..36ef2e3
--- /dev/null
+++ b/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor/MapboxUnitTests_CheapRulerCs.cs
@@ -0,0 +1,122 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+// TODO: figure out how run tests outside of Unity with .NET framework, something like '#if !UNITY'
+
+namespace Mapbox.CheapRulerCs.UnitTest
+{
+
+
+ using NUnit.Framework;
+ using System.Collections.Generic;
+ using UnityEngine;
+ using Mapbox.CheapRulerCs;
+ using Mapbox.Json.Linq;
+
+ [TestFixture]
+ internal class CheapRulerCsTest
+ {
+
+
+ // TODO more tests ////////////////////
+ // see https://github.com/mapbox/cheap-ruler/blob/master/test/test.js
+ //////////////////////////
+
+
+ internal class point { public double x; public double y; }
+ internal class line
+ {
+ public List vertices = new List();
+ public void Add(double x, double y) { vertices.Add(new point() { x = x, y = y }); }
+ }
+
+ private List _lineFixtures;
+
+ [SetUp]
+ public void SetUp()
+ {
+ _lineFixtures = loadFixtures();
+ }
+
+
+
+ [Test, Order(1)]
+ public void FixturesLoaded()
+ {
+ Assert.AreEqual(58, _lineFixtures.Count);
+ }
+
+
+
+ [Test]
+ public void DistanceInMiles()
+ {
+ CheapRuler ruler = new CheapRuler(32.8351);
+ CheapRuler rulerMiles = new CheapRuler(32.8351, CheapRulerUnits.Miles);
+
+ double distKm = ruler.Distance(new double[] { 30.5, 32.8351 }, new double[] { 30.51, 32.8451 });
+ double distMiles = rulerMiles.Distance(new double[] { 30.5, 32.8351 }, new double[] { 30.51, 32.8451 });
+
+ Debug.LogFormat("{0} {1}", distKm, distMiles);
+ Assert.AreEqual(1.609344, distKm / distMiles, 1e-12, "wrong distance in miles");
+ }
+
+
+ [Test]
+ public void DistanceInNauticalMiles()
+ {
+ CheapRuler ruler = new CheapRuler(32.8351);
+ CheapRuler rulerMiles = new CheapRuler(32.8351, CheapRulerUnits.Miles);
+ CheapRuler rulerNauticalMiles = new CheapRuler(32.8351, CheapRulerUnits.NauticalMiles);
+
+ double distKm = ruler.Distance(new double[] { 30.5, 32.8351 }, new double[] { 30.51, 32.8451 });
+ double distMiles = rulerMiles.Distance(new double[] { 30.5, 32.8351 }, new double[] { 30.51, 32.8451 });
+ double distNauticalMiles = rulerNauticalMiles.Distance(new double[] { 30.5, 32.8351 }, new double[] { 30.51, 32.8451 });
+
+ Debug.LogFormat("{0} {1}", distKm, distNauticalMiles);
+ Assert.AreEqual(1.852, distKm / distNauticalMiles, 1e-12, "wrong distance km vs nautical miles");
+ Assert.AreEqual(1.15078, distMiles / distNauticalMiles, 1e-6, "wrong distance miles vs nautical miles");
+ }
+
+
+ [Test]
+ public void FromTile()
+ {
+ CheapRuler ruler1 = new CheapRuler(50.5);
+ CheapRuler ruler2 = CheapRuler.FromTile(11041, 15);
+
+ var p1 = new double[] { 30.5, 50.5 };
+ var p2 = new double[] { 30.51, 50.51 };
+
+ Assert.AreEqual(ruler1.Distance(p1, p2), ruler2.Distance(p1, p2), 3e-5, "CheapRuler.FromTile distance");
+ }
+
+
+
+ private List loadFixtures()
+ {
+ TextAsset fixturesAsset = Resources.Load("ChearRulerCs_fixtures");
+ var json = JArray.Parse(fixturesAsset.text);
+ List fixtures = new List();
+
+ foreach (var line in json)
+ {
+ line fixtureLine = new line();
+
+ foreach (var coordinates in line)
+ {
+ fixtureLine.Add(coordinates[0].Value(), coordinates[1].Value());
+ }
+ fixtures.Add(fixtureLine);
+ }
+
+ return fixtures;
+ }
+
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor/MapboxUnitTests_CheapRulerCs.cs.meta b/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor/MapboxUnitTests_CheapRulerCs.cs.meta
new file mode 100644
index 0000000..4d882e8
--- /dev/null
+++ b/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor/MapboxUnitTests_CheapRulerCs.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: a618de68ec1d47d4895ef5b3200b2c88
+timeCreated: 1522309080
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs.meta
new file mode 100644
index 0000000..de99404
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 0573f298307b74fceabb0e3093a486d5
+folderAsset: yes
+timeCreated: 1491243030
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions.meta
new file mode 100644
index 0000000..727165f
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 17120e4ab0b97434486f85ff6e0a9196
+folderAsset: yes
+timeCreated: 1491243030
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/DirectionResource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/DirectionResource.cs
new file mode 100644
index 0000000..6bb31f3
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/DirectionResource.cs
@@ -0,0 +1,244 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ using System;
+ using System.Collections.Generic;
+ using Mapbox.Utils;
+ using Platform;
+
+ /// A directions request.
+ public class DirectionResource : Resource
+ {
+ private string apiEndpoint = "directions/v5/";
+
+ // Required
+ private RoutingProfile profile;
+
+ // Optional
+ private Vector2d[] coordinates;
+
+ // Optional
+ private bool? alternatives;
+
+ // Optional
+ private BearingFilter[] bearings;
+
+ // Optional
+ private bool? continueStraight;
+
+ // Optional
+ private Overview overview;
+
+ // Optional
+ private double[] radiuses;
+
+ // Optional
+ private bool? steps;
+
+ /// Initializes a new instance of the class.
+ ///
+ /// Array of LatLng points along route, between 2 and 25 elements in length.
+ ///
+ ///
+ /// A routing profile, for all profile options.
+ ///
+ public DirectionResource(Vector2d[] coordinates, RoutingProfile profile)
+ {
+ this.Coordinates = coordinates;
+ this.RoutingProfile = profile;
+ }
+
+ /// Gets the API endpoint as a partial URL path.
+ public override string ApiEndpoint {
+ get {
+ return this.apiEndpoint;
+ }
+ }
+
+ ///
+ /// Gets or sets the coordinates. Array of LatLng points along route,
+ /// between 2 and 25 elements in length.
+ ///
+ public Vector2d[] Coordinates {
+ get {
+ return this.coordinates;
+ }
+
+ set {
+ if (value.Length < 2 || value.Length > 25)
+ {
+ throw new Exception("Must be between 2 and 25 elements in coordinates array.");
+ }
+
+ this.coordinates = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the routing profile, for all profile options.
+ ///
+ public RoutingProfile RoutingProfile {
+ get {
+ return this.profile;
+ }
+
+ set {
+ this.profile = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the alternative option. Controls whether direction request should
+ /// return alternative routes.
+ ///
+ public bool? Alternatives {
+ get {
+ return this.alternatives;
+ }
+
+ set {
+ this.alternatives = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the bearing option. An array of bearing filters. Each filter is composed of
+ /// a bearing as decimal degrees clockwise between 0 and 360, and a range of variation from
+ /// the bearing as decimal degrees between 0 and 180.
+ ///
+ public BearingFilter[] Bearings {
+ get {
+ return this.bearings;
+ }
+
+ set {
+ if (value != null && value.Length != this.coordinates.Length)
+ {
+ throw new Exception("There must be as many bearings as there are coordinates in the request.");
+ }
+
+ this.bearings = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the continue_straight option. Controls whether to route will
+ /// continue in same direction of travel or if route may continue in opposite
+ /// direction of travel at intermediate waypoints.
+ ///
+ public bool? ContinueStraight {
+ get {
+ return this.continueStraight;
+ }
+
+ set {
+ this.continueStraight = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the overview option. See for all overview options.
+ ///
+ public Overview Overview {
+ get {
+ return this.overview;
+ }
+
+ set {
+ this.overview = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the radiuses option. Controls maximum distance in meters that
+ /// each coordinate is allowed to move when snapped to a nearby road segment.
+ ///
+ public double[] Radiuses {
+ get {
+ return this.radiuses;
+ }
+
+ set {
+ if (value != null)
+ {
+ if (value.Length != this.coordinates.Length)
+ {
+ throw new Exception("There must be as many radiuses as there are coordinates in the request.");
+ }
+
+ for (int i = 0; i < value.Length; i++)
+ {
+ if (value[i] <= 0)
+ {
+ throw new Exception("Radius must be greater than 0");
+ }
+ }
+ }
+
+ this.radiuses = value;
+ }
+ }
+
+ /// Gets or sets the steps option. Controls whether to return steps and turn-by-turn instructions.
+ public bool? Steps {
+ get {
+ return this.steps;
+ }
+
+ set {
+ this.steps = value;
+ }
+ }
+
+ ///
+ /// Gets the URL string.
+ ///
+ /// The URL string.
+ public override string GetUrl()
+ {
+ Dictionary opts = new Dictionary();
+
+ if (this.Alternatives != null)
+ {
+ opts.Add("alternatives", this.Alternatives.ToString().ToLower());
+ }
+
+ if (this.Bearings != null)
+ {
+ opts.Add("bearings", GetUrlQueryFromArray(this.Bearings, ";"));
+ }
+
+ if (this.ContinueStraight != null)
+ {
+ opts.Add("continue_straight", this.ContinueStraight.ToString().ToLower());
+ }
+
+ if (this.Overview != null)
+ {
+ opts.Add("overview", this.Overview.ToString());
+ }
+
+ if (this.Radiuses != null)
+ {
+ opts.Add("radiuses", GetUrlQueryFromArray(this.Radiuses));
+ }
+
+ if (this.Steps != null)
+ {
+ opts.Add("steps", this.Steps.ToString().ToLower());
+ }
+
+ return Constants.BaseAPI +
+ this.ApiEndpoint +
+ this.RoutingProfile +
+ GetUrlQueryFromArray(this.Coordinates, ";") +
+ ".json" +
+ EncodeQueryString(opts);
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/DirectionResource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/DirectionResource.cs.meta
new file mode 100644
index 0000000..5b13be9
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/DirectionResource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 78ecfcb30aefc4289b8d2a83619a2d89
+timeCreated: 1493218361
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Directions.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Directions.cs
new file mode 100644
index 0000000..0906539
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Directions.cs
@@ -0,0 +1,69 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ using System;
+ using System.Text;
+ using Mapbox.Json;
+ using Mapbox.Platform;
+ using Mapbox.Utils.JsonConverters;
+
+ ///
+ /// Wrapper around the
+ /// Mapbox Directions API. The Mapbox Directions API will show you how to get where
+ /// you're going.
+ ///
+ public sealed class Directions
+ {
+ private readonly IFileSource fileSource;
+
+ /// Initializes a new instance of the class.
+ /// Network access abstraction.
+ public Directions(IFileSource fileSource)
+ {
+ this.fileSource = fileSource;
+ }
+
+ /// Performs asynchronously a directions lookup.
+ /// Direction resource.
+ /// Callback to be called after the request is completed.
+ ///
+ /// Returns a that can be used for canceling a pending
+ /// request. This handle can be completely ignored if there is no intention of ever
+ /// canceling the request.
+ ///
+ public IAsyncRequest Query(DirectionResource direction, Action callback)
+ {
+ return this.fileSource.Request(
+ direction.GetUrl(),
+ (Response response) =>
+ {
+ var str = Encoding.UTF8.GetString(response.Data);
+
+ var data = Deserialize(str);
+
+ callback(data);
+ });
+ }
+
+ ///
+ /// Deserialize the geocode response string into a .
+ ///
+ /// JSON String.
+ /// A .
+ public DirectionsResponse Deserialize(string str)
+ {
+ return JsonConvert.DeserializeObject(str, JsonConverters.Converters);
+ }
+
+ public string Serialize(DirectionsResponse response)
+ {
+ return JsonConvert.SerializeObject(response, JsonConverters.Converters);
+ }
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Directions.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Directions.cs.meta
new file mode 100644
index 0000000..1f1a8d8
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Directions.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a4fc862e3db034a0b8591a58cd15afdc
+timeCreated: 1491243034
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Overview.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Overview.cs
new file mode 100644
index 0000000..d836788
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Overview.cs
@@ -0,0 +1,38 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ ///
+ /// Type of returned overview geometry. Can be full (the most detailed geometry available),
+ /// simplified (a simplified version of the full geometry), or false (no overview geometry).
+ ///
+ public sealed class Overview
+ {
+ /// Use the most detailed geometry available.
+ public static readonly Overview Full = new Overview("full");
+
+ /// Use simplified geometry. This is the default value.
+ public static readonly Overview Simplified = new Overview("simplified");
+
+ /// Use no overview geometry.
+ public static readonly Overview False = new Overview("false");
+
+ private readonly string overview;
+
+ private Overview(string overview)
+ {
+ this.overview = overview;
+ }
+
+ /// Converts the overview type to a string.
+ /// A string to use as an optional value in the direction query URL.
+ public override string ToString()
+ {
+ return this.overview;
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Overview.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Overview.cs.meta
new file mode 100644
index 0000000..e087bb7
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Overview.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 794258e75ed8d4cee96d4b5ba225cfc8
+timeCreated: 1491243034
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response.meta
new file mode 100644
index 0000000..1ef48ec
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 41da431a6ab1548a29eecc30eebabe26
+folderAsset: yes
+timeCreated: 1491243031
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Annotation.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Annotation.cs
new file mode 100644
index 0000000..139c8a7
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Annotation.cs
@@ -0,0 +1,38 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ using System.Collections.Generic;
+ using Mapbox.Json;
+
+ ///
+ /// An annotations object contains additional details about each line segment along the route geometry.
+ /// Each entry in an annotations field corresponds to a coordinate along the route geometry.
+ ///
+ public class Annotation
+ {
+
+
+ [JsonProperty("distance")]
+ public double[] Distance { get; set; }
+
+
+ [JsonProperty("duration")]
+ public double[] Duration { get; set; }
+
+
+ [JsonProperty("speed")]
+ public string[] Speed { get; set; }
+
+
+ [JsonProperty("congestion")]
+ public string[] Congestion { get; set; }
+
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Annotation.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Annotation.cs.meta
new file mode 100644
index 0000000..85ed38a
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Annotation.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 204896b65f98440449415ca9b9c1d643
+timeCreated: 1508343130
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/DirectionsResponse.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/DirectionsResponse.cs
new file mode 100644
index 0000000..7043825
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/DirectionsResponse.cs
@@ -0,0 +1,41 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions {
+ using System;
+ using System.Collections.Generic;
+ using Mapbox.Json;
+
+ ///
+ /// Directions response.
+ ///
+#if !WINDOWS_UWP
+ // http://stackoverflow.com/a/12903628
+ [Serializable]
+#endif
+ public class DirectionsResponse {
+ ///
+ /// Gets or sets the routes.
+ ///
+ /// The routes.
+ [JsonProperty("routes")]
+ public List Routes { get; set; }
+
+ ///
+ /// Gets or sets the waypoints.
+ ///
+ /// The waypoints.
+ [JsonProperty("waypoints")]
+ public List Waypoints { get; set; }
+
+ ///
+ /// Gets or sets the code.
+ ///
+ /// The code.
+ [JsonProperty("code")]
+ public string Code { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/DirectionsResponse.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/DirectionsResponse.cs.meta
new file mode 100644
index 0000000..61d74ba
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/DirectionsResponse.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f69de6bfcf63e4d2ab766574bca2caf6
+timeCreated: 1491243035
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Intersection.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Intersection.cs
new file mode 100644
index 0000000..a533a8d
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Intersection.cs
@@ -0,0 +1,55 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ using System.Collections.Generic;
+ using Mapbox.Json;
+ using Mapbox.Utils;
+ using Mapbox.Utils.JsonConverters;
+
+ ///
+ /// An Intersection from a Directions API call.
+ ///
+ public class Intersection
+ {
+ ///
+ /// Gets or sets the out.
+ ///
+ /// The out.
+ [JsonProperty("out", Order = 0)]
+ public int Out { get; set; }
+
+ ///
+ /// Gets or sets the entry.
+ ///
+ /// The entry.
+ [JsonProperty("entry", Order = 1)]
+ public List Entry { get; set; }
+
+ ///
+ /// Gets or sets the bearings.
+ ///
+ /// The bearings.
+ [JsonProperty("bearings", Order = 2)]
+ public List Bearings { get; set; }
+
+ ///
+ /// Gets or sets the location.
+ ///
+ /// The location.
+ [JsonProperty("location", Order = 3)]
+ [JsonConverter(typeof(LonLatToVector2dConverter))]
+ public Vector2d Location { get; set; }
+
+ ///
+ /// Gets or sets the in.
+ ///
+ /// The in.
+ [JsonProperty("in", Order = 4, NullValueHandling = NullValueHandling.Ignore)]
+ public int? In { get; set; }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Intersection.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Intersection.cs.meta
new file mode 100644
index 0000000..7c9b26c
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Intersection.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 38b89d19d5fc44375966036ad1331f3d
+timeCreated: 1493218361
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Leg.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Leg.cs
new file mode 100644
index 0000000..aebeab8
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Leg.cs
@@ -0,0 +1,58 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ using System.Collections.Generic;
+ using Mapbox.Json;
+
+
+ ///
+ /// A Leg from a Directions API call.
+ ///
+ public class Leg
+ {
+
+
+ ///
+ /// Depending on the steps parameter, either an Array of RouteStep objects (true, default) or an empty array (false)
+ ///
+ /// The steps.
+ [JsonProperty("steps")]
+ public List Steps { get; set; }
+
+
+ ///
+ /// Depending on the summary parameter, either a String summarizing the route (true, default) or an empty String (false).
+ ///
+ /// The summary.
+ [JsonProperty("summary")]
+ public string Summary { get; set; }
+
+
+ ///
+ /// Number indicating the estimated travel time in seconds.
+ ///
+ [JsonProperty("duration")]
+ public double Duration { get; set; }
+
+
+ ///
+ /// Number indicating the distance traveled in meters.
+ ///
+ [JsonProperty("distance")]
+ public double Distance { get; set; }
+
+
+ ///
+ /// An annotations object that contains additional details about each line segment along the route geometry. Each entry in an annotations field corresponds to a coordinate along the route geometry.
+ ///
+ [JsonProperty("annotation")]
+ public Annotation Annotation { get; set; }
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Leg.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Leg.cs.meta
new file mode 100644
index 0000000..c63fac2
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Leg.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7847e2706c04347a19461bd848b5e1bd
+timeCreated: 1491243034
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Maneuver.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Maneuver.cs
new file mode 100644
index 0000000..1cf756d
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Maneuver.cs
@@ -0,0 +1,59 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ using Mapbox.Json;
+ using Mapbox.Utils;
+
+ ///
+ /// A Maneuver from a directions API call.
+ ///
+ public class Maneuver
+ {
+ ///
+ /// Gets or sets the bearing after.
+ ///
+ /// The bearing after.
+ [JsonProperty("bearing_after")]
+ public int BearingAfter { get; set; }
+
+ ///
+ /// Gets or sets the type.
+ ///
+ /// The type.
+ [JsonProperty("type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets the modifier.
+ ///
+ /// The modifier.
+ [JsonProperty("modifier")]
+ public string Modifier { get; set; }
+
+ ///
+ /// Gets or sets the bearing before.
+ ///
+ /// The bearing before.
+ [JsonProperty("bearing_before")]
+ public int BearingBefore { get; set; }
+
+ ///
+ /// Gets or sets the location.
+ ///
+ /// The location.
+ [JsonProperty("Location")]
+ public Vector2d Location { get; set; }
+
+ ///
+ /// Gets or sets the instruction.
+ ///
+ /// The instruction.
+ [JsonProperty("instruction")]
+ public string Instruction { get; set; }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Maneuver.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Maneuver.cs.meta
new file mode 100644
index 0000000..fb03330
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Maneuver.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 41f778a9c28ef4b17ace4d80f89dbc7a
+timeCreated: 1493218361
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Route.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Route.cs
new file mode 100644
index 0000000..7b53669
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Route.cs
@@ -0,0 +1,61 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ using System.Collections.Generic;
+ using Mapbox.Json;
+ using Mapbox.Utils;
+ using Mapbox.Utils.JsonConverters;
+
+ ///
+ /// A Route from a Directions API call.
+ ///
+ public class Route
+ {
+ ///
+ /// Gets or sets the legs.
+ ///
+ /// The legs.
+ [JsonProperty("legs")]
+ public List Legs { get; set; }
+
+ ///
+ /// Gets or sets the geometry. Polyline is an array of LatLng's.
+ ///
+ /// The geometry.
+ [JsonProperty("geometry")]
+ [JsonConverter(typeof(PolylineToVector2dListConverter))]
+ public List Geometry { get; set; }
+
+ ///
+ /// Gets or sets the duration.
+ ///
+ /// The duration.
+ [JsonProperty("duration")]
+ public double Duration { get; set; }
+
+ ///
+ /// Gets or sets the distance.
+ ///
+ /// The distance.
+ [JsonProperty("distance")]
+ public double Distance { get; set; }
+
+ ///
+ /// Float indicating the weight in units described by 'weight_name'.
+ ///
+ [JsonProperty("weight")]
+ public float Weight { get; set; }
+
+ ///
+ /// String indicating which weight was used. The default is routability which is duration based, with additional penalties for less desirable maneuvers.
+ ///
+ [JsonProperty("weight_name")]
+ public string WeightName { get; set; }
+
+ }
+}
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Route.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Route.cs.meta
new file mode 100644
index 0000000..df9799c
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Route.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 67e17dbf44b85417d90ee1b71d9749f3
+timeCreated: 1493218361
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Step.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Step.cs
new file mode 100644
index 0000000..a928e17
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Step.cs
@@ -0,0 +1,69 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ using System.Collections.Generic;
+ using Mapbox.Json;
+ using Mapbox.Utils;
+ using Mapbox.Utils.JsonConverters;
+
+ ///
+ /// A step from a Directions API call.
+ ///
+ public class Step
+ {
+ ///
+ /// Gets or sets the intersections.
+ ///
+ /// The intersections.
+ [JsonProperty("intersections")]
+ public List Intersections { get; set; }
+
+ ///
+ /// Gets or sets the geometry.
+ ///
+ /// The geometry.
+ [JsonProperty("geometry")]
+ [JsonConverter(typeof(PolylineToVector2dListConverter))]
+ public List Geometry { get; set; }
+
+ ///
+ /// Gets or sets the maneuver.
+ ///
+ /// The maneuver.
+ [JsonProperty("maneuver")]
+ public Maneuver Maneuver { get; set; }
+
+ ///
+ /// Gets or sets the duration.
+ ///
+ /// The duration.
+ [JsonProperty("duration")]
+ public double Duration { get; set; }
+
+ ///
+ /// Gets or sets the distance.
+ ///
+ /// The distance.
+ [JsonProperty("distance")]
+ public double Distance { get; set; }
+
+ ///
+ /// Gets or sets the name.
+ ///
+ /// The name.
+ [JsonProperty("name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the mode.
+ ///
+ /// The mode.
+ [JsonProperty("mode")]
+ public string Mode { get; set; }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Step.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Step.cs.meta
new file mode 100644
index 0000000..cdb7ec8
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Step.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: cb67b81b6de1f41fca077297633b5a7d
+timeCreated: 1493218361
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Waypoint.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Waypoint.cs
new file mode 100644
index 0000000..a0cd87e
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Waypoint.cs
@@ -0,0 +1,33 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ using Mapbox.Json;
+ using Mapbox.Utils;
+ using Mapbox.Utils.JsonConverters;
+
+ ///
+ /// A Waypoint from a Directions API call.
+ ///
+ public class Waypoint
+ {
+ ///
+ /// Gets or sets the name.
+ ///
+ /// The name.
+ [JsonProperty("name")]
+ public string Name { get; set; }
+
+ ///
+ /// Gets or sets the location.
+ ///
+ /// The location.
+ [JsonProperty("location")]
+ [JsonConverter(typeof(LonLatToVector2dConverter))]
+ public Vector2d Location { get; set; }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Waypoint.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Waypoint.cs.meta
new file mode 100644
index 0000000..c6b395d
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Response/Waypoint.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 813ff4647909949fdbd67f232221cab3
+timeCreated: 1493218361
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/RoutingProfile.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/RoutingProfile.cs
new file mode 100644
index 0000000..e9280bc
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/RoutingProfile.cs
@@ -0,0 +1,38 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Directions
+{
+ ///
+ /// Routing profile, affects how the route is calculated, prioritizing routes that fit
+ /// the profile the best.
+ ///
+ public sealed class RoutingProfile
+ {
+ /// The driving profile.
+ public static readonly RoutingProfile Driving = new RoutingProfile("mapbox/driving/");
+
+ /// The walking profile.
+ public static readonly RoutingProfile Walking = new RoutingProfile("mapbox/walking/");
+
+ /// The cycling profile.
+ public static readonly RoutingProfile Cycling = new RoutingProfile("mapbox/cycling/");
+
+ private readonly string profile;
+
+ private RoutingProfile(string profile)
+ {
+ this.profile = profile;
+ }
+
+ /// Converts the profile to a URL snippet.
+ /// A string to be appened to the direction query URL.
+ public override string ToString()
+ {
+ return this.profile;
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/RoutingProfile.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/RoutingProfile.cs.meta
new file mode 100644
index 0000000..76ea7ba
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/RoutingProfile.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 02efec76b920540358fd490e1c105268
+timeCreated: 1491243033
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding.meta
new file mode 100644
index 0000000..54d218a
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: d1dc4d11759e044eabaa4d5496a96275
+folderAsset: yes
+timeCreated: 1491243031
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ForwardGeocodeResource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ForwardGeocodeResource.cs
new file mode 100644
index 0000000..300425c
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ForwardGeocodeResource.cs
@@ -0,0 +1,206 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Geocoding
+{
+ using System;
+ using System.Collections.Generic;
+ using Mapbox.Utils;
+ using UnityEngine;
+
+ /// A forward geocode request.
+ public sealed class ForwardGeocodeResource : GeocodeResource
+ {
+ ///
+ /// ISO 3166-1 alpha-2 country codes.
+ /// See for all options.
+ ///
+ private static readonly List CountryCodes = new List()
+ {
+ "ad", "ae", "af", "ag", "ai", "al", "am", "ao", "aq", "ar", "as", "at", "au", "aw", "ax", "az", "ba", "bb", "bd", "be", "bf", "bg", "bh", "bi", "bj", "bl", "bm", "bn", "bo", "bq", "br", "bs", "bt", "bv", "bw", "by", "bz", "ca", "cc", "cd", "cf", "cg", "ch", "ci", "ck", "cl", "cm", "cn", "co", "cr", "cu", "cv", "cw", "cx", "cy", "cz", "de", "dj", "dk", "dm", "do", "dz", "ec", "ee", "eg", "eh", "er", "es", "et", "fi", "fj", "fk", "fm", "fo", "fr", "ga", "gb", "gd", "ge", "gf", "gg", "gh", "gi", "gl", "gm", "gn", "gp", "gq", "gr", "gs", "gt", "gu", "gw", "gy", "hk", "hm", "hn", "hr", "ht", "hu", "id", "ie", "il", "im", "in", "io", "iq", "ir", "is", "it", "je", "jm", "jo", "jp", "ke", "kg", "kh", "ki", "km", "kn", "kp", "kr", "kw", "ky", "kz", "la", "lb", "lc", "li", "lk", "lr", "ls", "lt", "lu", "lv", "ly", "ma", "mc", "md", "me", "mf", "mg", "mh", "mk", "ml", "mm", "mn", "mo", "mp", "mq", "mr", "ms", "mt", "mu", "mv", "mw", "mx", "my", "mz", "na", "nc", "ne", "nf", "ng", "ni", "nl", "no", "np", "nr", "nu", "nz", "om", "pa", "pe", "pf", "pg", "ph", "pk", "pl", "pm", "pn", "pr", "ps", "pt", "pw", "py", "qa", "re", "ro", "rs", "ru", "rw", "sa", "sb", "sc", "sd", "se", "sg", "sh", "si", "sj", "sk", "sl", "sm", "sn", "so", "sr", "ss", "st", "sv", "sx", "sy", "sz", "tc", "td", "tf", "tg", "th", "tj", "tk", "tl", "tm", "tn", "to", "tr", "tt", "tv", "tw", "tz", "ua", "ug", "um", "us", "uy", "uz", "va", "vc", "ve", "vg", "vi", "vn", "vu", "wf", "ws", "ye", "yt", "za", "zm", "zw"
+ };
+
+ // Required
+ private string query;
+
+ // Optional
+ private bool? autocomplete;
+
+ // Optional
+ private string[] country;
+
+ // Optional
+ private Vector2d? proximity;
+
+ // Optional
+ private Vector2dBounds? bbox;
+
+ /// Initializes a new instance of the class.
+ /// Place name for forward geocoding.
+ public ForwardGeocodeResource(string query)
+ {
+ this.Query = query;
+ }
+
+ /// Gets or sets the place name for forward geocoding.
+ public override string Query
+ {
+ get
+ {
+ return this.query;
+ }
+
+ set
+ {
+ this.query = value;
+ }
+ }
+
+ /// Gets or sets the autocomplete option.
+ public bool? Autocomplete
+ {
+ get
+ {
+ return this.autocomplete;
+ }
+
+ set
+ {
+ this.autocomplete = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the bounding box option. Bounding box is a rectangle within which to
+ /// limit results, given as .
+ ///
+ public Vector2dBounds? Bbox
+ {
+ get
+ {
+ return this.bbox;
+ }
+
+ set
+ {
+ this.bbox = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the country option. Country is an Array of ISO 3166 alpha 2 country codes.
+ /// For all possible values, .
+ ///
+ public string[] Country
+ {
+ get
+ {
+ return this.country;
+ }
+
+ set
+ {
+ if (value == null)
+ {
+ this.country = value;
+ return;
+ }
+
+ for (int i = 0; i < value.Length; i++)
+ {
+ // Validate that provided countries exist
+ if (!CountryCodes.Contains(value[i]))
+ {
+ throw new Exception("Invalid country shortcode. See https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2.");
+ }
+ }
+
+ this.country = value;
+ }
+ }
+
+ ///
+ /// Gets or sets the proximity option, which is a location around which to bias results,
+ /// given as .
+ ///
+ public Vector2d? Proximity
+ {
+ get
+ {
+ return this.proximity;
+ }
+
+ set
+ {
+ this.proximity = value;
+ }
+ }
+
+ /// Builds a forward geocode URL string.
+ /// A complete, valid forward geocode URL.
+ public override string GetUrl()
+ {
+ Dictionary opts = new Dictionary();
+
+ if (this.Autocomplete != null)
+ {
+ opts.Add("autocomplete", this.Autocomplete.ToString().ToLower());
+ }
+
+ if (this.Bbox != null)
+ {
+ var nonNullableBbox = (Vector2dBounds)this.Bbox;
+ opts.Add("bbox", nonNullableBbox.ToString());
+ }
+
+ if (this.Country != null)
+ {
+ opts.Add("country", ForwardGeocodeResource.GetUrlQueryFromArray(this.Country));
+ }
+
+ if (this.Proximity != null)
+ {
+ var nonNullableProx = (Vector2d)this.Proximity;
+ opts.Add("proximity", nonNullableProx.ToString());
+ }
+
+ if (this.Types != null)
+ {
+ opts.Add("types", GetUrlQueryFromArray(this.Types));
+ }
+
+ // !!!!!!!!!! HACK !!!!!!!
+ // we are seeing super weird behaviour on some iOS devices:
+ // crashes with properly escaped whitespaces %20 and commas %2C - and other special characters
+ // 'NSAllowsArbitraryLoads' and 'NSURLConnection finished with error - code - 1002'
+ // Use 'CFNETWORK_DIAGNOSTICS=1' in XCode to get more details https://stackoverflow.com/a/46748461
+
+ // trying to get rid of at least the most common characters - other will still crash
+#if UNITY_IOS
+ Query = Query
+ .Replace(",", " ")
+ .Replace(".", " ")
+ .Replace("-", " ");
+#endif
+
+ return
+ Constants.BaseAPI +
+ ApiEndpoint +
+ Mode +
+#if UNITY_IOS
+#if UNITY_2017_1_OR_NEWER
+ UnityEngine.Networking.UnityWebRequest.EscapeURL(Query) +
+#else
+ WWW.EscapeURL(Query) +
+#endif
+#else
+ Uri.EscapeDataString(Query) +
+#endif
+ ".json" +
+ EncodeQueryString(opts);
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ForwardGeocodeResource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ForwardGeocodeResource.cs.meta
new file mode 100644
index 0000000..527f7c6
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ForwardGeocodeResource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 33cb5b2bc4f6f4397a21fdd87dfa0048
+timeCreated: 1493833265
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/GeocodeResource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/GeocodeResource.cs
new file mode 100644
index 0000000..d800aaf
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/GeocodeResource.cs
@@ -0,0 +1,73 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Geocoding
+{
+ using System;
+ using System.Collections.Generic;
+ using Mapbox.Platform;
+
+ /// Base geocode class.
+ /// Type of Query field (either string or LatLng).
+ public abstract class GeocodeResource : Resource
+ {
+ /// A List of all possible geocoding feature types.
+ public static readonly List FeatureTypes = new List
+ {
+ "country", "region", "postcode", "place", "locality", "neighborhood", "address", "poi"
+ };
+
+ private readonly string apiEndpoint = "geocoding/v5/";
+
+ private readonly string mode = "mapbox.places/";
+
+ // Optional
+ private string[] types;
+
+ /// Gets or sets the query.
+ public abstract T Query { get; set; }
+
+ /// Gets the API endpoint as a partial URL path.
+ public override string ApiEndpoint {
+ get {
+ return this.apiEndpoint;
+ }
+ }
+
+ /// Gets the mode.
+ public string Mode {
+ get {
+ return this.mode;
+ }
+ }
+
+ /// Gets or sets which feature types to return results for.
+ public string[] Types {
+ get {
+ return this.types;
+ }
+
+ set {
+ if (value == null)
+ {
+ this.types = value;
+ return;
+ }
+
+ for (int i = 0; i < value.Length; i++)
+ {
+ // Validate provided types
+ if (!FeatureTypes.Contains(value[i]))
+ {
+ throw new Exception("Invalid type. Must be \"country\", \"region\", \"postcode\", \"place\", \"locality\", \"neighborhood\", \"address\", or \"poi\".");
+ }
+ }
+
+ this.types = value;
+ }
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/GeocodeResource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/GeocodeResource.cs.meta
new file mode 100644
index 0000000..f735cd3
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/GeocodeResource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: aba88323b8d91474fb3b991eb0bd9349
+timeCreated: 1491243034
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Geocoder.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Geocoder.cs
new file mode 100644
index 0000000..893d478
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Geocoder.cs
@@ -0,0 +1,87 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Geocoding
+{
+ using System;
+ using System.Text;
+ using Mapbox.Json;
+ using Mapbox.Platform;
+ using Mapbox.Utils.JsonConverters;
+
+ ///
+ /// Wrapper around the
+ /// Mapbox Geocoding API. The Geocoder does two things: geocoding and reverse geocoding.
+ ///
+ public sealed class Geocoder
+ {
+ private readonly IFileSource fileSource;
+
+ /// Initializes a new instance of the class.
+ /// Network access abstraction.
+ public Geocoder(IFileSource fileSource)
+ {
+ this.fileSource = fileSource;
+ }
+
+ /// Performs asynchronously a geocoding lookup.
+ /// Geocode resource.
+ /// Callback to be called after the request is completed.
+ /// String or LngLat. Should be automatically inferred.
+ ///
+ /// Returns a that can be used for canceling a pending
+ /// request. This handle can be completely ignored if there is no intention of ever
+ /// canceling the request.
+ ///
+ public IAsyncRequest Geocode(GeocodeResource geocode, Action callback)
+ {
+ return this.fileSource.Request(
+ geocode.GetUrl(),
+ (Response response) =>
+ {
+ var str = Encoding.UTF8.GetString(response.Data);
+
+ var data = Deserialize(str);
+
+ callback(data);
+ });
+ }
+
+ /// Performs asynchronously a geocoding lookup.
+ /// Geocode resource.
+ /// Callback to be called after the request is completed.
+ /// String or LngLat. Should be automatically inferred.
+ ///
+ /// Returns a that can be used for canceling a pending
+ /// request. This handle can be completely ignored if there is no intention of ever
+ /// canceling the request.
+ ///
+ public IAsyncRequest Geocode(GeocodeResource geocode, Action callback)
+ {
+ return this.fileSource.Request(
+ geocode.GetUrl(),
+ (Response response) =>
+ {
+ var str = Encoding.UTF8.GetString(response.Data);
+
+ var data = Deserialize(str);
+
+ callback(data);
+ });
+ }
+
+ ///
+ /// Deserialize the geocode response string into a .
+ ///
+ /// JSON String.
+ /// A .
+ /// Forward or reverse geocode.
+ public T Deserialize(string str)
+ {
+ return JsonConvert.DeserializeObject(str, JsonConverters.Converters);
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Geocoder.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Geocoder.cs.meta
new file mode 100644
index 0000000..6c6b64c
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Geocoder.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: d304b174589dd496993060116409b23c
+timeCreated: 1491336250
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response.meta
new file mode 100644
index 0000000..d9c5e71
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 5ef566ef707b848c4bac9b1f13fccf17
+folderAsset: yes
+timeCreated: 1491243031
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Feature.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Feature.cs
new file mode 100644
index 0000000..c215539
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Feature.cs
@@ -0,0 +1,96 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Geocoding {
+ using System;
+ using System.Collections.Generic;
+ using Mapbox.Json;
+ using Mapbox.Utils;
+ using Mapbox.Utils.JsonConverters;
+
+ /// A GeoJSON FeatureCollection of points returned by geocoding API.
+#if !WINDOWS_UWP
+ //http://stackoverflow.com/a/12903628
+ [Serializable]
+#endif
+ public class Feature {
+ /// Gets or sets the id. Ids are unique in the Mapbox geocoder.
+ /// The id.
+ [JsonProperty("id")]
+ public string Id { get; set; }
+
+ ///
+ /// Gets or sets feature type. One of country, region, postcode, place, locality, neighborhood, address, poi.
+ ///
+ /// The type.
+ [JsonProperty("type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets the text.
+ ///
+ /// The text.
+ [JsonProperty("text")]
+ public string Text { get; set; }
+
+ ///
+ /// Gets or sets the name of the place.
+ ///
+ /// The name of the place.
+ [JsonProperty("place_name")]
+ public string PlaceName { get; set; }
+
+ ///
+ /// Gets or sets the relevance.
+ ///
+ /// The relevance.
+ [JsonProperty("relevance")]
+ public double Relevance { get; set; }
+
+ ///
+ /// Gets or sets the properties.
+ ///
+ /// The properties.
+ [JsonProperty("properties")]
+ public Dictionary Properties { get; set; }
+
+ ///
+ /// Gets or sets the bbox.
+ ///
+ /// The bbox.
+ [JsonProperty("bbox", NullValueHandling = NullValueHandling.Ignore)]
+ [JsonConverter(typeof(BboxToVector2dBoundsConverter))]
+ public Vector2dBounds? Bbox { get; set; }
+
+ ///
+ /// Gets or sets the center.
+ ///
+ /// The center.
+ [JsonProperty("center")]
+ [JsonConverter(typeof(LonLatToVector2dConverter))]
+ public Vector2d Center { get; set; }
+
+ ///
+ /// Gets or sets the geometry.
+ ///
+ /// The geometry.
+ [JsonProperty("geometry")]
+ public Geometry Geometry { get; set; }
+
+ ///
+ /// Gets or sets the address.
+ ///
+ [JsonProperty("address", NullValueHandling = NullValueHandling.Ignore)]
+ public string Address { get; set; }
+
+ ///
+ /// Gets or sets the context.
+ ///
+ /// The context.
+ [JsonProperty("context", NullValueHandling = NullValueHandling.Ignore)]
+ public List> Context { get; set; }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Feature.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Feature.cs.meta
new file mode 100644
index 0000000..2c3e1f2
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Feature.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f0645486f47864cd390751dd94d0302f
+timeCreated: 1493218361
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/GeocodeResponse.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/GeocodeResponse.cs
new file mode 100644
index 0000000..10a7402
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/GeocodeResponse.cs
@@ -0,0 +1,71 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Geocoding {
+ using System;
+ using System.Collections.Generic;
+ using Mapbox.Json;
+
+ /// Base geocode response.
+#if !WINDOWS_UWP
+ //http://stackoverflow.com/a/12903628
+ [Serializable]
+#endif
+ public abstract class GeocodeResponse {
+ ///
+ /// Gets or sets the type.
+ ///
+ /// The type.
+ [JsonProperty("type", Order = 0)]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets the features.
+ ///
+ /// The features.
+ [JsonProperty("features", Order = 2)]
+ public List Features { get; set; }
+
+ ///
+ /// Gets or sets the attribution.
+ ///
+ /// The attribution.
+ [JsonProperty("attribution", Order = 3)]
+ public string Attribution { get; set; }
+ }
+
+ ///
+ /// Reverse Geocode response.
+ ///
+#if !WINDOWS_UWP
+ //http://stackoverflow.com/a/12903628
+ [Serializable]
+#endif
+ public class ReverseGeocodeResponse : GeocodeResponse {
+ ///
+ /// Gets or sets the query.
+ ///
+ /// The query.
+ [JsonProperty("query", Order = 1)]
+ public List Query { get; set; }
+ }
+
+ ///
+ /// Forward geocode response.
+ ///
+#if !WINDOWS_UWP
+ //http://stackoverflow.com/a/12903628
+ [Serializable]
+#endif
+ public class ForwardGeocodeResponse : GeocodeResponse {
+ ///
+ /// Gets or sets the query.
+ ///
+ /// The query.
+ [JsonProperty("query", Order = 1)]
+ public List Query { get; set; }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/GeocodeResponse.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/GeocodeResponse.cs.meta
new file mode 100644
index 0000000..05bcd49
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/GeocodeResponse.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f1cccf508c40144308be9518f5085a69
+timeCreated: 1491243035
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Geometry.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Geometry.cs
new file mode 100644
index 0000000..a22397e
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Geometry.cs
@@ -0,0 +1,34 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Geocoding {
+ using System;
+ using Mapbox.Json;
+ using Mapbox.Utils;
+ using Mapbox.Utils.JsonConverters;
+
+ /// Point geometry representing location of geocode result.
+#if !WINDOWS_UWP
+ //http://stackoverflow.com/a/12903628
+ [Serializable]
+#endif
+ public class Geometry {
+ ///
+ /// Gets or sets type. Geocode results will always be type: point.
+ ///
+ /// The GeoJSON geometry type.
+ [JsonProperty("type")]
+ public string Type { get; set; }
+
+ ///
+ /// Gets or sets coordinates. Because they are points, Geocode results will always be a single Geocoordinate.
+ ///
+ /// The coordinates.
+ [JsonConverter(typeof(LonLatToVector2dConverter))]
+ [JsonProperty("coordinates")]
+ public Vector2d Coordinates { get; set; }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Geometry.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Geometry.cs.meta
new file mode 100644
index 0000000..158cea7
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Response/Geometry.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b599e78a14b3d42c8822cec5d5775397
+timeCreated: 1493218361
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ReverseGeocodeResource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ReverseGeocodeResource.cs
new file mode 100644
index 0000000..8d60464
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ReverseGeocodeResource.cs
@@ -0,0 +1,55 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Geocoding
+{
+ using System.Collections.Generic;
+ using Mapbox.Utils;
+
+ /// A reverse geocode request.
+ public sealed class ReverseGeocodeResource : GeocodeResource
+ {
+ // Required
+ private Vector2d query;
+
+ /// Initializes a new instance of the class.
+ /// Location to reverse geocode.
+ public ReverseGeocodeResource(Vector2d query)
+ {
+ this.Query = query;
+ }
+
+ /// Gets or sets the location.
+ public override Vector2d Query {
+ get {
+ return this.query;
+ }
+
+ set {
+ this.query = value;
+ }
+ }
+
+ /// Builds a complete reverse geocode URL string.
+ /// A complete, valid reverse geocode URL string.
+ public override string GetUrl()
+ {
+ Dictionary opts = new Dictionary();
+
+ if (this.Types != null)
+ {
+ opts.Add("types", GetUrlQueryFromArray(this.Types));
+ }
+
+ return Constants.BaseAPI +
+ this.ApiEndpoint +
+ this.Mode +
+ this.Query.ToString() +
+ ".json" +
+ EncodeQueryString(opts);
+ }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ReverseGeocodeResource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ReverseGeocodeResource.cs.meta
new file mode 100644
index 0000000..e77ee51
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/ReverseGeocodeResource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 23c6d0bd3662648d3859495c35635b64
+timeCreated: 1493833265
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map.meta
new file mode 100644
index 0000000..5043e9f
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 67003c49d480847189c0d8e81c14da83
+folderAsset: yes
+timeCreated: 1491243031
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/CanonicalTileId.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/CanonicalTileId.cs
new file mode 100644
index 0000000..20f1f25
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/CanonicalTileId.cs
@@ -0,0 +1,117 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ using System;
+ using Mapbox.Utils;
+
+ ///
+ /// Data type to store Web Mercator tile scheme.
+ /// See tile IDs in action.
+ ///
+ public struct CanonicalTileId : IEquatable
+ {
+ /// The zoom level.
+ public readonly int Z;
+
+ /// The X coordinate in the tile grid.
+ public readonly int X;
+
+ /// The Y coordinate in the tile grid.
+ public readonly int Y;
+
+ ///
+ /// Initializes a new instance of the struct,
+ /// representing a tile coordinate in a slippy map.
+ ///
+ /// The z coordinate or the zoom level.
+ /// The x coordinate.
+ /// The y coordinate.
+ public CanonicalTileId(int z, int x, int y)
+ {
+ this.Z = z;
+ this.X = x;
+ this.Y = y;
+ }
+
+ internal CanonicalTileId(UnwrappedTileId unwrapped)
+ {
+ var z = unwrapped.Z;
+ var x = unwrapped.X;
+ var y = unwrapped.Y;
+
+ var wrap = (x < 0 ? x - (1 << z) + 1 : x) / (1 << z);
+
+ this.Z = z;
+ this.X = x - wrap * (1 << z);
+ this.Y = y < 0 ? 0 : Math.Min(y, (1 << z) - 1);
+ }
+
+ ///
+ /// Get the cordinate at the top left of corner of the tile.
+ ///
+ /// The coordinate.
+ public Vector2d ToVector2d()
+ {
+ double n = Math.PI - ((2.0 * Math.PI * this.Y) / Math.Pow(2.0, this.Z));
+
+ double lat = 180.0 / Math.PI * Math.Atan(Math.Sinh(n));
+ double lng = (this.X / Math.Pow(2.0, this.Z) * 360.0) - 180.0;
+
+ // FIXME: Super hack because of rounding issues.
+ return new Vector2d(lat - 0.0001, lng + 0.0001);
+ }
+
+ ///
+ /// Returns a that represents the current
+ /// .
+ ///
+ ///
+ /// A that represents the current
+ /// .
+ ///
+ public override string ToString()
+ {
+ return this.Z + "/" + this.X + "/" + this.Y;
+ }
+
+ #region Equality
+ public bool Equals(CanonicalTileId other)
+ {
+ return this.X == other.X && this.Y == other.Y && this.Z == other.Z;
+ }
+
+ public override int GetHashCode()
+ {
+ return X ^ Y ^ Z;
+ }
+
+ public static bool operator ==(CanonicalTileId a, CanonicalTileId b)
+ {
+ return a.X == b.X && a.Y == b.Y && a.Z == b.Z;
+ }
+
+ public static bool operator !=(CanonicalTileId a, CanonicalTileId b)
+ {
+ return !(a == b);
+ }
+
+ public override bool Equals(object obj)
+ {
+ if (obj is CanonicalTileId)
+ {
+ return this.Equals((CanonicalTileId)obj);
+ }
+ else
+ {
+ return false;
+ }
+ }
+
+ #endregion
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/CanonicalTileId.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/CanonicalTileId.cs.meta
new file mode 100644
index 0000000..8b00bd2
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/CanonicalTileId.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b032ac6adcdd94a899ef544e06b9e828
+timeCreated: 1493952209
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRasterTile.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRasterTile.cs
new file mode 100644
index 0000000..ffdf335
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRasterTile.cs
@@ -0,0 +1,22 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ ///
+ /// A raster tile from the Mapbox Map API, a encoded image representing a geographic
+ /// bounding box. Usually JPEG or PNG encoded.
+ /// See for usage.
+ /// Read more about static classic maps .
+ ///
+ public class ClassicRasterTile : RasterTile
+ {
+ internal override TileResource MakeTileResource(string tilesetId)
+ {
+ return TileResource.MakeClassicRaster(Id, tilesetId);
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRasterTile.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRasterTile.cs.meta
new file mode 100644
index 0000000..c721171
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRasterTile.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 26ff02ff702b3417b9d4514af452c64f
+timeCreated: 1494603018
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRetinaRasterTile.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRetinaRasterTile.cs
new file mode 100644
index 0000000..945ca4e
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRetinaRasterTile.cs
@@ -0,0 +1,22 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ ///
+ /// A retina-resolution raster tile from the Mapbox Map API, a encoded image representing a geographic
+ /// bounding box. Usually JPEG or PNG encoded.
+ /// Like , but higher resolution.
+ /// See retina documentation .
+ ///
+ public class ClassicRetinaRasterTile : ClassicRasterTile
+ {
+ internal override TileResource MakeTileResource(string tilesetId)
+ {
+ return TileResource.MakeClassicRetinaRaster(Id, tilesetId);
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRetinaRasterTile.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRetinaRasterTile.cs.meta
new file mode 100644
index 0000000..1969c52
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/ClassicRetinaRasterTile.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 83237273afa4e4a8a9a0600d8c694e38
+timeCreated: 1494603018
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Map.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Map.cs
new file mode 100644
index 0000000..dbed73c
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Map.cs
@@ -0,0 +1,236 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ using System;
+ using System.Collections.Generic;
+ using Mapbox.Platform;
+ using Mapbox.Utils;
+
+ ///
+ /// The Mapbox Map abstraction will take care of fetching and decoding
+ /// data for a geographic bounding box at a certain zoom level.
+ ///
+ ///
+ /// The tile type, currently or
+ /// .
+ ///
+ ///
+ /// Request a map of the whole world:
+ ///
+ /// var map = new Map<RasterTile>(MapboxAccess.Instance);
+ /// map.Zoom = 2
+ /// map.Vector2dBounds = Vector2dBounds.World();
+ /// map.TilesetId = "mapbox://styles/mapbox/streets-v10
+ ///
+ /// // Register for tile updates.
+ /// map.Subscribe(this);
+ ///
+ /// // Trigger the request.
+ /// map.Update();
+ ///
+ ///
+ public sealed class Map : Mapbox.Utils.IObservable where T : Tile, new()
+ {
+ ///
+ /// Arbitrary limit of tiles this class will handle simultaneously.
+ ///
+ public const int TileMax = 256;
+
+ private readonly IFileSource fs;
+ private Vector2dBounds latLngBounds;
+ private int zoom;
+ private string tilesetId;
+
+ private HashSet tiles = new HashSet();
+ private List> observers = new List>();
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// The data source abstraction.
+ public Map(IFileSource fs)
+ {
+ this.fs = fs;
+ this.latLngBounds = new Vector2dBounds();
+ this.zoom = 0;
+ }
+
+ ///
+ /// Gets or sets the tileset ID. If not set, it will use the default
+ /// tileset ID for the tile type. I.e. "mapbox.satellite" for raster tiles
+ /// and "mapbox.mapbox-streets-v7" for vector tiles.
+ ///
+ ///
+ /// The tileset ID, usually in the format "user.mapid". Exceptionally,
+ /// will take the full style URL
+ /// from where the tile is composited from, like "mapbox://styles/mapbox/streets-v9".
+ ///
+ public string TilesetId
+ {
+ get
+ {
+ return this.tilesetId;
+ }
+
+ set
+ {
+ if (this.tilesetId == value)
+ {
+ return;
+ }
+
+ this.tilesetId = value;
+
+ foreach (Tile tile in this.tiles)
+ {
+ tile.Cancel();
+ }
+
+ this.tiles.Clear();
+ }
+ }
+
+ ///
+ /// Gets the tiles, vector or raster. Tiles might be
+ /// in a incomplete state.
+ ///
+ /// The tiles.
+ public HashSet Tiles
+ {
+ get
+ {
+ return this.tiles;
+ }
+ }
+
+ /// Gets or sets a geographic bounding box.
+ /// New geographic bounding box.
+ public Vector2dBounds Vector2dBounds
+ {
+ get
+ {
+ return this.latLngBounds;
+ }
+
+ set
+ {
+ this.latLngBounds = value;
+ }
+ }
+
+ /// Gets or sets the central coordinate of the map.
+ /// The central coordinate.
+ public Vector2d Center
+ {
+ get
+ {
+ return this.latLngBounds.Center;
+ }
+
+ set
+ {
+ this.latLngBounds.Center = value;
+ }
+ }
+
+ /// Gets or sets the map zoom level.
+ /// The new zoom level.
+ public int Zoom
+ {
+ get
+ {
+ return this.zoom;
+ }
+
+ set
+ {
+ this.zoom = Math.Max(0, Math.Min(20, value));
+ }
+ }
+
+ ///
+ /// Sets the coordinates bounds and zoom at once.
+ ///
+ /// Coordinates bounds.
+ /// Zoom level.
+ public void SetVector2dBoundsZoom(Vector2dBounds bounds, int zoom)
+ {
+ this.latLngBounds = bounds;
+ this.zoom = zoom;
+ }
+
+ /// Add an to the observer list.
+ /// The object subscribing to events.
+ public void Subscribe(Mapbox.Utils.IObserver observer)
+ {
+ this.observers.Add(observer);
+ }
+
+ /// Remove an to the observer list.
+ /// The object unsubscribing to events.
+ public void Unsubscribe(Mapbox.Utils.IObserver observer)
+ {
+ this.observers.Remove(observer);
+ }
+
+ private void NotifyNext(T next)
+ {
+ var copy = new List>(this.observers);
+
+ foreach (Mapbox.Utils.IObserver observer in copy)
+ {
+ observer.OnNext(next);
+ }
+ }
+
+ ///
+ /// Request tiles after changing map properties.
+ ///
+ public void Update()
+ {
+ var cover = TileCover.Get(this.latLngBounds, this.zoom);
+
+ if (cover.Count > TileMax)
+ {
+ return;
+ }
+
+ // Do not request tiles that we are already requesting
+ // but at the same time exclude the ones we don't need
+ // anymore, cancelling the network request.
+ this.tiles.RemoveWhere((T tile) =>
+ {
+ if (cover.Remove(tile.Id))
+ {
+ return false;
+ }
+ else
+ {
+ tile.Cancel();
+ this.NotifyNext(tile);
+
+ return true;
+ }
+ });
+
+ foreach (CanonicalTileId id in cover)
+ {
+ var tile = new T();
+
+ Tile.Parameters param;
+ param.Id = id;
+ param.TilesetId = this.tilesetId;
+ param.Fs = this.fs;
+
+ tile.Initialize(param, () => { this.NotifyNext(tile); });
+
+ this.tiles.Add(tile);
+ }
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Map.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Map.cs.meta
new file mode 100644
index 0000000..44379ba
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Map.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 24bb3ef727dad4e1385a77beef324ff0
+timeCreated: 1494441866
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/MapUtils.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/MapUtils.cs
new file mode 100644
index 0000000..cdfb48d
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/MapUtils.cs
@@ -0,0 +1,58 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ using System;
+ using Mapbox.Utils;
+
+ ///
+ /// Utilities for working with Map APIs.
+ ///
+ public static class MapUtils
+ {
+ ///
+ /// Normalizes a static style URL.
+ ///
+ /// The static style URL.
+ /// A url, either a Mapbox URI (mapbox://{username}/{styleid}) or a full url to a map.
+ public static string NormalizeStaticStyleURL(string url)
+ {
+ bool isMapboxUrl = url.StartsWith("mapbox://", StringComparison.Ordinal);
+
+ // Support full Mapbox URLs by returning here if a mapbox URL is not detected.
+ if (!isMapboxUrl)
+ {
+ return url;
+ }
+
+ string[] split = url.Split('/');
+ var user = split[3];
+ var style = split[4];
+ var draft = string.Empty;
+
+ if (split.Length > 5)
+ {
+ draft = "/draft";
+ }
+
+ return Constants.BaseAPI + "styles/v1/" + user + "/" + style + draft + "/tiles";
+ }
+
+ ///
+ /// Converts a TilesetId to a URL.
+ ///
+ /// The identifier to URL.
+ /// The style id.
+ public static string TilesetIdToUrl(string id)
+ {
+ // TODO: Validate that id is a real id
+ const string MapBaseApi = Constants.BaseAPI + "v4/";
+
+ return MapBaseApi + id;
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/MapUtils.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/MapUtils.cs.meta
new file mode 100644
index 0000000..7a22493
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/MapUtils.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a237cc1b965e34670a7c74ecf2bdbee3
+timeCreated: 1491243034
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RasterTile.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RasterTile.cs
new file mode 100644
index 0000000..cc98398
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RasterTile.cs
@@ -0,0 +1,69 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ ///
+ /// A raster tile from the Mapbox Style API, an encoded image representing a geographic
+ /// bounding box. Usually JPEG or PNG encoded.
+ ///
+ ///
+ /// Making a RasterTile request:
+ ///
+ /// var parameters = new Tile.Parameters();
+ /// parameters.Fs = MapboxAccess.Instance;
+ /// parameters.Id = new CanonicalTileId(_zoom, _tileCoorindateX, _tileCoordinateY);
+ /// parameters.TilesetId = "mapbox://styles/mapbox/satellite-v9";
+ /// var rasterTile = new RasterTile();
+ ///
+ /// // Make the request.
+ /// rasterTile.Initialize(parameters, (Action)(() =>
+ /// {
+ /// if (!string.IsNullOrEmpty(rasterTile.Error))
+ /// {
+ /// // Handle the error.
+ /// }
+ ///
+ /// // Consume the .
+ /// }));
+ ///
+ ///
+ public class RasterTile : Tile
+ {
+ private byte[] data;
+
+ /// Gets the raster tile raw data.
+ /// The raw data, usually an encoded JPEG or PNG.
+ ///
+ /// Consuming data in Unity to create a Texture2D:
+ ///
+ /// var texture = new Texture2D(0, 0);
+ /// texture.LoadImage(rasterTile.Data);
+ /// _sampleMaterial.mainTexture = texture;
+ ///
+ ///
+ public byte[] Data
+ {
+ get
+ {
+ return this.data;
+ }
+ }
+
+ internal override TileResource MakeTileResource(string tilesetId)
+ {
+ return TileResource.MakeRaster(Id, tilesetId);
+ }
+
+ internal override bool ParseTileData(byte[] data)
+ {
+ // We do not parse raster tiles as they are
+ this.data = data;
+
+ return true;
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RasterTile.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RasterTile.cs.meta
new file mode 100644
index 0000000..f543bd3
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RasterTile.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 01d65e8417e21498f88939119e4fe3ab
+timeCreated: 1493756686
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RawPngRasterTile.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RawPngRasterTile.cs
new file mode 100644
index 0000000..b7e8bbe
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RawPngRasterTile.cs
@@ -0,0 +1,36 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ ///
+ /// A raster tile containing an encoded RGBA PNG.
+ /// Read about global elevation data.
+ ///
+ ///
+ /// Print the real world height, in meters, for each pixel:
+ ///
+ /// var texture = new Texture2D(0, 0);
+ /// texture.LoadImage(tile.Data);
+ /// for (int i = 0; i < texture.width; i++)
+ /// {
+ /// for (int j = 0; j < texture.height; j++)
+ /// {
+ /// var color = texture.GetPixel(i, j);
+ /// var height = Conversions.GetAbsoluteHeightFromColor(color);
+ /// Console.Write("Height: " + height);
+ /// }
+ /// }
+ ///
+ ///
+ public sealed class RawPngRasterTile : RasterTile
+ {
+ internal override TileResource MakeTileResource(string tilesetId)
+ {
+ return TileResource.MakeRawPngRaster(Id, tilesetId);
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RawPngRasterTile.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RawPngRasterTile.cs.meta
new file mode 100644
index 0000000..c820bc5
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RawPngRasterTile.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ab4a5e34c15df42b3b4d5bf5c9b6b9b1
+timeCreated: 1493952209
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RetinaRasterTile.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RetinaRasterTile.cs
new file mode 100644
index 0000000..e0ea43c
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RetinaRasterTile.cs
@@ -0,0 +1,22 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ ///
+ /// A retin-resolution raster tile from the Mapbox Style API, an encoded image representing a geographic
+ /// bounding box. Usually JPEG or PNG encoded.
+ /// Like , but higher resolution.
+ /// See retina documentation .
+ ///
+ public class RetinaRasterTile : RasterTile
+ {
+ internal override TileResource MakeTileResource(string tilesetId)
+ {
+ return TileResource.MakeRetinaRaster(Id, tilesetId);
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RetinaRasterTile.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RetinaRasterTile.cs.meta
new file mode 100644
index 0000000..c16fe7f
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/RetinaRasterTile.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 9cd3514d26c4b4c7685f804af02d388b
+timeCreated: 1494603018
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Tile.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Tile.cs
new file mode 100644
index 0000000..fc697bc
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Tile.cs
@@ -0,0 +1,277 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ using System;
+ using Mapbox.Platform;
+ using System.Linq;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using Mapbox.Unity.Utilities;
+
+
+ ///
+ /// A Map tile, a square with vector or raster data representing a geographic
+ /// bounding box. More info
+ /// here .
+ ///
+ public abstract class Tile : IAsyncRequest
+ {
+
+
+ private CanonicalTileId _id;
+ private List _exceptions;
+ private State _state = State.New;
+ private IAsyncRequest _request;
+ private Action _callback;
+
+ /// Tile state.
+ public enum State
+ {
+ /// New tile, not yet initialized.
+ New,
+ /// Loading data.
+ Loading,
+ /// Data loaded and parsed.
+ Loaded,
+ /// Data loading cancelled.
+ Canceled,
+ /// Data has been loaded before and got updated.
+ Updated
+ }
+
+ /// Gets the identifier.
+ /// The canonical tile identifier.
+ public CanonicalTileId Id
+ {
+ get { return _id; }
+ set { _id = value; }
+ }
+
+
+ /// Flag to indicate if the request was successful
+ public bool HasError
+ {
+ get
+ {
+ return _exceptions == null ? false : _exceptions.Count > 0;
+ }
+ }
+
+
+ /// Exceptions that might have occured during creation of the tile.
+ public ReadOnlyCollection Exceptions
+ {
+ get { return null == _exceptions ? null : _exceptions.AsReadOnly(); }
+ }
+
+
+ /// Messages of exceptions otherwise empty string.
+ public string ExceptionsAsString
+ {
+ get
+ {
+ if (null == _exceptions || _exceptions.Count == 0) { return string.Empty; }
+ return string.Join(Environment.NewLine, _exceptions.Select(e => e.Message).ToArray());
+ }
+ }
+
+
+ ///
+ /// Sets the error message.
+ ///
+ ///
+ internal void AddException(Exception ex)
+ {
+ if (null == _exceptions) { _exceptions = new List(); }
+ _exceptions.Add(ex);
+ }
+
+
+ ///
+ /// Gets the current state. When fully loaded, you must
+ /// check if the data actually arrived and if the tile
+ /// is accusing any error.
+ ///
+ /// The tile state.
+ public State CurrentState
+ {
+ get
+ {
+ return _state;
+ }
+ }
+
+
+ public HttpRequestType RequestType { get { return _request.RequestType; } }
+
+
+ public bool IsCompleted
+ {
+ get
+ {
+ return _state == State.Loaded;
+ }
+ }
+
+ ///
+ /// Initializes the object. It will
+ /// start a network request and fire the callback when completed.
+ ///
+ /// Initialization parameters.
+ /// The completion callback.
+ public void Initialize(Parameters param, Action callback)
+ {
+ Cancel();
+
+ _state = State.Loading;
+ _id = param.Id;
+ _callback = callback;
+ _request = param.Fs.Request(MakeTileResource(param.TilesetId).GetUrl(), HandleTileResponse, tileId: _id, tilesetId: param.TilesetId);
+ }
+
+ internal void Initialize(IFileSource fileSource, CanonicalTileId canonicalTileId, string tilesetId, Action p)
+ {
+ Cancel();
+
+ _state = State.Loading;
+ _id = canonicalTileId;
+ _callback = p;
+ _request = fileSource.Request(MakeTileResource(tilesetId).GetUrl(), HandleTileResponse, tileId: _id, tilesetId: tilesetId);
+ }
+
+ ///
+ /// Returns a that represents the current
+ /// .
+ ///
+ ///
+ /// A that represents the current
+ /// .
+ ///
+ public override string ToString()
+ {
+ return Id.ToString();
+ }
+
+
+ ///
+ /// Cancels the request for the object.
+ /// It will stop a network request and set the tile's state to Canceled.
+ ///
+ ///
+ ///
+ /// // Do not request tiles that we are already requesting
+ /// // but at the same time exclude the ones we don't need
+ /// // anymore, cancelling the network request.
+ /// tiles.RemoveWhere((T tile) =>
+ /// {
+ /// if (cover.Remove(tile.Id))
+ /// {
+ /// return false;
+ /// }
+ /// else
+ /// {
+ /// tile.Cancel();
+ /// NotifyNext(tile);
+ /// return true;
+ /// }
+ /// });
+ ///
+ ///
+ public void Cancel()
+ {
+ if (_request != null)
+ {
+ _request.Cancel();
+ _request = null;
+ }
+
+ _state = State.Canceled;
+ }
+
+
+ // Get the tile resource (raster/vector/etc).
+ internal abstract TileResource MakeTileResource(string tilesetId);
+
+
+ // Decode the tile.
+ internal abstract bool ParseTileData(byte[] data);
+
+
+ // TODO: Currently the tile decoding is done on the main thread. We must implement
+ // a Worker class to abstract this, so on platforms that support threads (like Unity
+ // on the desktop, Android, etc) we can use worker threads and when building for
+ // the browser, we keep it single-threaded.
+ List ids = new List();
+ private void HandleTileResponse(Response response)
+ {
+
+ if (response.HasError)
+ {
+ if (!ids.Contains(_id.ToString()))
+ ids.Add(_id.ToString());
+ else
+ return;
+
+ response.Exceptions.ToList().ForEach(e => AddException(e));
+ }
+ else
+ {
+ // only try to parse if request was successful
+
+ // current implementation doesn't need to check if parsing is successful:
+ // * Mapbox.Map.VectorTile.ParseTileData() already adds any exception to the list
+ // * Mapbox.Map.RasterTile.ParseTileData() doesn't do any parsing
+ ParseTileData(response.Data);
+ }
+
+ // Cancelled is not the same as loaded!
+ if (_state != State.Canceled)
+ {
+ if (response.IsUpdate)
+ {
+ _state = State.Updated;
+ }
+ else
+ {
+ _state = State.Loaded;
+ }
+ }
+ _callback();
+ }
+
+
+ ///
+ /// Parameters for initializing a Tile object.
+ ///
+ ///
+ ///
+ /// var parameters = new Tile.Parameters();
+ /// parameters.Fs = MapboxAccess.Instance;
+ /// parameters.Id = new CanonicalTileId(_zoom, _tileCoorindateX, _tileCoordinateY);
+ /// parameters.TilesetId = "mapbox.mapbox-streets-v7";
+ ///
+ ///
+ public struct Parameters
+ {
+ /// The tile id.
+ public CanonicalTileId Id;
+
+ ///
+ /// The tileset ID, usually in the format "user.mapid". Exceptionally,
+ /// will take the full style URL
+ /// from where the tile is composited from, like mapbox://styles/mapbox/streets-v9.
+ ///
+ public string TilesetId;
+
+ /// The data source abstraction.
+ public IFileSource Fs;
+ }
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Tile.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Tile.cs.meta
new file mode 100644
index 0000000..35484c6
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/Tile.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8010c0fffeba24190a0e4a5a5f4317c6
+timeCreated: 1494951007
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileCover.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileCover.cs
new file mode 100644
index 0000000..40f25d6
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileCover.cs
@@ -0,0 +1,159 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ using System;
+ using System.Collections.Generic;
+ using Mapbox.Utils;
+ using UnityEngine;
+
+ ///
+ /// Helper funtions to get a tile cover, i.e. a set of tiles needed for
+ /// covering a bounding box.
+ ///
+ public static class TileCover
+ {
+ /// Get a tile cover for the specified bounds and zoom.
+ /// Geographic bounding box.
+ /// Zoom level.
+ /// The tile cover set.
+ ///
+ /// Build a map of Colorado using TileCover:
+ ///
+ /// var sw = new Vector2d(36.997749, -109.0524961);
+ /// var ne = new Vector2d(41.0002612, -102.0609668);
+ /// var coloradoBounds = new Vector2dBounds(sw, ne);
+ /// var tileCover = TileCover.Get(coloradoBounds, 8);
+ /// Console.Write("Tiles Needed: " + tileCover.Count);
+ /// foreach (var id in tileCover)
+ /// {
+ /// var tile = new RasterTile();
+ /// var parameters = new Tile.Parameters();
+ /// parameters.Id = id;
+ /// parameters.Fs = MapboxAccess.Instance;
+ /// parameters.TilesetId = "mapbox://styles/mapbox/outdoors-v10";
+ /// tile.Initialize(parameters, (Action)(() =>
+ /// {
+ /// // Place tiles and load textures.
+ /// }));
+ /// }
+ ///
+ ///
+ public static HashSet Get(Vector2dBounds bounds, int zoom)
+ {
+ var tiles = new HashSet();
+
+ if (bounds.IsEmpty() ||
+ bounds.South > Constants.LatitudeMax ||
+ bounds.North < -Constants.LatitudeMax)
+ {
+ return tiles;
+ }
+
+ var hull = Vector2dBounds.FromCoordinates(
+ new Vector2d(Math.Max(bounds.South, -Constants.LatitudeMax), bounds.West),
+ new Vector2d(Math.Min(bounds.North, Constants.LatitudeMax), bounds.East));
+
+ var sw = CoordinateToTileId(hull.SouthWest, zoom);
+ var ne = CoordinateToTileId(hull.NorthEast, zoom);
+
+ // Scanlines.
+ for (var x = sw.X; x <= ne.X; ++x)
+ {
+ for (var y = ne.Y; y <= sw.Y; ++y)
+ {
+ tiles.Add(new UnwrappedTileId(zoom, x, y).Canonical);
+ }
+ }
+
+ return tiles;
+ }
+
+
+ public static HashSet GetWithWebMerc(Vector2dBounds bounds, int zoom)
+ {
+ HashSet tiles = new HashSet();
+ HashSet canonicalTiles = new HashSet();
+
+ if (bounds.IsEmpty()) { return tiles; }
+
+ //stay within WebMerc bounds
+ Vector2d swWebMerc = new Vector2d(Math.Max(bounds.SouthWest.x, -Constants.WebMercMax), Math.Max(bounds.SouthWest.y, -Constants.WebMercMax));
+ Vector2d neWebMerc = new Vector2d(Math.Min(bounds.NorthEast.x, Constants.WebMercMax), Math.Min(bounds.NorthEast.y, Constants.WebMercMax));
+
+ UnwrappedTileId swTile = WebMercatorToTileId(swWebMerc, zoom);
+ UnwrappedTileId neTile = WebMercatorToTileId(neWebMerc, zoom);
+
+ for (int x = swTile.X; x <= neTile.X; x++)
+ {
+ for (int y = neTile.Y; y <= swTile.Y; y++)
+ {
+ UnwrappedTileId uwtid = new UnwrappedTileId(zoom, x, y);
+ //hack: currently too many tiles are created at lower zoom levels
+ //investigate formulas, this worked before
+ if (!canonicalTiles.Contains(uwtid.Canonical))
+ {
+ tiles.Add(uwtid);
+ canonicalTiles.Add(uwtid.Canonical);
+ }
+ }
+ }
+
+ return tiles;
+ }
+
+
+ /// Converts a coordinate to a tile identifier.
+ /// Geographic coordinate.
+ /// Zoom level.
+ /// The to tile identifier.
+ ///
+ /// Convert a geocoordinate to a TileId:
+ ///
+ /// var unwrappedTileId = TileCover.CoordinateToTileId(new Vector2d(40.015, -105.2705), 18);
+ /// Console.Write("UnwrappedTileId: " + unwrappedTileId.ToString());
+ ///
+ ///
+ public static UnwrappedTileId CoordinateToTileId(Vector2d coord, int zoom)
+ {
+ var lat = coord.x;
+ var lng = coord.y;
+
+ // See: http://wiki.openstreetmap.org/wiki/Slippy_map_tilenames
+ var x = (int)Math.Floor((lng + 180.0) / 360.0 * Math.Pow(2.0, zoom));
+ var y = (int)Math.Floor((1.0 - Math.Log(Math.Tan(lat * Math.PI / 180.0)
+ + 1.0 / Math.Cos(lat * Math.PI / 180.0)) / Math.PI) / 2.0 * Math.Pow(2.0, zoom));
+
+ return new UnwrappedTileId(zoom, x, y);
+ }
+
+
+
+ ///
+ /// Converts a Web Mercator coordinate to a tile identifier. https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Derivation_of_tile_names
+ ///
+ /// Web Mercator coordinate
+ /// Zoom level
+ /// The to tile identifier.
+ public static UnwrappedTileId WebMercatorToTileId(Vector2d webMerc, int zoom)
+ {
+ // See: https://wiki.openstreetmap.org/wiki/Slippy_map_tilenames#Derivation_of_tile_names
+ double tileCount = Math.Pow(2, zoom);
+
+ //this SDK defines Vector2d.x as latitude and Vector2d.y as longitude
+ //same for WebMerc, so we have to flip x/y to make this formula work
+ double dblX = webMerc.x / Constants.WebMercMax;
+ double dblY = webMerc.y / Constants.WebMercMax;
+
+ int x = (int)Math.Floor((1 + dblX) / 2 * tileCount);
+ int y = (int)Math.Floor((1 - dblY) / 2 * tileCount);
+ return new UnwrappedTileId(zoom, x, y);
+ }
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileCover.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileCover.cs.meta
new file mode 100644
index 0000000..e19e3f4
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileCover.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: fc67290bfffab4457b83802ef2f4c824
+timeCreated: 1494945808
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileErrorEventArgs.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileErrorEventArgs.cs
new file mode 100644
index 0000000..c01a1a9
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileErrorEventArgs.cs
@@ -0,0 +1,63 @@
+namespace Mapbox.Map
+{
+ using System;
+ using Mapbox.Unity.MeshGeneration.Data;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+
+ public class TileErrorEventArgs : EventArgs
+ {
+
+ ///
+ /// The tile identifier.
+ ///
+ public CanonicalTileId TileId;
+ ///
+ /// The exceptions.
+ ///
+ public List Exceptions;
+ ///
+ /// The unity tile instance.
+ ///
+ public UnityTile UnityTileInstance;
+ ///
+ /// The type of the tile.
+ ///
+ public Type TileType;
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Tile identifier.
+ /// Tile type.
+ /// Unity tile instance.
+ /// Exceptions as a List
+ public TileErrorEventArgs(CanonicalTileId TileId, Type TileType, UnityTile UnityTileInstance, List Exceptions)
+ {
+ this.TileId = TileId;
+ this.Exceptions = Exceptions;
+ this.UnityTileInstance = UnityTileInstance;
+ this.TileType = TileType;
+ }
+
+ ///
+ /// Initializes a new instance of the class.
+ ///
+ /// Tile identifier.
+ /// Tile type.
+ /// Unity tile instance.
+ /// Exceptions as a ReadOnlyCollection
+ public TileErrorEventArgs(CanonicalTileId TileId, Type TileType, UnityTile UnityTileInstance, ReadOnlyCollection Exceptions)
+ {
+ this.TileId = TileId;
+ List _exceptions = new List();
+ foreach (var exception in Exceptions)
+ {
+ _exceptions.Add(exception);
+ }
+ this.Exceptions = _exceptions;
+ this.UnityTileInstance = UnityTileInstance;
+ this.TileType = TileType;
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileErrorEventArgs.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileErrorEventArgs.cs.meta
new file mode 100644
index 0000000..1c57d97
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileErrorEventArgs.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 59c42a951767c4031966d5ae5c20a47a
+timeCreated: 1509068021
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileResource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileResource.cs
new file mode 100644
index 0000000..f1e7e85
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileResource.cs
@@ -0,0 +1,67 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+namespace Mapbox.Map
+{
+ using Platform;
+ using System;
+ using Mapbox.Unity.Telemetry;
+
+ public sealed class TileResource : IResource
+ {
+ readonly string _query;
+
+ internal TileResource(string query)
+ {
+ _query = query;
+ }
+
+ public static TileResource MakeRaster(CanonicalTileId id, string styleUrl)
+ {
+ return new TileResource(string.Format("{0}/{1}", MapUtils.NormalizeStaticStyleURL(styleUrl ?? "mapbox://styles/mapbox/satellite-v9"), id));
+ }
+
+ internal static TileResource MakeRetinaRaster(CanonicalTileId id, string styleUrl)
+ {
+ return new TileResource(string.Format("{0}/{1}@2x", MapUtils.NormalizeStaticStyleURL(styleUrl ?? "mapbox://styles/mapbox/satellite-v9"), id));
+ }
+
+ public static TileResource MakeClassicRaster(CanonicalTileId id, string tilesetId)
+ {
+ return new TileResource(string.Format("{0}/{1}.png", MapUtils.TilesetIdToUrl(tilesetId ?? "mapbox.satellite"), id));
+ }
+
+ internal static TileResource MakeClassicRetinaRaster(CanonicalTileId id, string tilesetId)
+ {
+ return new TileResource(string.Format("{0}/{1}@2x.png", MapUtils.TilesetIdToUrl(tilesetId ?? "mapbox.satellite"), id));
+ }
+
+ public static TileResource MakeRawPngRaster(CanonicalTileId id, string tilesetId)
+ {
+ return new TileResource(string.Format("{0}/{1}.pngraw", MapUtils.TilesetIdToUrl(tilesetId ?? "mapbox.terrain-rgb"), id));
+ }
+
+ public static TileResource MakeVector(CanonicalTileId id, string tilesetId)
+ {
+ return new TileResource(string.Format("{0}/{1}.vector.pbf", MapUtils.TilesetIdToUrl(tilesetId ?? "mapbox.mapbox-streets-v7"), id));
+ }
+
+ internal static TileResource MakeStyleOptimizedVector(CanonicalTileId id, string tilesetId, string optimizedStyleId, string modifiedDate)
+ {
+ return new TileResource(string.Format("{0}/{1}.vector.pbf?style={2}@{3}", MapUtils.TilesetIdToUrl(tilesetId ?? "mapbox.mapbox-streets-v7"), id, optimizedStyleId, modifiedDate));
+ }
+
+ public string GetUrl()
+ {
+ var uriBuilder = new UriBuilder(_query);
+ if (uriBuilder.Query != null && uriBuilder.Query.Length > 1)
+ {
+ uriBuilder.Query = uriBuilder.Query.Substring(1);
+ }
+ //return uriBuilder.ToString();
+ return uriBuilder.Uri.ToString();
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileResource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileResource.cs.meta
new file mode 100644
index 0000000..1a41326
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileResource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b56f5c7f0b51844c19d1267530b5acb1
+timeCreated: 1494603018
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/UnwrappedTileId.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/UnwrappedTileId.cs
new file mode 100644
index 0000000..c0aa3c2
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/UnwrappedTileId.cs
@@ -0,0 +1,147 @@
+using System;
+
+namespace Mapbox.Map
+{
+ ///
+ /// Unwrapped tile identifier in a slippy map. Similar to ,
+ /// but might go around the globe.
+ ///
+ public struct UnwrappedTileId : IEquatable
+ {
+ /// The zoom level.
+ public readonly int Z;
+
+ /// The X coordinate in the tile grid.
+ public readonly int X;
+
+ /// The Y coordinate in the tile grid.
+ public readonly int Y;
+
+ ///
+ /// Initializes a new instance of the struct,
+ /// representing a tile coordinate in a slippy map that might go around the
+ /// globe.
+ ///
+ /// The z coordinate.
+ /// The x coordinate.
+ /// The y coordinate.
+ public UnwrappedTileId(int z, int x, int y)
+ {
+ this.Z = z;
+ this.X = x;
+ this.Y = y;
+ }
+
+ /// Gets the canonical tile identifier.
+ /// The canonical tile identifier.
+ public CanonicalTileId Canonical
+ {
+ get
+ {
+ return new CanonicalTileId(this);
+ }
+ }
+
+ ///
+ /// Returns a that represents the current
+ /// .
+ ///
+ ///
+ /// A that represents the current
+ /// .
+ ///
+ public override string ToString()
+ {
+ return this.Z + "/" + this.X + "/" + this.Y;
+ }
+
+ public bool Equals(UnwrappedTileId other)
+ {
+ return this.X == other.X && this.Y == other.Y && this.Z == other.Z;
+ }
+
+ public override int GetHashCode()
+ {
+ return (X << 6) ^ (Y << 16) ^ (Z << 8);
+ }
+
+ public override bool Equals(object obj)
+ {
+ return this.X == ((UnwrappedTileId)obj).X && this.Y == ((UnwrappedTileId)obj).Y && this.Z == ((UnwrappedTileId)obj).Z;
+ }
+
+ public static bool operator ==(UnwrappedTileId a, UnwrappedTileId b)
+ {
+ return a.X == b.X && a.Y == b.Y && a.Z == b.Z;
+ }
+
+ public static bool operator !=(UnwrappedTileId a, UnwrappedTileId b)
+ {
+ return !(a == b);
+ }
+
+ public UnwrappedTileId North
+ {
+ get
+ {
+ return new UnwrappedTileId(Z, X, Y - 1);
+ }
+ }
+
+ public UnwrappedTileId East
+ {
+ get
+ {
+ return new UnwrappedTileId(Z, X + 1, Y);
+ }
+ }
+
+ public UnwrappedTileId South
+ {
+ get
+ {
+ return new UnwrappedTileId(Z, X, Y + 1);
+ }
+ }
+
+ public UnwrappedTileId West
+ {
+ get
+ {
+ return new UnwrappedTileId(Z, X - 1, Y);
+ }
+ }
+
+ public UnwrappedTileId NorthEast
+ {
+ get
+ {
+ return new UnwrappedTileId(Z, X + 1, Y - 1);
+ }
+ }
+
+ public UnwrappedTileId SouthEast
+ {
+ get
+ {
+ return new UnwrappedTileId(Z, X + 1, Y + 1);
+ }
+ }
+
+ public UnwrappedTileId NorthWest
+ {
+ get
+ {
+ return new UnwrappedTileId(Z, X - 1, Y - 1);
+ }
+ }
+
+ public UnwrappedTileId SouthWest
+ {
+ get
+ {
+ return new UnwrappedTileId(Z, X - 1, Y + 1);
+ }
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/UnwrappedTileId.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/UnwrappedTileId.cs.meta
new file mode 100644
index 0000000..0d4a8ad
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/UnwrappedTileId.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: b05b9f9c791be434db474b25089ff310
+timeCreated: 1494945808
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/VectorTile.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/VectorTile.cs
new file mode 100644
index 0000000..5dca85a
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/VectorTile.cs
@@ -0,0 +1,211 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Map
+{
+ using System.Collections.ObjectModel;
+ using Mapbox.Utils;
+ using Mapbox.VectorTile;
+ using Mapbox.VectorTile.ExtensionMethods;
+ using System;
+
+ ///
+ /// A decoded vector tile, as specified by the
+ ///
+ /// Mapbox Vector Tile specification.
+ /// See available layers and features here.
+ /// The tile might be incomplete if the network request and parsing are still pending.
+ ///
+ ///
+ /// Making a VectorTile request:
+ ///
+ /// var parameters = new Tile.Parameters();
+ /// parameters.Fs = MapboxAccess.Instance;
+ /// parameters.Id = new CanonicalTileId(_zoom, _tileCoorindateX, _tileCoordinateY);
+ /// parameters.TilesetId = "mapbox.mapbox-streets-v7";
+ /// var vectorTile = new VectorTile();
+ ///
+ /// // Make the request.
+ /// vectorTile.Initialize(parameters, (Action)(() =>
+ /// {
+ /// if (!string.IsNullOrEmpty(vectorTile.Error))
+ /// {
+ /// // Handle the error.
+ /// }
+ ///
+ /// // Consume the .
+ /// }));
+ ///
+ ///
+ public sealed class VectorTile : Tile, IDisposable
+ {
+ // FIXME: Namespace here is very confusing and conflicts (sematically)
+ // with his class. Something has to be renamed here.
+ private Mapbox.VectorTile.VectorTile data;
+
+ bool _isStyleOptimized = false;
+
+ string _optimizedStyleId;
+
+ string _modifiedDate;
+
+ private bool isDisposed = false;
+
+ /// Gets the vector decoded using Mapbox.VectorTile library.
+ /// The GeoJson data.
+ public Mapbox.VectorTile.VectorTile Data
+ {
+ get
+ {
+ return this.data;
+ }
+ }
+
+ public VectorTile()
+ {
+ _isStyleOptimized = false;
+ }
+
+ public VectorTile(string styleId, string modifiedDate)
+ {
+ if (string.IsNullOrEmpty(styleId) || string.IsNullOrEmpty(modifiedDate))
+ {
+ UnityEngine.Debug.LogWarning("Style Id or Modified Time cannot be empty for style optimized tilesets. Switching to regular tilesets!");
+ _isStyleOptimized = false;
+ }
+ else
+ {
+ _isStyleOptimized = true;
+ _optimizedStyleId = styleId;
+ _modifiedDate = modifiedDate;
+ }
+ }
+
+ //TODO: uncomment if 'VectorTile' class changes from 'sealed'
+ //protected override void Dispose(bool disposeManagedResources)
+ //~VectorTile()
+ //{
+ // Dispose(false);
+ //}
+
+
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ //TODO: change signature if 'VectorTile' class changes from 'sealed'
+ //protected override void Dispose(bool disposeManagedResources)
+ public void Dispose(bool disposeManagedResources)
+ {
+ if (!isDisposed)
+ {
+ if (disposeManagedResources)
+ {
+ //TODO implement IDisposable with Mapbox.VectorTile.VectorTile
+ if (null != data)
+ {
+ data = null;
+ }
+ }
+ }
+ }
+
+
+ ///
+ /// Gets the vector in a GeoJson format.
+ ///
+ /// This method should be avoided as it fully decodes the whole tile and might pose performance and memory bottle necks.
+ ///
+ ///
+ /// The GeoJson data.
+ ///
+ /// Inspect the GeoJson.
+ ///
+ /// var json = VectorTile.GeoJson;
+ /// Console.Write("GeoJson: " + json);
+ ///
+ ///
+ public string GeoJson
+ {
+ get
+ {
+ return this.data.ToGeoJson((ulong)Id.Z, (ulong)Id.X, (ulong)Id.Y, 0);
+ }
+ }
+
+
+ ///
+ /// Gets all availble layer names.
+ /// See available layers and features here.
+ ///
+ /// Collection of availble layers.
+ ///
+ /// Inspect the LayerNames.
+ ///
+ /// var layerNames = vectorTile.LayerNames();
+ /// foreach (var layer in layerNames)
+ /// {
+ /// Console.Write("Layer: " + layer);
+ /// }
+ ///
+ ///
+ public ReadOnlyCollection LayerNames()
+ {
+ return this.data.LayerNames();
+ }
+
+ // FIXME: Why don't these work?
+ ///
+ /// Decodes the requested layer.
+ ///
+ /// Name of the layer to decode.
+ /// Decoded VectorTileLayer or 'null' if an invalid layer name was specified.
+ ///
+ /// Inspect a layer of the vector tile.
+ ///
+ /// var countryLabelLayer = vectorTile.GetLayer("country_label");
+ /// var count = countryLabelLayer.Keys.Count;
+ /// for (int i = 0; i < count; i++)
+ /// {
+ /// Console.Write(string.Format("{0}:{1}", countryLabelLayer.Keys[i], countryLabelLayer.Values[i]));
+ /// }
+ ///
+ ///
+ public VectorTileLayer GetLayer(string layerName)
+ {
+ return this.data.GetLayer(layerName);
+ }
+
+
+ internal override TileResource MakeTileResource(string tilesetId)
+ {
+
+ return (_isStyleOptimized) ?
+ TileResource.MakeStyleOptimizedVector(Id, tilesetId, _optimizedStyleId, _modifiedDate)
+ : TileResource.MakeVector(Id, tilesetId);
+ }
+
+
+ internal override bool ParseTileData(byte[] data)
+ {
+ try
+ {
+ var decompressed = Compression.Decompress(data);
+ this.data = new Mapbox.VectorTile.VectorTile(decompressed);
+ return true;
+ }
+ catch (Exception ex)
+ {
+ AddException(ex);
+ return false;
+ }
+ }
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Map/VectorTile.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/VectorTile.cs.meta
new file mode 100644
index 0000000..fc053b5
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Map/VectorTile.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: bfd8ce307104a47389d62ff6cd67802c
+timeCreated: 1494951007
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching.meta
new file mode 100644
index 0000000..0ce8cec
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching.meta
@@ -0,0 +1,10 @@
+fileFormatVersion: 2
+guid: 2878fdebfe9305f4cab4f21e3c398837
+folderAsset: yes
+timeCreated: 1508237858
+licenseType: Pro
+DefaultImporter:
+ externalObjects: {}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatcher.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatcher.cs
new file mode 100644
index 0000000..d1794d3
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatcher.cs
@@ -0,0 +1,74 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2017 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.MapMatching
+{
+ using System;
+ using System.Text;
+ using Mapbox.Json;
+ using Mapbox.Platform;
+ using Mapbox.Utils.JsonConverters;
+
+ ///
+ /// Wrapper around the
+ /// Mapbox Map Matching API.
+ ///
+ public class MapMatcher
+ {
+ private readonly IFileSource _fileSource;
+ private int _timeout;
+
+ /// Initializes a new instance of the class.
+ /// Network access abstraction.
+ public MapMatcher(IFileSource fileSource, int timeout)
+ {
+ _fileSource = fileSource;
+ _timeout = timeout;
+ }
+
+ /// Performs asynchronously a geocoding lookup.
+ /// Geocode resource.
+ /// Callback to be called after the request is completed.
+ /// String or LngLat. Should be automatically inferred.
+ ///
+ /// Returns a that can be used for canceling a pending
+ /// request. This handle can be completely ignored if there is no intention of ever
+ /// canceling the request.
+ ///
+ public IAsyncRequest Match(MapMatchingResource match, Action callback)
+ {
+ string url = match.GetUrl();
+ return _fileSource.Request(
+ url,
+ (Response response) =>
+ {
+ var str = Encoding.UTF8.GetString(response.Data);
+ var data = Deserialize(str);
+
+ if (response.HasError)
+ {
+ data.SetRequestExceptions(response.Exceptions);
+ }
+
+ callback(data);
+ },
+ _timeout
+ );
+ }
+
+
+ ///
+ /// Deserialize the map match response string into a .
+ ///
+ /// JSON String.
+ /// A .
+ /// Map Matcher.
+ internal T Deserialize(string str)
+ {
+ return JsonConvert.DeserializeObject(str, JsonConverters.Converters);
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatcher.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatcher.cs.meta
new file mode 100644
index 0000000..a0a8a9f
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatcher.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: dfdfc6d95bc72494e8ae78580d2e6b44
+timeCreated: 1508239177
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingParameters.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingParameters.cs
new file mode 100644
index 0000000..eb15242
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingParameters.cs
@@ -0,0 +1,115 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2017 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+using System;
+using System.ComponentModel;
+using Mapbox.VectorTile.Geometry;
+
+namespace Mapbox.MapMatching
+{
+ /// Directions profile id
+ public enum Profile
+ {
+ [Description("mapbox/driving")]
+ MapboxDriving,
+ [Description("mapbox/driving-traffic")]
+ MapboxDrivingTraffic,
+ [Description("mapbox/walking")]
+ MapboxWalking,
+ [Description("mapbox/cycling")]
+ MapboxCycling
+ }
+
+
+ /// Format of the returned geometry. Default value 'Polyline' with precision 5.
+ public enum Geometries
+ {
+ /// Default, precision 5.
+ [Description("polyline")]
+ Polyline,
+ /// Precision 6.
+ [Description("polyline6")]
+ Polyline6,
+ /// Geojson.
+ [Description("geojson")]
+ GeoJson
+ }
+
+
+ /// Type of returned overview geometry.
+ public enum Overview
+ {
+ /// The most detailed geometry available
+ [Description("full")]
+ Full,
+ /// A simplified version of the full geometry
+ [Description("simplified")]
+ Simplified,
+ /// No overview geometry
+ [Description("false")]
+ None
+ }
+
+
+ /// Whether or not to return additional metadata along the route. Several annotations can be used.
+ [System.Flags]
+ public enum Annotations
+ {
+ [Description("duration")]
+ Duration,
+ [Description("distance")]
+ Distance,
+ [Description("speed")]
+ Speed,
+ [Description("congestion")]
+ Congestion
+ }
+
+
+ ///
+ /// https://www.mapbox.com/api-documentation/navigation/#retrieve-directions
+ ///
+ public enum InstructionLanguages
+ {
+ [Description("de")]
+ German,
+ [Description("en")]
+ English,
+ [Description("eo")]
+ Esperanto,
+ [Description("es")]
+ Spanish,
+ [Description("es-ES")]
+ SpanishSpain,
+ [Description("fr")]
+ French,
+ [Description("id")]
+ Indonesian,
+ [Description("it")]
+ Italian,
+ [Description("nl")]
+ Dutch,
+ [Description("pl")]
+ Polish,
+ [Description("pt-BR")]
+ PortugueseBrazil,
+ [Description("ro")]
+ Romanian,
+ [Description("ru")]
+ Russian,
+ [Description("sv")]
+ Swedish,
+ [Description("tr")]
+ Turkish,
+ [Description("uk")]
+ Ukrainian,
+ [Description("vi")]
+ Vietnamese,
+ [Description("zh-Hans")]
+ ChineseSimplified
+ }
+
+
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingParameters.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingParameters.cs.meta
new file mode 100644
index 0000000..2bef666
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingParameters.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 991f42eef2c18204cb4a6b79c6f98eed
+timeCreated: 1508237904
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResource.cs
new file mode 100644
index 0000000..bbb9e1e
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResource.cs
@@ -0,0 +1,209 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2017 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.MapMatching
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Linq;
+ using Mapbox.Platform;
+ using Mapbox.Utils;
+ using Mapbox.VectorTile.ExtensionMethods;
+
+ /// Base geocode class.
+ /// Type of Query field (either string or LatLng).
+ public class MapMatchingResource : Resource
+ {
+
+ private readonly string _apiEndpoint = "matching/v5/";
+ private Vector2d[] _coordinates;
+ private uint[] _radiuses;
+ private long[] _timestamps;
+
+
+ /// Gets the API endpoint as a partial URL path.
+ public override string ApiEndpoint
+ {
+ get { return _apiEndpoint; }
+ }
+
+
+ /// A directions profile ID.
+ public Profile Profile = Profile.MapboxDriving;
+
+
+ /// Coordinate to visit in order; there can be between 2 and 100 coordinates.
+ public Vector2d[] Coordinates
+ {
+ get { return _coordinates; }
+ set
+ {
+ if (null == value)
+ {
+ throw new Exception("Coordinates cannot be null.");
+ }
+ if (value.Length < 2 || value.Length > 100)
+ {
+ throw new Exception("Must be between 2 and 100 elements in coordinates array");
+ }
+
+ _coordinates = value;
+ }
+ }
+
+
+ ///
+ /// Format of the returned geometry.
+ /// Allowed values are: geojson (as LineString ), polyline with precision 5, polyline6 (polyline with precision 6).
+ /// The default value is polyline.
+ ///
+ public Nullable Geometries;
+
+
+ ///
+ /// A list of uints in meters indicating the assumed precision of the used tracking device.
+ /// There must be as many radiuses as there are coordinates in the request.
+ /// Values can be a number between 0 and 30.
+ /// Use higher numbers (20-30) for noisy traces and lower numbers (1-10) for clean traces.
+ /// The default value is 5.
+ ///
+ public uint[] Radiuses
+ {
+ get { return _radiuses; }
+ set
+ {
+ if (null == _coordinates) { throw new Exception("Coordinates not set"); }
+ //allow for nulling radiuses
+ if (null == value)
+ {
+ _radiuses = null;
+ return;
+ }
+ if (value.Length != _coordinates.Length) { throw new Exception("There must be as many radiuses as there are coordinates in the request."); }
+ if (value.Where(r => r == 0).Count() > 0) { throw new Exception("Radius must be greater than 0"); }
+
+ _radiuses = value;
+ }
+ }
+
+
+ ///
+ /// Whether to return steps and turn-by-turn instructions.
+ /// Can be true or false.
+ /// The default is false.
+ ///
+ public bool? Steps;
+
+
+ ///
+ /// Type of returned overview geometry.
+ /// Can be full (the most detailed geometry available), simplified (a simplified version of the full geometry), or none (no overview geometry).
+ /// The default is simplified.
+ ///
+ public Nullable Overview;
+
+
+ ///
+ /// Timestamps corresponding to each coordinate provided in the request.
+ /// Must be numbers in Unix time (seconds since the Unix epoch).
+ /// There must be as many timestamps as there are coordinates in the request.
+ ///
+ public long[] Timestamps
+ {
+ get { return _timestamps; }
+ set
+ {
+ if (null == _coordinates) { throw new Exception("Coordinates not set"); }
+ //allow for nulling timestamps
+ if (null == value)
+ {
+ _timestamps = null;
+ return;
+ }
+ if (value.Length != _coordinates.Length) { throw new Exception("There must be as many timestapms as there are coordinates in the request."); }
+
+ _timestamps = value;
+ }
+ }
+
+
+ ///
+ /// Whether or not to return additional metadata along the route.
+ /// Possible values are: duration, distance and speed.
+ /// Several annotations can be used.
+ /// Combine via '|'.
+ ///
+ public Nullable Annotations;
+
+
+ ///
+ /// Whether or not to transparently remove clusters and re-sample traces for improved map matching results.
+ /// Removed tracepoints are set to 'null' in the response!
+ /// Can be true or false.
+ /// The default is false.
+ ///
+ public bool? Tidy;
+
+
+ ///
+ /// Language of returned turn-by-turn text instructions.
+ /// The default is English.
+ ///
+ public Nullable Language;
+
+
+ public override string GetUrl()
+ {
+ if (null == _coordinates)
+ {
+ throw new Exception("Coordinates cannot be null.");
+ }
+
+ Dictionary options = new Dictionary();
+
+ if (Geometries.HasValue) { options.Add("geometries", Geometries.Value.Description()); }
+ if (null != _radiuses) { options.Add("radiuses", GetUrlQueryFromArray(_radiuses, ";")); }
+ if (Steps.HasValue) { options.Add("steps", Steps.ToString().ToLower()); }
+ if (Overview.HasValue) { options.Add("overview", Overview.Value.Description()); }
+ if (null != _timestamps) { options.Add("timestamps", GetUrlQueryFromArray(_timestamps, ";")); }
+ if (Annotations.HasValue) { options.Add("annotations", getUrlQueryFromAnnotations(Annotations.Value, ",")); }
+ if (Tidy.HasValue) { options.Add("tidy", Tidy.Value.ToString().ToLower()); }
+ if (Language.HasValue) { options.Add("language", Language.Value.Description()); }
+
+ return
+ Constants.BaseAPI
+ + _apiEndpoint
+ + Profile.Description() + "/"
+ + GetUrlQueryFromArray(_coordinates, ";")
+ + ".json"
+ + EncodeQueryString(options);
+ }
+
+
+
+ ///
+ /// Convert Annotations (several could be combined) into a string of their descriptions.
+ ///
+ /// Current annotation
+ /// Character to use for separating items in string.
+ ///
+ private string getUrlQueryFromAnnotations(Annotations anno, string separator)
+ {
+ List descriptions = new List();
+
+ //iterate through all possible 'Annotations' values
+ foreach (var a in Enum.GetValues(typeof(Annotations)).Cast())
+ {
+ //if current value is set, add its description
+ if (a == (anno & a)) { descriptions.Add(a.Description()); }
+ }
+
+ return string.Join(separator, descriptions.ToArray());
+ }
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResource.cs.meta
new file mode 100644
index 0000000..83c2217
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResource.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 8762d1b8a83c7ba4b91f9a1c64717bee
+timeCreated: 1508240506
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResponse.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResponse.cs
new file mode 100644
index 0000000..ef4d14d
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResponse.cs
@@ -0,0 +1,72 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.MapMatching
+{
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using Mapbox.Json;
+
+ /// Base geocode response.
+#if !WINDOWS_UWP
+ //http://stackoverflow.com/a/12903628
+ [Serializable]
+#endif
+ public class MapMatchingResponse
+ {
+ /// Simple constructor for deserialization
+ public MapMatchingResponse() { }
+
+ [JsonProperty("code")]
+ public string Code;
+ [JsonProperty("message")]
+ public string Message;
+ [JsonProperty("tracepoints")]
+ public Tracepoint[] Tracepoints;
+ [JsonProperty("matchings")]
+ public MatchObject[] Matchings;
+#if !WINDOWS_UWP
+ /// Error occured during matching
+ public bool HasMatchingError { get { return !"ok".Equals(Code, StringComparison.InvariantCultureIgnoreCase); } }
+#else
+ /// Error occured during matching
+ public bool HasMatchingError { get { return !"ok".Equals(Code, StringComparison.OrdinalIgnoreCase); } }
+#endif
+
+ public string MatchingError
+ {
+ get
+ {
+ string matchCode = Code.ToLower();
+ switch (matchCode)
+ {
+ case "ok": return "";
+ case "nomatch": return "The input did not produce any matches. features will be an empty array.";
+ case "toomanycoordinates": return "There are to many points in the request.";
+ case "InvalidInput": return "Invalid input: 'message' will hold an explanation of the invalid input.";
+ case "ProfileNotFound": return "Invalid profile.";
+ case "nosegment": return "Could not find a matching segment for input coordinates.";
+ default:
+ return "Unexpected error: check 'message'";
+ }
+ }
+ }
+
+ /// Errors occured during web request
+ public bool HasRequestError { get { return _requestExceptions.Count > 0; } }
+
+ private ReadOnlyCollection _requestExceptions = new List().AsReadOnly();
+ /// Errors of underlying web request
+ public ReadOnlyCollection RequestExceptions { get { return _requestExceptions; } }
+ /// Assign errors of underlying web request
+ public void SetRequestExceptions(ReadOnlyCollection exceptions) { _requestExceptions = exceptions; }
+ }
+
+
+
+
+}
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResponse.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResponse.cs.meta
new file mode 100644
index 0000000..9bf6932
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MapMatchingResponse.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 6b0f824b73d2d8f41aeed79f2a15666d
+timeCreated: 1508247612
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MatchObject.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MatchObject.cs
new file mode 100644
index 0000000..142dc06
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MatchObject.cs
@@ -0,0 +1,25 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2017 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.MapMatching
+{
+ using Mapbox.Directions;
+ using Mapbox.Json;
+
+ ///
+ /// A Match object from a Map Matching API call.
+ ///
+ public class MatchObject : Route
+ {
+ ///
+ /// A number between 0 (low) and 1 (high) indicating level of confidence in the returned match
+ ///
+ [JsonProperty("confidence")]
+ public float Confidence { get; set; }
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MatchObject.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MatchObject.cs.meta
new file mode 100644
index 0000000..8cd1ebe
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/MatchObject.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: d6d1f89031e0a60479b516a76cf1a96a
+timeCreated: 1508309612
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/Tracepoint.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/Tracepoint.cs
new file mode 100644
index 0000000..092a13b
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/Tracepoint.cs
@@ -0,0 +1,39 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2017 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.MapMatching
+{
+ using Mapbox.Directions;
+ using Mapbox.Json;
+ using Mapbox.Utils;
+ using Mapbox.Utils.JsonConverters;
+
+ ///
+ /// A Waypoint from a Directions API call.
+ ///
+ public class Tracepoint: Waypoint
+ {
+ ///
+ /// Index of the waypoint inside the matched route.
+ ///
+ [JsonProperty("waypoint_index")]
+ public int WaypointIndex { get; set; }
+
+ ///
+ /// Index to the match object in matchings the sub-trace was matched to.
+ ///
+ [JsonProperty("matchings_index")]
+ public int MatchingsIndex { get; set; }
+
+ ///
+ /// Number of probable alternative matchings for this trace point. A value of zero indicates that this point was matched unambiguously. Split the trace at these points for incremental map matching.
+ ///
+ [JsonProperty("alternatives_count")]
+ public int AlternativesCount { get; set; }
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/Tracepoint.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/Tracepoint.cs.meta
new file mode 100644
index 0000000..cf819f4
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/MapMatching/Tracepoint.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: cd23eaecbb5aa1947ad2b7a595c2393e
+timeCreated: 1508251969
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform.meta
new file mode 100644
index 0000000..10ba2ec
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 271709ca6cfd047e9ab142950d086b5f
+folderAsset: yes
+timeCreated: 1491243031
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache.meta
new file mode 100644
index 0000000..b553e89
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: 15f35c4d53ec8ae459a497d0bee43f77
+folderAsset: yes
+timeCreated: 1495030845
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CacheItem.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CacheItem.cs
new file mode 100644
index 0000000..b3be547
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CacheItem.cs
@@ -0,0 +1,19 @@
+
+namespace Mapbox.Platform.Cache
+{
+
+ using System;
+
+
+ public class CacheItem
+ {
+ /// Raw response data-
+ public byte[] Data;
+ /// UTC ticks when item was added to the cache.
+ public long AddedToCacheTicksUtc;
+ /// ETag value of API response. https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/ETag
+ public string ETag;
+ /// Can be 'null' as not all APIs populated this value. Last-Modified value of API response in GMT: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Last-Modified
+ public DateTime? LastModified;
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CacheItem.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CacheItem.cs.meta
new file mode 100644
index 0000000..4525837
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CacheItem.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: 3bad456c58de85d47b4ff050dbd99915
+timeCreated: 1510665832
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CachingWebFileSource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CachingWebFileSource.cs
new file mode 100644
index 0000000..b881516
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CachingWebFileSource.cs
@@ -0,0 +1,321 @@
+namespace Mapbox.Platform.Cache
+{
+ using System;
+ using Mapbox.Platform;
+ using System.Collections.Generic;
+ using Mapbox.Unity.Utilities;
+ using Mapbox.Map;
+ using System.Collections;
+ using System.Linq;
+
+
+ public class CachingWebFileSource : IFileSource, IDisposable
+ {
+
+
+#if MAPBOX_DEBUG_CACHE
+ private string _className;
+#endif
+ private bool _disposed;
+ private List _caches = new List();
+ private string _accessToken;
+ private Func _getMapsSkuToken;
+ private bool _autoRefreshCache;
+
+
+ public CachingWebFileSource(string accessToken, Func getMapsSkuToken, bool autoRefreshCache)
+ {
+#if MAPBOX_DEBUG_CACHE
+ _className = this.GetType().Name;
+#endif
+ _accessToken = accessToken;
+ _getMapsSkuToken = getMapsSkuToken;
+ _autoRefreshCache = autoRefreshCache;
+ }
+
+
+#region idisposable
+
+
+ ~CachingWebFileSource()
+ {
+ Dispose(false);
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ protected virtual void Dispose(bool disposeManagedResources)
+ {
+ if (!_disposed)
+ {
+ if (disposeManagedResources)
+ {
+ for (int i = 0; i < _caches.Count; i++)
+ {
+ IDisposable cache = _caches[i] as IDisposable;
+ if (null != cache)
+ {
+ cache.Dispose();
+ cache = null;
+ }
+ }
+ }
+ _disposed = true;
+ }
+ }
+
+
+#endregion
+
+
+ ///
+ /// Add an ICache instance
+ ///
+ /// Implementation of ICache
+ ///
+ public CachingWebFileSource AddCache(ICache cache)
+ {
+ // don't add cache when cache size is 0
+ if (0 == cache.MaxCacheSize)
+ {
+ return this;
+ }
+
+ _caches.Add(cache);
+ return this;
+ }
+
+
+ ///
+ /// Clear all caches
+ ///
+ public void Clear()
+ {
+ foreach (var cache in _caches)
+ {
+ cache.Clear();
+ }
+ }
+
+
+ public void ReInit() {
+ foreach (var cache in _caches)
+ {
+ cache.ReInit();
+ }
+ }
+
+
+ public IAsyncRequest Request(
+ string uri
+ , Action callback
+ , int timeout = 10
+ , CanonicalTileId tileId = new CanonicalTileId()
+ , string tilesetId = null
+ )
+ {
+
+ if (string.IsNullOrEmpty(tilesetId))
+ {
+ throw new Exception("Cannot cache without a tileset id");
+ }
+
+ CacheItem cachedItem = null;
+
+ // go through existing caches and check if we already have the requested tile available
+ foreach (var cache in _caches)
+ {
+ cachedItem = cache.Get(tilesetId, tileId);
+ if (null != cachedItem)
+ {
+ break;
+ }
+ }
+
+ var uriBuilder = new UriBuilder(uri);
+ if (!string.IsNullOrEmpty(_accessToken))
+ {
+ string accessTokenQuery = "access_token=" + _accessToken;
+ string mapsSkuToken = "sku=" + _getMapsSkuToken();
+ if (uriBuilder.Query != null && uriBuilder.Query.Length > 1)
+ {
+ uriBuilder.Query = uriBuilder.Query.Substring(1) + "&" + accessTokenQuery + "&" + mapsSkuToken;
+ }
+ else
+ {
+ uriBuilder.Query = accessTokenQuery + "&" + mapsSkuToken;
+ }
+ }
+ string finalUrl = uriBuilder.ToString();
+
+#if MAPBOX_DEBUG_CACHE
+ string methodName = _className + "." + new System.Diagnostics.StackFrame().GetMethod().Name;
+#endif
+
+ // if tile was available call callback with it, propagate to all other caches and check if a newer one is available
+ if (null != cachedItem)
+ {
+#if MAPBOX_DEBUG_CACHE
+ UnityEngine.Debug.LogFormat("{0} {1} {2} {3}", methodName, tilesetId, tileId, null != cachedItem.Data ? cachedItem.Data.Length.ToString() : "cachedItem.Data is NULL");
+#endif
+ // immediately return cached tile
+ callback(Response.FromCache(cachedItem.Data));
+
+ // check for updated tiles online if this is enabled in the settings
+ if (_autoRefreshCache)
+ {
+ // check if tile on the web is newer than the one we already have locally
+ IAsyncRequestFactory.CreateRequest(
+ finalUrl,
+ (Response headerOnly) =>
+ {
+ // on error getting information from API just return. tile we have locally has already been returned above
+ if (headerOnly.HasError)
+ {
+ return;
+ }
+
+ // TODO: remove Debug.Log before PR
+ //UnityEngine.Debug.LogFormat(
+ // "{1}{0}cached:{2}{0}header:{3}"
+ // , Environment.NewLine
+ // , finalUrl
+ // , cachedItem.ETag
+ // , headerOnly.Headers["ETag"]
+ //);
+
+ // data from cache is the same as on the web:
+ // * tile has already been returned above
+ // * make sure all all other caches have it too, but don't force insert via cache.add(false)
+ // additional ETag empty check: for backwards compability with old caches
+ if (!string.IsNullOrEmpty(cachedItem.ETag) && cachedItem.ETag.Equals(headerOnly.Headers["ETag"]))
+ {
+ foreach (var cache in _caches)
+ {
+ cache.Add(tilesetId, tileId, cachedItem, false);
+ }
+ }
+ else
+ {
+ // TODO: remove Debug.Log before PR
+ UnityEngine.Debug.LogWarningFormat(
+ "updating cached tile {1} tilesetId:{2}{0}cached etag:{3}{0}remote etag:{4}{0}{5}"
+ , Environment.NewLine
+ , tileId
+ , tilesetId
+ , cachedItem.ETag
+ , headerOnly.Headers["ETag"]
+ , finalUrl
+ );
+
+ // request updated tile and pass callback to return new data to subscribers
+ requestTileAndCache(finalUrl, tilesetId, tileId, timeout, callback);
+ }
+ }
+ , timeout
+ , HttpRequestType.Head
+ );
+ }
+
+ return new MemoryCacheAsyncRequest(uri);
+ }
+ else
+ {
+ // requested tile is not in any of the caches yet, get it
+#if MAPBOX_DEBUG_CACHE
+ UnityEngine.Debug.LogFormat("{0} {1} {2} not cached", methodName, tilesetId, tileId);
+#endif
+ return requestTileAndCache(finalUrl, tilesetId, tileId, timeout, callback);
+ }
+ }
+
+
+ private IAsyncRequest requestTileAndCache(string url, string tilesetId, CanonicalTileId tileId, int timeout, Action callback)
+ {
+ return IAsyncRequestFactory.CreateRequest(
+ url,
+ (Response r) =>
+ {
+ // if the request was successful add tile to all caches
+ if (!r.HasError && null != r.Data)
+ {
+ string eTag = string.Empty;
+ DateTime? lastModified = null;
+
+ if (!r.Headers.ContainsKey("ETag"))
+ {
+ UnityEngine.Debug.LogWarningFormat("no 'ETag' header present in response for {0}", url);
+ }
+ else
+ {
+ eTag = r.Headers["ETag"];
+ }
+
+ // not all APIs populate 'Last-Modified' header
+ // don't log error if it's missing
+ if (r.Headers.ContainsKey("Last-Modified"))
+ {
+ lastModified = DateTime.ParseExact(r.Headers["Last-Modified"], "r", null);
+ }
+
+ // propagate to all caches forcing update
+ foreach (var cache in _caches)
+ {
+ cache.Add(
+ tilesetId
+ , tileId
+ , new CacheItem()
+ {
+ Data = r.Data,
+ ETag = eTag,
+ LastModified = lastModified
+ }
+ , true // force insert/update
+ );
+ }
+ }
+ if (null != callback)
+ {
+ r.IsUpdate = true;
+ callback(r);
+ }
+ }, timeout);
+ }
+
+
+ class MemoryCacheAsyncRequest : IAsyncRequest
+ {
+
+
+ public string RequestUrl { get; private set; }
+
+
+ public MemoryCacheAsyncRequest(string requestUrl)
+ {
+ RequestUrl = requestUrl;
+ }
+
+
+ public bool IsCompleted
+ {
+ get
+ {
+ return true;
+ }
+ }
+
+
+ public HttpRequestType RequestType { get { return HttpRequestType.Get; } }
+
+
+ public void Cancel()
+ {
+ // Empty. We can't cancel an instantaneous response.
+ }
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CachingWebFileSource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CachingWebFileSource.cs.meta
new file mode 100644
index 0000000..ccfbe27
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CachingWebFileSource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 149bb7da83149324dab3982be7bc8cca
+timeCreated: 1494581732
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/ICache.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/ICache.cs
new file mode 100644
index 0000000..d94192c
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/ICache.cs
@@ -0,0 +1,53 @@
+
+namespace Mapbox.Platform.Cache
+{
+
+ using Mapbox.Map;
+ using System;
+
+
+ public interface ICache
+ {
+
+ ///
+ /// Maximum number of tiles to store
+ ///
+ uint MaxCacheSize { get; }
+
+
+ ///
+ /// Add tile data to the cache
+ ///
+ /// Tile set name
+ /// Item to cache
+ /// Force insert even if item already exists.
+ void Add(string tilesetId, CanonicalTileId tileId, CacheItem item, bool replaceIfExists);
+
+
+ ///
+ /// Get tile
+ ///
+ ///
+ ///
+ /// byte[] with tile data. Null if requested tile is not in cache
+ CacheItem Get(string tilesetId, CanonicalTileId tileId);
+
+
+ /// Clear cache for all tile sets
+ void Clear();
+
+
+ ///
+ /// Clear cache for one tile set
+ ///
+ ///
+ void Clear(string tilesetId);
+
+
+ ///
+ /// Reinitialize cache. Might be needed after 'Clear', eg for SQLiteCache
+ ///
+ void ReInit();
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/ICache.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/ICache.cs.meta
new file mode 100644
index 0000000..6a38569
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/ICache.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 4ebb2d197f248a7469620904e2adb43e
+timeCreated: 1494580896
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/MemoryCache.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/MemoryCache.cs
new file mode 100644
index 0000000..9a32546
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/MemoryCache.cs
@@ -0,0 +1,112 @@
+using Mapbox.Map;
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+
+namespace Mapbox.Platform.Cache
+{
+
+
+ public class MemoryCache : ICache
+ {
+
+
+ // TODO: add support for disposal strategy (timestamp, distance, etc.)
+ public MemoryCache(uint maxCacheSize)
+ {
+#if MAPBOX_DEBUG_CACHE
+ _className = this.GetType().Name;
+#endif
+ _maxCacheSize = maxCacheSize;
+ _cachedResponses = new Dictionary();
+ }
+
+
+#if MAPBOX_DEBUG_CACHE
+ private string _className;
+#endif
+ private uint _maxCacheSize;
+ private object _lock = new object();
+ private Dictionary _cachedResponses;
+
+
+ public uint MaxCacheSize
+ {
+ get { return _maxCacheSize; }
+ }
+
+
+ public void ReInit()
+ {
+ _cachedResponses = new Dictionary();
+ }
+
+
+ public void Add(string mapdId, CanonicalTileId tilesetId, CacheItem item, bool forceInsert)
+ {
+ string key = mapdId + "||" + tilesetId;
+
+ lock (_lock)
+ {
+ if (_cachedResponses.Count >= _maxCacheSize)
+ {
+ _cachedResponses.Remove(_cachedResponses.OrderBy(c => c.Value.AddedToCacheTicksUtc).First().Key);
+ }
+
+ // TODO: forceInsert
+ if (!_cachedResponses.ContainsKey(key))
+ {
+ item.AddedToCacheTicksUtc = DateTime.UtcNow.Ticks;
+ _cachedResponses.Add(key, item);
+ }
+ }
+ }
+
+
+ public CacheItem Get(string tilesetId, CanonicalTileId tileId)
+ {
+ string key = tilesetId + "||" + tileId;
+
+#if MAPBOX_DEBUG_CACHE
+ string methodName = _className + "." + new System.Diagnostics.StackFrame().GetMethod().Name;
+ UnityEngine.Debug.LogFormat("{0} {1}", methodName, key);
+#endif
+
+ lock (_lock)
+ {
+ if (!_cachedResponses.ContainsKey(key))
+ {
+ return null;
+ }
+
+ return _cachedResponses[key];
+ }
+ }
+
+
+ public void Clear()
+ {
+ lock (_lock)
+ {
+ _cachedResponses.Clear();
+ }
+ }
+
+
+ public void Clear(string tilesetId)
+ {
+ lock (_lock)
+ {
+ tilesetId += "||";
+ List toDelete = _cachedResponses.Keys.Where(k => k.Contains(tilesetId)).ToList();
+ foreach (string key in toDelete)
+ {
+ _cachedResponses.Remove(key);
+ }
+ }
+ }
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/MemoryCache.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/MemoryCache.cs.meta
new file mode 100644
index 0000000..6880288
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/MemoryCache.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2bd70b309ec2fd645af3e189d1d7ea5f
+timeCreated: 1494580911
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache.meta
new file mode 100644
index 0000000..cf805fc
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: c6f1c408c0acc43538b678d17f6ea53d
+folderAsset: yes
+timeCreated: 1497883478
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/SQLiteCache.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/SQLiteCache.cs
new file mode 100644
index 0000000..a221ce1
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/SQLiteCache.cs
@@ -0,0 +1,485 @@
+namespace Mapbox.Platform.Cache
+{
+
+ using Mapbox.Map;
+ using Mapbox.Utils;
+ using SQLite4Unity3d;
+ using System;
+ using System.Collections.Generic;
+ using System.IO;
+ using System.Linq;
+ using UnityEngine;
+
+ public class SQLiteCache : ICache, IDisposable
+ {
+
+
+ ///
+ /// maximum number tiles that get cached
+ ///
+ public uint MaxCacheSize { get { return _maxTileCount; } }
+
+
+ ///
+ /// Check cache size every n inserts
+ ///
+ public uint PruneCacheDelta { get { return _pruneCacheDelta; } }
+
+
+#if MAPBOX_DEBUG_CACHE
+ private string _className;
+#endif
+ private bool _disposed;
+ private string _dbName;
+ private string _dbPath;
+ private SQLiteConnection _sqlite;
+ private readonly uint _maxTileCount;
+ /// check cache size only every '_pruneCacheDelta' calls to 'Add()' to avoid being too chatty with the database
+ private const int _pruneCacheDelta = 20;
+ /// counter to keep track of calls to `Add()`
+ private int _pruneCacheCounter = 0;
+ private object _lock = new object();
+
+
+ public SQLiteCache(uint? maxTileCount = null, string dbName = "cache.db")
+ {
+ _maxTileCount = maxTileCount ?? 3000;
+ _dbName = dbName;
+ init();
+ }
+
+
+ #region idisposable
+
+
+ ~SQLiteCache()
+ {
+ Dispose(false);
+ }
+
+ public void Dispose()
+ {
+ Dispose(true);
+ GC.SuppressFinalize(this);
+ }
+
+ protected virtual void Dispose(bool disposeManagedResources)
+ {
+ if (!_disposed)
+ {
+ if (disposeManagedResources)
+ {
+ if (null != _sqlite)
+ {
+ _sqlite.Execute("VACUUM;"); // compact db to keep file size small
+ _sqlite.Close();
+ _sqlite.Dispose();
+ _sqlite = null;
+ }
+ }
+ _disposed = true;
+ }
+ }
+
+
+ #endregion
+
+
+ private void init()
+ {
+
+#if MAPBOX_DEBUG_CACHE
+ _className = this.GetType().Name;
+#endif
+ openOrCreateDb(_dbName);
+
+ //hrmpf: multiple PKs not supported by sqlite.net
+ //https://github.com/praeclarum/sqlite-net/issues/282
+ //do it via plain SQL
+
+ List colInfoTileset = _sqlite.GetTableInfo(typeof(tilesets).Name);
+ if (0 == colInfoTileset.Count)
+ {
+ string cmdCreateTableTilesets = @"CREATE TABLE tilesets(
+id INTEGER PRIMARY KEY ASC AUTOINCREMENT NOT NULL UNIQUE,
+name STRING NOT NULL
+);";
+ _sqlite.Execute(cmdCreateTableTilesets);
+ string cmdCreateIdxNames = @"CREATE UNIQUE INDEX idx_names ON tilesets (name ASC);";
+ _sqlite.Execute(cmdCreateIdxNames);
+ }
+
+ List colInfoTiles = _sqlite.GetTableInfo(typeof(tiles).Name);
+ if (0 == colInfoTiles.Count)
+ {
+
+ string cmdCreateTableTiles = @"CREATE TABLE tiles(
+tile_set INTEGER REFERENCES tilesets (id) ON DELETE CASCADE ON UPDATE CASCADE,
+zoom_level INTEGER NOT NULL,
+tile_column BIGINT NOT NULL,
+tile_row BIGINT NOT NULL,
+tile_data BLOB NOT NULL,
+timestamp INTEGER NOT NULL,
+etag TEXT,
+lastmodified INTEGER,
+ PRIMARY KEY(
+ tile_set ASC,
+ zoom_level ASC,
+ tile_column ASC,
+ tile_row ASC
+ )
+);";
+ _sqlite.Execute(cmdCreateTableTiles);
+
+ string cmdIdxTileset = "CREATE INDEX idx_tileset ON tiles (tile_set ASC);";
+ _sqlite.Execute(cmdIdxTileset);
+ string cmdIdxTimestamp = "CREATE INDEX idx_timestamp ON tiles (timestamp ASC);";
+ _sqlite.Execute(cmdIdxTimestamp);
+ }
+
+
+ // some pragmas to speed things up a bit :-)
+ // inserting 1,000 tiles takes 1-2 sec as opposed to ~20 sec
+ string[] cmds = new string[]
+ {
+ "PRAGMA synchronous=OFF",
+ "PRAGMA count_changes=OFF",
+ "PRAGMA journal_mode=MEMORY",
+ "PRAGMA temp_store=MEMORY"
+ };
+ foreach (var cmd in cmds)
+ {
+ try
+ {
+ _sqlite.Execute(cmd);
+ }
+ catch (SQLiteException ex)
+ {
+ // workaround for sqlite.net's exeception:
+ // https://stackoverflow.com/a/23839503
+ if (ex.Result != SQLite3.Result.Row)
+ {
+ UnityEngine.Debug.LogErrorFormat("{0}: {1}", cmd, ex);
+ // TODO: when mapbox-sdk-cs gets backported to its own repo -> throw
+ //throw; // to throw or not to throw???
+ }
+ }
+ }
+ }
+
+
+ private void openOrCreateDb(string dbName)
+ {
+ _dbPath = GetFullDbPath(dbName);
+ _sqlite = new SQLiteConnection(_dbPath, SQLiteOpenFlags.ReadWrite | SQLiteOpenFlags.Create);
+ }
+
+
+ ///
+ /// Reinitialize cache.
+ /// This is needed after 'Clear()' to recreate the cache database.
+ /// And has been implemented on purpose to not hold on to any references to the cache directory after 'Clear()'
+ ///
+ public void ReInit()
+ {
+ if (null != _sqlite)
+ {
+ _sqlite.Dispose();
+ _sqlite = null;
+ }
+
+ init();
+ }
+
+
+ public static string GetFullDbPath(string dbName)
+ {
+ string dbPath = Path.Combine(Application.persistentDataPath, "cache");
+#if UNITY_EDITOR_WIN || UNITY_STANDALONE_WIN || UNITY_WSA
+ dbPath = Path.GetFullPath(dbPath);
+#endif
+ if (!Directory.Exists(dbPath)) { Directory.CreateDirectory(dbPath); }
+ dbPath = Path.Combine(dbPath, dbName);
+
+ return dbPath;
+ }
+
+
+
+ public void Add(string tilesetName, CanonicalTileId tileId, CacheItem item, bool forceInsert = false)
+ {
+
+#if MAPBOX_DEBUG_CACHE
+ string methodName = _className + "." + new System.Diagnostics.StackFrame().GetMethod().Name;
+ UnityEngine.Debug.LogFormat("{0} {1} {2} forceInsert:{3}", methodName, tileset, tileId, forceInsert);
+#endif
+ try
+ {
+ // tile exists and we don't want to overwrite -> exit early
+ if (
+ TileExists(tilesetName, tileId)
+ && !forceInsert
+ )
+ {
+ return;
+ }
+
+ int? tilesetId = null;
+ lock (_lock)
+ {
+ tilesetId = getTilesetId(tilesetName);
+ if (!tilesetId.HasValue)
+ {
+ tilesetId = insertTileset(tilesetName);
+ }
+ }
+
+ if (tilesetId < 0)
+ {
+ Debug.LogErrorFormat("could not get tilesetID for [{0}] tile: {1}", tilesetName, tileId);
+ return;
+ }
+
+ int rowsAffected = _sqlite.InsertOrReplace(new tiles
+ {
+ tile_set = tilesetId.Value,
+ zoom_level = tileId.Z,
+ tile_column = tileId.X,
+ tile_row = tileId.Y,
+ tile_data = item.Data,
+ timestamp = (int)UnixTimestampUtils.To(DateTime.Now),
+ etag = item.ETag
+ });
+ if (1 != rowsAffected)
+ {
+ throw new Exception(string.Format("tile [{0} / {1}] was not inserted, rows affected:{2}", tilesetName, tileId, rowsAffected));
+ }
+ }
+ catch (Exception ex)
+ {
+ Debug.LogErrorFormat("Error inserting {0} {1} {2} ", tilesetName, tileId, ex);
+ }
+
+ // update counter only when new tile gets inserted
+ if (!forceInsert)
+ {
+ _pruneCacheCounter++;
+ }
+ if (0 == _pruneCacheCounter % _pruneCacheDelta)
+ {
+ _pruneCacheCounter = 0;
+ prune();
+ }
+ }
+
+
+ private void prune()
+ {
+
+ long tileCnt = _sqlite.ExecuteScalar("SELECT COUNT(zoom_level) FROM tiles");
+
+ if (tileCnt < _maxTileCount) { return; }
+
+ long toDelete = tileCnt - _maxTileCount;
+
+#if MAPBOX_DEBUG_CACHE
+ string methodName = _className + "." + new System.Diagnostics.StackFrame().GetMethod().Name;
+ Debug.LogFormat("{0} {1} about to prune()", methodName, _tileset);
+#endif
+
+ try
+ {
+ // no 'ORDER BY' or 'LIMIT' possible if sqlite hasn't been compiled with 'SQLITE_ENABLE_UPDATE_DELETE_LIMIT'
+ // https://sqlite.org/compile.html#enable_update_delete_limit
+ _sqlite.Execute("DELETE FROM tiles WHERE rowid IN ( SELECT rowid FROM tiles ORDER BY timestamp ASC LIMIT ? );", toDelete);
+ }
+ catch (Exception ex)
+ {
+ Debug.LogErrorFormat("error pruning: {0}", ex);
+ }
+ }
+
+
+ ///
+ /// Returns the tile data, otherwise null
+ ///
+ /// Canonical tile id to identify the tile
+ /// tile data as byte[], if tile is not cached returns null
+ public CacheItem Get(string tilesetName, CanonicalTileId tileId)
+ {
+#if MAPBOX_DEBUG_CACHE
+ string methodName = _className + "." + new System.Diagnostics.StackFrame().GetMethod().Name;
+ Debug.LogFormat("{0} {1} {2}", methodName, _tileset, tileId);
+#endif
+ tiles tile = null;
+
+ try
+ {
+ int? tilesetId = getTilesetId(tilesetName);
+ if (!tilesetId.HasValue)
+ {
+ return null;
+ }
+
+ tile = _sqlite
+ .Table()
+ .Where(t =>
+ t.tile_set == tilesetId.Value
+ && t.zoom_level == tileId.Z
+ && t.tile_column == tileId.X
+ && t.tile_row == tileId.Y
+ )
+ .FirstOrDefault();
+ }
+ catch (Exception ex)
+ {
+ Debug.LogErrorFormat("error getting tile {1} {2} from cache{0}{3}", Environment.NewLine, tilesetName, tileId, ex);
+ return null;
+ }
+ if (null == tile)
+ {
+ return null;
+ }
+
+ DateTime? lastModified = null;
+ if (tile.lastmodified.HasValue) { lastModified = UnixTimestampUtils.From((double)tile.lastmodified.Value); }
+
+ return new CacheItem()
+ {
+ Data = tile.tile_data,
+ AddedToCacheTicksUtc = tile.timestamp,
+ ETag = tile.etag,
+ LastModified = lastModified
+ };
+ }
+
+
+ ///
+ /// Check if tile exists
+ ///
+ /// Canonical tile id
+ /// True if tile exists
+ public bool TileExists(string tilesetName, CanonicalTileId tileId)
+ {
+ int? tilesetId = getTilesetId(tilesetName);
+ if (!tilesetId.HasValue)
+ {
+ return false;
+ }
+
+ return null != _sqlite
+ .Table()
+ .Where(t =>
+ t.tile_set == tilesetId.Value
+ && t.zoom_level == tileId.Z
+ && t.tile_column == tileId.X
+ && t.tile_row == tileId.Y
+ )
+ .FirstOrDefault();
+ }
+
+
+ private int insertTileset(string tilesetName)
+ {
+ try
+ {
+ _sqlite.BeginTransaction(true);
+ tilesets newTileset = new tilesets { name = tilesetName };
+ int rowsAffected = _sqlite.Insert(newTileset);
+ if (1 != rowsAffected)
+ {
+ throw new Exception(string.Format("tileset [{0}] was not inserted, rows affected:{1}", tilesetName, rowsAffected));
+ }
+ return newTileset.id;
+ }
+ catch (Exception ex)
+ {
+ Debug.LogErrorFormat("could not insert tileset [{0}]: {1}", tilesetName, ex);
+ return -1;
+ }
+ finally
+ {
+ _sqlite.Commit();
+ }
+ }
+
+
+ private int? getTilesetId(string tilesetName)
+ {
+ tilesets tileset = _sqlite
+ .Table()
+ .Where(ts => ts.name.Equals(tilesetName))
+ .FirstOrDefault();
+ return null == tileset ? (int?)null : tileset.id;
+ }
+
+
+ ///
+ /// FOR INTERNAL DEBUGGING ONLY - DON'T RELY ON IN PRODUCTION
+ ///
+ ///
+ ///
+ public long TileCount(string tilesetName)
+ {
+ int? tilesetId = getTilesetId(tilesetName);
+ if (!tilesetId.HasValue) { return 0; }
+
+ return _sqlite
+ .Table()
+ .Where(t => t.tile_set == tilesetId.Value)
+ .LongCount();
+ }
+
+
+ ///
+ /// Clear cache for one tile set
+ ///
+ ///
+ public void Clear(string tilesetName)
+ {
+ int? tilesetId = getTilesetId(tilesetName);
+ if (!tilesetId.HasValue) { return; }
+ //just delete on table 'tilesets', we've setup cascading which should take care of tabls 'tiles'
+ _sqlite.Delete(tilesetId.Value);
+ }
+
+
+ ///
+ /// Delete the database file.
+ /// Call 'ReInit()' if you intend to continue using the cache after 'Clear()!
+ ///
+ public void Clear()
+ {
+ //already disposed
+ if (null == _sqlite) { return; }
+
+ _sqlite.Close();
+ _sqlite.Dispose();
+ _sqlite = null;
+
+ Debug.LogFormat("deleting {0}", _dbPath);
+
+ // try several times in case SQLite needs a bit more time to dispose
+ for (int i = 0; i < 5; i++)
+ {
+ try
+ {
+ File.Delete(_dbPath);
+ return;
+ }
+ catch
+ {
+#if !WINDOWS_UWP
+ System.Threading.Thread.Sleep(100);
+#else
+ System.Threading.Tasks.Task.Delay(100).Wait();
+#endif
+ }
+ }
+
+ // if we got till here, throw on last try
+ File.Delete(_dbPath);
+ }
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/SQLiteCache.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/SQLiteCache.cs.meta
new file mode 100644
index 0000000..93776d8
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/SQLiteCache.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 8aeee08edfa6c46648cf1dc623b72a1e
+timeCreated: 1497883479
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tiles.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tiles.cs
new file mode 100644
index 0000000..1862952
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tiles.cs
@@ -0,0 +1,40 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using SQLite4Unity3d;
+
+namespace Mapbox.Platform.Cache
+{
+
+ ///
+ /// Don't change the class name: sqlite-net uses it for table creation
+ ///
+ public class tiles
+ {
+
+ public int tile_set { get; set; }
+
+ //hrmpf: multiple PKs not supported by sqlite.net
+ //https://github.com/praeclarum/sqlite-net/issues/282
+ //TODO: do it via plain SQL
+ //[PrimaryKey]
+ public int zoom_level { get; set; }
+
+ //[PrimaryKey]
+ public long tile_column { get; set; }
+
+ //[PrimaryKey]
+ public long tile_row { get; set; }
+
+ public byte[] tile_data { get; set; }
+
+ /// Unix epoch for simple FIFO pruning
+ public int timestamp { get; set; }
+
+ /// ETag Header value of the reponse for auto updating cache
+ public string etag { get; set; }
+
+ /// Last-Modified header value of API response. Not all APIs populate it, will be -1 in that case.
+ public int? lastmodified { get; set; }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tiles.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tiles.cs.meta
new file mode 100644
index 0000000..0bac323
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tiles.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7d8f9ca4f2240481ba4023eff7781487
+timeCreated: 1497883479
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tilesets.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tilesets.cs
new file mode 100644
index 0000000..ebd47aa
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tilesets.cs
@@ -0,0 +1,23 @@
+using System.Collections;
+using System.Collections.Generic;
+using UnityEngine;
+using SQLite4Unity3d;
+
+namespace Mapbox.Platform.Cache
+{
+
+ ///
+ /// Don't change the class name: sqlite-net uses it for table creation
+ ///
+ public class tilesets
+ {
+
+ //hrmpf: multiple PKs not supported by sqlite.net
+ //https://github.com/praeclarum/sqlite-net/issues/282
+ //TODO: do it via plain SQL
+ [PrimaryKey, AutoIncrement]
+ public int id { get; set; }
+
+ public string name { get; set; }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tilesets.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tilesets.cs.meta
new file mode 100644
index 0000000..6ee5789
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/SQLiteCache/Tilesets.cs.meta
@@ -0,0 +1,13 @@
+fileFormatVersion: 2
+guid: bb0cc61c516c1984f8ab3ac0ce3c3e64
+timeCreated: 1527515199
+licenseType: Pro
+MonoImporter:
+ externalObjects: {}
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/FileSource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/FileSource.cs
new file mode 100644
index 0000000..3225832
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/FileSource.cs
@@ -0,0 +1,255 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+using Mapbox.Unity;
+
+namespace Mapbox.Platform
+{
+ using Mapbox.Map;
+ using Mapbox.Unity.Utilities;
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Linq;
+ using System.Net;
+ using System.Net.Security;
+#if !NETFX_CORE
+ using System.Security.Cryptography.X509Certificates;
+#endif
+#if !UNITY_5_3_OR_NEWER
+ using System.Threading;
+#endif
+#if UNITY_EDITOR
+ using UnityEditor;
+#endif
+#if UNITY_5_3_OR_NEWER
+ using UnityEngine;
+#endif
+
+ ///
+ /// Mono implementation of the FileSource class. It will use Mono's
+ /// runtime to
+ /// asynchronously fetch data from the network via HTTP or HTTPS requests.
+ ///
+ ///
+ /// This implementation requires .NET 4.5 and later. The access token is expected to
+ /// be exported to the environment as MAPBOX_ACCESS_TOKEN.
+ ///
+ public sealed class FileSource : IFileSource
+ {
+
+ private Func _getMapsSkuToken;
+ private readonly Dictionary _requests = new Dictionary();
+ private readonly string _accessToken;
+ private readonly object _lock = new object();
+
+ /// Length of rate-limiting interval in seconds. https://www.mapbox.com/api-documentation/#rate-limit-headers
+#pragma warning disable 0414
+ private int? XRateLimitInterval;
+ /// Maximum number of requests you may make in the current interval before reaching the limit. https://www.mapbox.com/api-documentation/#rate-limit-headers
+ private long? XRateLimitLimit;
+ /// Timestamp of when the current interval will end and the ratelimit counter is reset. https://www.mapbox.com/api-documentation/#rate-limit-headers
+ private DateTime? XRateLimitReset;
+#pragma warning restore 0414
+
+
+ public FileSource(Func getMapsSkuToken, string acessToken = null)
+ {
+ _getMapsSkuToken = getMapsSkuToken;
+ if (string.IsNullOrEmpty(acessToken))
+ {
+ _accessToken = Environment.GetEnvironmentVariable("MAPBOX_ACCESS_TOKEN");
+ }
+ else
+ {
+ _accessToken = acessToken;
+ }
+ }
+
+ /// Performs a request asynchronously.
+ /// The HTTP/HTTPS url.
+ /// Callback to be called after the request is completed.
+ ///
+ /// Returns a that can be used for canceling a pending
+ /// request. This handle can be completely ignored if there is no intention of ever
+ /// canceling the request.
+ ///
+ public IAsyncRequest Request(
+ string url
+ , Action callback
+ , int timeout = 10
+ , CanonicalTileId tileId = new CanonicalTileId()
+ , string tilesetId = null
+ )
+ {
+ if (!string.IsNullOrEmpty(_accessToken))
+ {
+ var uriBuilder = new UriBuilder(url);
+ string accessTokenQuery = "access_token=" + _accessToken;
+ string skuToken = "sku=" + _getMapsSkuToken();
+ if (uriBuilder.Query != null && uriBuilder.Query.Length > 1)
+ {
+ uriBuilder.Query = uriBuilder.Query.Substring(1) + "&" + accessTokenQuery + "&" + skuToken;;
+ }
+ else
+ {
+ uriBuilder.Query = accessTokenQuery + "&" + skuToken;
+ }
+
+ url = uriBuilder.ToString();
+ }
+
+ // TODO:
+ // * add queue for requests
+ // * evaluate rate limits (headers and status code)
+ // * throttle requests accordingly
+ //var request = new HTTPRequest(url, callback);
+ //IEnumerator proxy = proxyResponse(url, callback);
+ //proxy.MoveNext();
+ //IAsyncRequest request = proxy.Current;
+
+ //return request;
+
+ return proxyResponse(url, callback, timeout, tileId, tilesetId);
+ }
+
+
+ // TODO: look at requests and implement throttling if needed
+ //private IEnumerator proxyResponse(string url, Action callback) {
+ private IAsyncRequest proxyResponse(
+ string url
+ , Action callback
+ , int timeout
+ , CanonicalTileId tileId
+ , string tilesetId
+ )
+ {
+
+ // TODO: plugin caching somewhere around here
+
+ var request = IAsyncRequestFactory.CreateRequest(
+ url
+ , (Response response) =>
+ {
+ if (response.XRateLimitInterval.HasValue) { XRateLimitInterval = response.XRateLimitInterval; }
+ if (response.XRateLimitLimit.HasValue) { XRateLimitLimit = response.XRateLimitLimit; }
+ if (response.XRateLimitReset.HasValue) { XRateLimitReset = response.XRateLimitReset; }
+ callback(response);
+ lock (_lock)
+ {
+ //another place to catch if request has been cancelled
+ try
+ {
+ _requests.Remove(response.Request);
+ }
+ catch (Exception ex)
+ {
+ System.Diagnostics.Debug.WriteLine(ex);
+ }
+ }
+ }
+ , timeout
+ );
+ lock (_lock)
+ {
+ //sometimes we get here after the request has already finished
+ if (!request.IsCompleted)
+ {
+ _requests.Add(request, 0);
+ }
+ }
+ //yield return request;
+ return request;
+ }
+
+
+#if UNITY_5_3_OR_NEWER
+ ///
+ /// Block until all the requests are processed.
+ ///
+ public IEnumerator WaitForAllRequests()
+ {
+ while (_requests.Count > 0)
+ {
+ lock (_lock)
+ {
+ List reqs = _requests.Keys.ToList();
+ for (int i = reqs.Count - 1; i > -1; i--)
+ {
+ if (reqs[i].IsCompleted)
+ {
+ // another place to watch out if request has been cancelled
+ try
+ {
+ _requests.Remove(reqs[i]);
+ }
+ catch (Exception ex)
+ {
+ System.Diagnostics.Debug.WriteLine(ex);
+ }
+ }
+ }
+ }
+ yield return new WaitForSeconds(0.2f);
+ }
+ }
+#endif
+
+
+
+#if !UNITY_5_3_OR_NEWER
+ ///
+ /// Block until all the requests are processed.
+ ///
+ public void WaitForAllRequests()
+ {
+ int waitTimeMs = 200;
+ while (_requests.Count > 0)
+ {
+ lock (_lock)
+ {
+ List reqs = _requests.Keys.ToList();
+ for (int i = reqs.Count - 1; i > -1; i--)
+ {
+ if (reqs[i].IsCompleted)
+ {
+ // another place to watch out if request has been cancelled
+ try
+ {
+ _requests.Remove(reqs[i]);
+ }
+ catch (Exception ex)
+ {
+ System.Diagnostics.Debug.WriteLine(ex);
+ }
+ }
+ }
+ }
+
+#if WINDOWS_UWP
+ System.Threading.Tasks.Task.Delay(waitTimeMs).Wait();
+#else
+ //Thread.Sleep(50);
+ // TODO: get rid of DoEvents!!! and find non-blocking wait that works for Net3.5
+ //System.Windows.Forms.Application.DoEvents();
+
+ var resetEvent = new ManualResetEvent(false);
+ ThreadPool.QueueUserWorkItem(new WaitCallback(delegate
+ {
+ Thread.Sleep(waitTimeMs);
+ resetEvent.Set();
+ }), null);
+ UnityEngine.Debug.Log("before waitOne " + DateTime.Now.Ticks);
+ resetEvent.WaitOne();
+ UnityEngine.Debug.Log("after waitOne " + DateTime.Now.Ticks);
+ resetEvent.Close();
+ resetEvent = null;
+#endif
+ }
+ }
+#endif
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/FileSource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/FileSource.cs.meta
new file mode 100644
index 0000000..165abc8
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/FileSource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: a17c999e5ca80474584c39dfa7d5a62a
+timeCreated: 1494952070
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestNonThreaded.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestNonThreaded.cs
new file mode 100644
index 0000000..3421f99
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestNonThreaded.cs
@@ -0,0 +1,236 @@
+#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_ANDROID || UNITY_WP_8_1 || UNITY_WSA || UNITY_WEBGL || UNITY_IOS || UNITY_PS4 || UNITY_SAMSUNGTV || UNITY_XBOXONE || UNITY_TIZEN || UNITY_TVOS
+#define UNITY
+#endif
+
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+// Based on http://stackoverflow.com/a/12606963 and http://wiki.unity3d.com/index.php/WebAsync
+//
+//-----------------------------------------------------------------------
+
+#if !UNITY
+
+namespace Mapbox.Platform {
+
+
+ using System;
+ using System.Net;
+#if !UNITY && !NETFX_CORE
+ using System.Net.Cache;
+#endif
+ using System.IO;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.ComponentModel;
+ using Utils;
+#if NETFX_CORE
+ using System.Net.Http;
+ using System.Linq;
+#endif
+
+ internal sealed class HTTPRequestNonThreaded : IAsyncRequest {
+
+
+ public bool IsCompleted { get; private set; }
+
+
+ private Action _callback;
+#if !NETFX_CORE
+ private HttpWebRequest _request;
+#else
+ private HttpClient _request;
+ private CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
+#endif
+#if !UNITY
+ private SynchronizationContext _sync = AsyncOperationManager.SynchronizationContext;
+#endif
+ private int _timeOut;
+ private string _requestUrl;
+ private readonly string _userAgent = "mapbox-sdk-cs";
+
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// seconds
+ public HTTPRequestNonThreaded(string url, Action callback, int timeOut = 10) {
+
+ IsCompleted = false;
+ _callback = callback;
+ _timeOut = timeOut;
+ _requestUrl = url;
+
+ setupRequest();
+
+ Action a = () => { getResponseNonThreaded(_request, EvaluateResponse); };
+ //Fire and forget ;-)
+ a.BeginInvoke(a.EndInvoke, null);
+ }
+
+
+ private void setupRequest() {
+
+#if !NETFX_CORE
+ _request = WebRequest.Create(_requestUrl) as HttpWebRequest;
+ _request.UserAgent = _userAgent;
+ //_hwr.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36";
+ //_hwr.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
+ _request.Credentials = CredentialCache.DefaultCredentials;
+ _request.KeepAlive = true;
+ _request.ProtocolVersion = HttpVersion.Version11; // improved performance
+
+ // improved performance.
+ // ServicePointManager.DefaultConnectionLimit doesn't seem to change anything
+ // set ConnectionLimit per request
+ // https://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(v=vs.90).aspx#Remarks
+ // use a value that is 12 times the number of CPUs on the local computer
+ _request.ServicePoint.ConnectionLimit = Environment.ProcessorCount * 6;
+
+ _request.ServicePoint.UseNagleAlgorithm = true;
+ _request.ServicePoint.Expect100Continue = false;
+ _request.ServicePoint.MaxIdleTime = 2000;
+ _request.Method = "GET";
+ _request.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate");
+ _request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
+ //_hwr.Timeout = timeOut * 1000; doesn't work in async calls, see below
+
+#else
+ HttpClientHandler handler = new HttpClientHandler() {
+ AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
+ AllowAutoRedirect = true,
+ UseDefaultCredentials = true
+
+ };
+ _request = new HttpClient(handler);
+ _request.DefaultRequestHeaders.Add("User-Agent", _userAgent);
+ _request.Timeout = TimeSpan.FromSeconds(_timeOut);
+
+ // TODO: how to set ConnectionLimit? ServicePoint.ConnectionLimit doesn't seem to be available.
+#endif
+
+#if !UNITY && !NETFX_CORE
+ // 'NoCacheNoStore' greatly reduced the number of faulty request
+ // seems that .Net caching and Mapbox API don't play well together
+ _request.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.NoCacheNoStore);
+#endif
+ }
+
+
+
+#if NETFX_CORE
+ private async void getResponseNonThreaded(HttpClient request, Action gotResponse) {
+
+ // TODO: implement a strategy similar to the full .Net one to avoid blocking of 'GetAsync()'
+ // see 'Remarks' https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.timeout?view=netcore-1.1#System_Net_Http_HttpClient_Timeout
+ // "A Domain Name System (DNS) query may take up to 15 seconds to return or time out."
+
+ HttpResponseMessage response = null;
+ try {
+ response = await request.GetAsync(_requestUrl, _cancellationTokenSource.Token);
+ gotResponse(response, null);
+ }
+ catch (Exception ex) {
+ gotResponse(response, ex);
+ }
+
+ }
+
+
+ private async void EvaluateResponse(HttpResponseMessage apiResponse, Exception apiEx) {
+
+ var response = await Response.FromWebResponse(this, apiResponse, apiEx);
+
+ // post (async) callback back to the main/UI thread
+ // Unity: SynchronizationContext doesn't do anything
+ // use the Dispatcher
+#if !UNITY
+ _sync.Post(delegate { callCallbackAndcleanUp(response); }, null);
+#else
+ UnityToolbag.Dispatcher.InvokeAsync(() => { callCallbackAndcleanUp(response); });
+#endif
+ }
+
+#endif
+
+
+#if !NETFX_CORE
+ private void getResponseNonThreaded(HttpWebRequest request, Action gotResponse) {
+
+ HttpWebResponse response = null;
+ try {
+ response = (HttpWebResponse)request.GetResponse();
+ gotResponse(response, null);
+ }
+ catch (WebException wex) {
+ //another place to watchout for HttpWebRequest.Abort to occur
+ if (wex.Status == WebExceptionStatus.RequestCanceled) {
+ gotResponse(null, wex);
+ } else {
+ HttpWebResponse hwr = wex.Response as HttpWebResponse;
+ if (null == hwr) {
+ gotResponse(null, wex);
+ } else {
+ gotResponse(hwr, wex);
+ }
+ }
+ }
+ catch (Exception ex) {
+ gotResponse(response, ex);
+ }
+ }
+
+
+ private void EvaluateResponse(HttpWebResponse apiResponse, Exception apiEx) {
+
+ var response = Response.FromWebResponse(this, apiResponse, apiEx);
+
+#if !UNITY
+ // post (async) callback back to the main/UI thread
+ // Unity: SynchronizationContext doesn't do anything
+ // use the Dispatcher
+ _sync.Post(delegate { callCallbackAndcleanUp(response); }, null);
+#else
+ // Unity is playing
+ if (UnityToolbag.Dispatcher._instanceExists) {
+ UnityToolbag.Dispatcher.InvokeAsync(() => { callCallbackAndcleanUp(response); });
+ } else { // Unity is in Edit Mode
+#if UNITY_EDITOR
+ Mapbox.Unity.DispatcherEditor.InvokeAsync(() => { callCallbackAndcleanUp(response); });
+#endif
+ }
+#endif
+ }
+#endif
+
+
+ private void callCallbackAndcleanUp(Response response) {
+ _callback(response);
+ IsCompleted = true;
+ _callback = null;
+#if NETFX_CORE
+ if (null != _request) {
+ _request.Dispose();
+ _request = null;
+ }
+#endif
+ }
+
+
+ public void Cancel() {
+
+#if !NETFX_CORE
+ if (null != _request) {
+ _request.Abort();
+ }
+#else
+ _cancellationTokenSource.Cancel();
+#endif
+ }
+
+
+ }
+}
+#endif
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestNonThreaded.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestNonThreaded.cs.meta
new file mode 100644
index 0000000..942353d
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestNonThreaded.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: ca6d4261d474b4de0b14637c81b1795c
+timeCreated: 1494952070
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestThreaded.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestThreaded.cs
new file mode 100644
index 0000000..c8274b5
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestThreaded.cs
@@ -0,0 +1,318 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+// Based on http://stackoverflow.com/a/12606963 and http://wiki.unity3d.com/index.php/WebAsync
+//
+//-----------------------------------------------------------------------
+
+#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_ANDROID || UNITY_WP_8_1 || UNITY_WSA || UNITY_WEBGL || UNITY_IOS || UNITY_PS4 || UNITY_SAMSUNGTV || UNITY_XBOXONE || UNITY_TIZEN || UNITY_TVOS
+#define UNITY
+#endif
+
+#if !UNITY
+
+namespace Mapbox.Platform {
+
+
+ using System;
+ using System.Net;
+#if !UNITY && !NETFX_CORE
+ using System.Net.Cache;
+#endif
+ using System.IO;
+ using System.Collections.Generic;
+ using System.Threading;
+ using System.ComponentModel;
+ using Utils;
+#if NETFX_CORE
+ using System.Net.Http;
+ using System.Linq;
+#endif
+
+ //using System.Windows.Threading;
+
+ internal sealed class HTTPRequestThreaded : IAsyncRequest {
+
+
+ public bool IsCompleted { get; private set; }
+
+
+ private Action _callback;
+#if !NETFX_CORE
+ private HttpWebRequest _request;
+#else
+ private HttpClient _request;
+ private CancellationTokenSource _cancellationTokenSource = new CancellationTokenSource();
+#endif
+#if !UNITY
+ private SynchronizationContext _sync = AsyncOperationManager.SynchronizationContext;
+#endif
+ private int _timeOut;
+ private string _requestUrl;
+ private readonly string _userAgent = "mapbox-sdk-cs";
+
+
+ ///
+ ///
+ ///
+ ///
+ ///
+ /// seconds
+ public HTTPRequestThreaded(string url, Action callback, int timeOut = 10) {
+
+ IsCompleted = false;
+ _callback = callback;
+ _timeOut = timeOut;
+ _requestUrl = url;
+
+ setupRequest();
+ getResponseAsync(_request, EvaluateResponse);
+ }
+
+
+ private void setupRequest() {
+
+#if !NETFX_CORE
+ _request = WebRequest.Create(_requestUrl) as HttpWebRequest;
+ _request.UserAgent = _userAgent;
+ //_hwr.UserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/57.0.2987.133 Safari/537.36";
+ //_hwr.CachePolicy = new RequestCachePolicy(RequestCacheLevel.NoCacheNoStore);
+ _request.Credentials = CredentialCache.DefaultCredentials;
+ _request.KeepAlive = true;
+ _request.ProtocolVersion = HttpVersion.Version11; // improved performance
+
+ // improved performance.
+ // ServicePointManager.DefaultConnectionLimit doesn't seem to change anything
+ // set ConnectionLimit per request
+ // https://msdn.microsoft.com/en-us/library/system.net.httpwebrequest(v=vs.90).aspx#Remarks
+ // use a value that is 12 times the number of CPUs on the local computer
+ _request.ServicePoint.ConnectionLimit = Environment.ProcessorCount * 6;
+
+ _request.ServicePoint.UseNagleAlgorithm = true;
+ _request.ServicePoint.Expect100Continue = false;
+ _request.ServicePoint.MaxIdleTime = 2000;
+ _request.Method = "GET";
+ _request.Headers.Add(HttpRequestHeader.AcceptEncoding, "gzip,deflate");
+ _request.AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate;
+ //_hwr.Timeout = timeOut * 1000; doesn't work in async calls, see below
+
+#else
+ HttpClientHandler handler = new HttpClientHandler() {
+ AutomaticDecompression = DecompressionMethods.GZip | DecompressionMethods.Deflate,
+ AllowAutoRedirect = true,
+ UseDefaultCredentials = true
+
+ };
+ _request = new HttpClient(handler);
+ _request.DefaultRequestHeaders.Add("User-Agent", _userAgent);
+ _request.Timeout = TimeSpan.FromSeconds(_timeOut);
+
+ // TODO: how to set ConnectionLimit? ServicePoint.ConnectionLimit doesn't seem to be available.
+#endif
+
+#if !UNITY && !NETFX_CORE
+ // 'NoCacheNoStore' greatly reduced the number of faulty request
+ // seems that .Net caching and Mapbox API don't play well together
+ _request.CachePolicy = new System.Net.Cache.RequestCachePolicy(System.Net.Cache.RequestCacheLevel.NoCacheNoStore);
+#endif
+ }
+
+
+
+#if NETFX_CORE
+
+ private async void getResponseAsync(HttpClient request, Action gotResponse) {
+
+ // TODO: implement a strategy similar to the full .Net one to avoid blocking of 'GetAsync()'
+ // see 'Remarks' https://docs.microsoft.com/en-us/dotnet/api/system.net.http.httpclient.timeout?view=netcore-1.1#System_Net_Http_HttpClient_Timeout
+ // "A Domain Name System (DNS) query may take up to 15 seconds to return or time out."
+
+ HttpResponseMessage response = null;
+ try {
+ response = await request.GetAsync(_requestUrl, _cancellationTokenSource.Token);
+ gotResponse(response, null);
+ }
+ catch (Exception ex) {
+ gotResponse(response, ex);
+ }
+
+ }
+
+
+ private async void EvaluateResponse(HttpResponseMessage apiResponse, Exception apiEx) {
+
+ var response = await Response.FromWebResponse(this, apiResponse, apiEx);
+
+ // post (async) callback back to the main/UI thread
+ // Unity: SynchronizationContext doesn't do anything
+ // use the Dispatcher
+#if !UNITY
+ _sync.Post(delegate {
+ _callback(response);
+ IsCompleted = true;
+ _callback = null;
+#if NETFX_CORE
+ if (null != _request) {
+ _request.Dispose();
+ _request = null;
+ }
+#endif
+ }, null);
+#else
+ UnityToolbag.Dispatcher.InvokeAsync(() => {
+ _callback(response);
+ IsCompleted = true;
+ _callback = null;
+#if NETFX_CORE
+ if (null != _request) {
+ _request.Dispose();
+ _request = null;
+ }
+#endif
+ });
+#endif
+ }
+
+#endif
+
+
+#if !NETFX_CORE
+ private void getResponseAsync(HttpWebRequest request, Action gotResponse) {
+
+ // create an additional action wrapper, because of:
+ // https://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.begingetresponse.aspx
+ // The BeginGetResponse method requires some synchronous setup tasks to complete (DNS resolution,
+ //proxy detection, and TCP socket connection, for example) before this method becomes asynchronous.
+ // As a result, this method should never be called on a user interface (UI) thread because it might
+ // take considerable time(up to several minutes depending on network settings) to complete the
+ // initial synchronous setup tasks before an exception for an error is thrown or the method succeeds.
+
+ Action actionWrapper = () => {
+ try {
+ // BeginInvoke runs on a thread of the thread pool (!= main/UI thread)
+ // that's why we need SynchronizationContext when
+ // TODO: how to influence threadpool: nr of threads etc.
+ long startTicks = DateTime.Now.Ticks;
+ request.BeginGetResponse((asycnResult) => {
+ try { // there's a try/catch here because execution path is different from invokation one, exception here may cause a crash
+ long beforeEndGet = DateTime.Now.Ticks;
+ HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(asycnResult);
+ //long finished = DateTime.Now.Ticks;
+ //long duration = finished - startTicks;
+ //TimeSpan ts = TimeSpan.FromTicks(duration);
+ //TimeSpan tsEndGet = TimeSpan.FromTicks(finished - beforeEndGet);
+ //TimeSpan tsBeginGet = TimeSpan.FromTicks(beforeEndGet - startTicks);
+ //UnityEngine.Debug.Log("received response - " + ts.Milliseconds + "ms" + " BeginGet: " + tsBeginGet.Milliseconds + " EndGet: " + tsEndGet.Milliseconds + " CompletedSynchronously: " + asycnResult.CompletedSynchronously);
+ gotResponse(response, null);
+ }
+ // EndGetResponse() throws on on some status codes, try to get response anyway (and status codes)
+ catch (WebException wex) {
+ //another place to watchout for HttpWebRequest.Abort to occur
+ if (wex.Status == WebExceptionStatus.RequestCanceled) {
+ gotResponse(null, wex);
+ } else {
+ HttpWebResponse hwr = wex.Response as HttpWebResponse;
+ if (null == hwr) {
+ throw;
+ }
+ gotResponse(hwr, wex);
+ }
+ }
+ catch (Exception ex) {
+ gotResponse(null, ex);
+ }
+ }
+ , null);
+ }
+ catch (Exception ex) {
+ //catch exception from HttpWebRequest.Abort
+ gotResponse(null, ex);
+ }
+ };
+
+ try {
+ actionWrapper.BeginInvoke(new AsyncCallback((iAsyncResult) => {
+ var action = (Action)iAsyncResult.AsyncState;
+ action.EndInvoke(iAsyncResult);
+ })
+ , actionWrapper);
+ }
+ catch (Exception ex) {
+ gotResponse(null, ex);
+ }
+ }
+
+
+
+ private void EvaluateResponse(HttpWebResponse apiResponse, Exception apiEx) {
+
+ var response = Response.FromWebResponse(this, apiResponse,apiEx);
+
+ // post (async) callback back to the main/UI thread
+ // Unity: SynchronizationContext doesn't do anything
+ // use the Dispatcher
+#if !UNITY
+ _sync.Post(delegate {
+ _callback(response);
+ IsCompleted = true;
+ _callback = null;
+#if NETFX_CORE
+ if (null != _request) {
+ _request.Dispose();
+ _request = null;
+ }
+#endif
+ }, null);
+#else
+ // Unity is playing
+ if (UnityToolbag.Dispatcher._instanceExists) {
+ UnityToolbag.Dispatcher.InvokeAsync(() => {
+ _callback(response);
+ IsCompleted = true;
+ _callback = null;
+#if NETFX_CORE
+ if (null != _request) {
+ _request.Dispose();
+ _request = null;
+ }
+#endif
+ });
+ } else { // Unity is in Edit Mode
+#if UNITY_EDITOR
+ Mapbox.Unity.DispatcherEditor.InvokeAsync(() => {
+ _callback(response);
+ IsCompleted = true;
+ _callback = null;
+#if NETFX_CORE
+ if (null != _request) {
+ _request.Dispose();
+ _request = null;
+ }
+#endif
+ });
+#endif
+
+ }
+#endif
+ }
+#endif
+
+
+
+ public void Cancel() {
+
+#if !NETFX_CORE
+ if (null != _request) {
+ _request.Abort();
+ }
+#else
+ _cancellationTokenSource.Cancel();
+#endif
+ }
+
+
+ }
+}
+
+
+#endif
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestThreaded.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestThreaded.cs.meta
new file mode 100644
index 0000000..7c2ae3b
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/HTTPRequestThreaded.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 7952dd05dd1ff40d0bff547dacc6e714
+timeCreated: 1494952070
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequest.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequest.cs
new file mode 100644
index 0000000..f26596a
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequest.cs
@@ -0,0 +1,25 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+
+namespace Mapbox.Platform {
+
+ using Mapbox.Unity.Utilities;
+
+
+ /// A handle to an asynchronous request.
+ public interface IAsyncRequest {
+
+ /// True after the request has finished.
+ bool IsCompleted { get; }
+
+ /// Cancel the ongoing request, preventing it from firing a callback.
+ void Cancel();
+
+ /// Type of request: GET, HEAD, ...
+ HttpRequestType RequestType { get; }
+ }
+}
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequest.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequest.cs.meta
new file mode 100644
index 0000000..005955d
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequest.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3687819725d334e82b70887393d8c63f
+timeCreated: 1494951007
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequestFactory.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequestFactory.cs
new file mode 100644
index 0000000..195d1e4
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequestFactory.cs
@@ -0,0 +1,39 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+#if UNITY_EDITOR || UNITY_STANDALONE || UNITY_ANDROID || UNITY_WP_8_1 || UNITY_WSA || UNITY_WEBGL || UNITY_IOS || UNITY_PS4 || UNITY_SAMSUNGTV || UNITY_XBOXONE || UNITY_TIZEN || UNITY_TVOS
+#define UNITY
+#endif
+
+namespace Mapbox.Platform {
+
+ using Mapbox.Map;
+ using Mapbox.Unity.Utilities;
+ using System;
+
+ /// A handle to an asynchronous request.
+ public static class IAsyncRequestFactory {
+
+ public static IAsyncRequest CreateRequest(
+ string url
+ , Action callback
+ , int timeout
+ , HttpRequestType requestType= HttpRequestType.Get
+ ) {
+#if !UNITY
+ if (Environment.ProcessorCount > 2) {
+ return new HTTPRequestThreaded(url, callback, timeout);
+ } else {
+ return new HTTPRequestNonThreaded(url, callback, timeout);
+ }
+#else
+ return new Mapbox.Unity.Utilities.HTTPRequest(url, callback, timeout, requestType);
+#endif
+ }
+
+
+ }
+}
\ No newline at end of file
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequestFactory.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequestFactory.cs.meta
new file mode 100644
index 0000000..ebacba4
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IAsyncRequestFactory.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 2ee60049c3e114aed8e10d5b28d83efe
+timeCreated: 1494952069
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IFileSource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IFileSource.cs
new file mode 100644
index 0000000..64528bc
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IFileSource.cs
@@ -0,0 +1,30 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Platform
+{
+ using Mapbox.Map;
+ using System;
+
+ ///
+ /// A data source abstraction. Used by classes that need to fetch data but really
+ /// don't care about from where the data is coming from. An implementation of
+ /// IFileSource could fetch the data from the network, disk cache or even generate
+ /// the data at runtime.
+ ///
+ public interface IFileSource
+ {
+ /// Performs a request asynchronously.
+ /// The resource description in the URI format.
+ /// Callback to be called after the request is completed.
+ ///
+ /// Returns a that can be used for canceling a pending
+ /// request. This handle can be completely ignored if there is no intention of ever
+ /// canceling the request.
+ ///
+ IAsyncRequest Request(string uri, Action callback, int timeout = 10, CanonicalTileId tileId = new CanonicalTileId(), string tilesetId = null);
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IFileSource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IFileSource.cs.meta
new file mode 100644
index 0000000..aba725e
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IFileSource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 891a55d979ad44487b2ad8e1384cfc65
+timeCreated: 1494951007
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IResource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IResource.cs
new file mode 100644
index 0000000..f96aaf1
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IResource.cs
@@ -0,0 +1,21 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Platform
+{
+ using System;
+
+ ///
+ /// Interface representing a Mapbox resource URL. Used to build request strings
+ /// and return full URLs to a Mapbox Web Service API resource.
+ ///
+ public interface IResource
+ {
+ /// Builds a complete, valid URL string.
+ /// URL string.
+ string GetUrl();
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IResource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IResource.cs.meta
new file mode 100644
index 0000000..8cee1a6
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/IResource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 6c11ed4c71914479ebeb8b69bf0bb677
+timeCreated: 1491243034
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Resource.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Resource.cs
new file mode 100644
index 0000000..6ea1f7b
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Resource.cs
@@ -0,0 +1,76 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+namespace Mapbox.Platform
+{
+ using System;
+ using System.Collections;
+ using System.Collections.Generic;
+ using System.Collections.Specialized;
+ using System.Linq;
+#if UNITY_IOS
+ using UnityEngine;
+#endif
+
+ /// Abstract class representing a Mapbox resource URL.
+ public abstract class Resource
+ {
+ /// Gets the API endpoint, which is a partial URL path.
+ public abstract string ApiEndpoint { get; }
+
+ /// Builds a complete, valid URL string.
+ /// Returns URL string.
+ public abstract string GetUrl();
+
+ /// Encodes a URI with a querystring.
+ /// Querystring values.
+ /// Encoded URL.
+ protected static String EncodeQueryString(IEnumerable> values)
+ {
+ if (values != null)
+ {
+ // we are seeing super weird crashes on some iOS devices:
+ // see 'ForwardGeocodeResource' for more details
+ var encodedValues = from p in values
+#if UNITY_IOS
+#if UNITY_2017_1_OR_NEWER
+ let k = UnityEngine.Networking.UnityWebRequest.EscapeURL(p.Key.Trim())
+ let v = UnityEngine.Networking.UnityWebRequest.EscapeURL(p.Value)
+#else
+ let k = WWW.EscapeURL(p.Key.Trim())
+ let v = WWW.EscapeURL(p.Value)
+#endif
+#else
+ let k = Uri.EscapeDataString(p.Key.Trim())
+ let v = Uri.EscapeDataString(p.Value)
+#endif
+ orderby k
+ select string.IsNullOrEmpty(v) ? k : string.Format("{0}={1}", k, v);
+ if (encodedValues.Count() == 0)
+ {
+ return string.Empty;
+ }
+ else
+ {
+ return "?" + string.Join(
+ "&", encodedValues.ToArray());
+ }
+ }
+
+ return string.Empty;
+ }
+
+ /// Builds a string from an array of options for use in URLs.
+ /// Array of option strings.
+ /// Character to use for separating items in arry. Defaults to ",".
+ /// Comma-separated string of options.
+ /// Type in the array.
+ protected static string GetUrlQueryFromArray(U[] items, string separator = ",")
+ {
+ return string.Join(separator, items.Select(item => item.ToString()).ToArray());
+ }
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Resource.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Resource.cs.meta
new file mode 100644
index 0000000..6e96030
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Resource.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: 3c337c92960274b8098678fcfebbc8d0
+timeCreated: 1491243034
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Response.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Response.cs
new file mode 100644
index 0000000..5735aa7
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Response.cs
@@ -0,0 +1,339 @@
+//-----------------------------------------------------------------------
+//
+// Copyright (c) 2016 Mapbox. All rights reserved.
+//
+//-----------------------------------------------------------------------
+
+#if UNITY_2017_1_OR_NEWER
+#define UNITY
+#endif
+
+namespace Mapbox.Platform
+{
+
+ using System;
+ using System.Collections.Generic;
+ using System.Collections.ObjectModel;
+ using System.IO;
+ using System.Linq;
+ using System.Net;
+ using Utils;
+
+#if NETFX_CORE
+ using System.Net.Http;
+ using System.Threading.Tasks;
+#endif
+#if UNITY
+ using UnityEngine.Networking;
+ using Mapbox.Unity.Utilities;
+#endif
+
+ /// A response from a request.
+ public class Response
+ {
+
+
+ private Response() { }
+
+
+ public IAsyncRequest Request { get; private set; }
+
+
+ public bool RateLimitHit
+ {
+ get { return StatusCode.HasValue ? 429 == StatusCode.Value : false; }
+ }
+
+
+ /// Flag to indicate if the request was successful
+ public bool HasError
+ {
+ get { return _exceptions == null ? false : _exceptions.Count > 0; }
+ }
+
+ /// Flag to indicate if the request was fullfilled from a local cache
+ public bool LoadedFromCache;
+
+ /// Flag to indicate if the request was issued before but was issued again and updated
+ public bool IsUpdate = false;
+
+ public string RequestUrl;
+
+
+ public int? StatusCode;
+
+
+ public string ContentType;
+
+
+ /// Length of rate-limiting interval in seconds. https://www.mapbox.com/api-documentation/#rate-limit-headers
+ public int? XRateLimitInterval;
+
+
+ /// Maximum number of requests you may make in the current interval before reaching the limit. https://www.mapbox.com/api-documentation/#rate-limit-headers
+ public long? XRateLimitLimit;
+
+
+ /// Timestamp of when the current interval will end and the ratelimit counter is reset. https://www.mapbox.com/api-documentation/#rate-limit-headers
+ public DateTime? XRateLimitReset;
+
+
+ private List _exceptions;
+ /// Exceptions that might have occured during the request.
+ public ReadOnlyCollection Exceptions
+ {
+ get { return null == _exceptions ? null : _exceptions.AsReadOnly(); }
+ }
+
+
+ /// Messages of exceptions otherwise empty string.
+ public string ExceptionsAsString
+ {
+ get
+ {
+ if (null == _exceptions || _exceptions.Count == 0) { return string.Empty; }
+ return string.Join(Environment.NewLine, _exceptions.Select(e => e.Message).ToArray());
+ }
+ }
+
+
+ /// Headers of the response.
+ public Dictionary Headers;
+
+
+ /// Raw data fetched from the request.
+ public byte[] Data;
+
+ public void AddException(Exception ex)
+ {
+ if (null == _exceptions) { _exceptions = new List(); }
+ _exceptions.Add(ex);
+ }
+
+ // TODO: we should store timestamp of the cache!
+ public static Response FromCache(byte[] data)
+ {
+ Response response = new Response();
+ response.Data = data;
+ response.LoadedFromCache = true;
+ return response;
+ }
+
+#if !NETFX_CORE && !UNITY // full .NET Framework
+ public static Response FromWebResponse(IAsyncRequest request, HttpWebResponse apiResponse, Exception apiEx) {
+
+ Response response = new Response();
+ response.Request = request;
+
+ if (null != apiEx) {
+ response.AddException(apiEx);
+ }
+
+ // timeout: API response is null
+ if (null == apiResponse) {
+ response.AddException(new Exception("No Reponse."));
+ } else {
+ // https://www.mapbox.com/api-documentation/#rate-limit-headers
+ if (null != apiResponse.Headers) {
+ response.Headers = new Dictionary();
+ for (int i = 0; i < apiResponse.Headers.Count; i++) {
+ // TODO: implement .Net Core / UWP implementation
+ string key = apiResponse.Headers.Keys[i];
+ string val = apiResponse.Headers[i];
+ response.Headers.Add(key, val);
+ if (key.Equals("X-Rate-Limit-Interval", StringComparison.InvariantCultureIgnoreCase)) {
+ int limitInterval;
+ if (int.TryParse(val, out limitInterval)) { response.XRateLimitInterval = limitInterval; }
+ } else if (key.Equals("X-Rate-Limit-Limit", StringComparison.InvariantCultureIgnoreCase)) {
+ long limitLimit;
+ if (long.TryParse(val, out limitLimit)) { response.XRateLimitLimit = limitLimit; }
+ } else if (key.Equals("X-Rate-Limit-Reset", StringComparison.InvariantCultureIgnoreCase)) {
+ double unixTimestamp;
+ if (double.TryParse(val, out unixTimestamp)) {
+ response.XRateLimitReset = UnixTimestampUtils.From(unixTimestamp);
+ }
+ } else if (key.Equals("Content-Type", StringComparison.InvariantCultureIgnoreCase)) {
+ response.ContentType = val;
+ }
+ }
+ }
+
+ if (apiResponse.StatusCode != HttpStatusCode.OK) {
+ response.AddException(new Exception(string.Format("{0}: {1}", apiResponse.StatusCode, apiResponse.StatusDescription)));
+ }
+ int statusCode = (int)apiResponse.StatusCode;
+ response.StatusCode = statusCode;
+ if (429 == statusCode) {
+ response.AddException(new Exception("Rate limit hit"));
+ }
+
+ if (null != apiResponse) {
+ using (Stream responseStream = apiResponse.GetResponseStream()) {
+ byte[] buffer = new byte[0x1000];
+ int bytesRead;
+ using (MemoryStream ms = new MemoryStream()) {
+ while (0 != (bytesRead = responseStream.Read(buffer, 0, buffer.Length))) {
+ ms.Write(buffer, 0, bytesRead);
+ }
+ response.Data = ms.ToArray();
+ }
+ }
+ apiResponse.Close();
+ }
+ }
+
+ return response;
+ }
+#endif
+
+#if NETFX_CORE && !UNITY //UWP but not Unity
+ public static async Task FromWebResponse(IAsyncRequest request, HttpResponseMessage apiResponse, Exception apiEx) {
+
+ Response response = new Response();
+ response.Request = request;
+
+ if (null != apiEx) {
+ response.AddException(apiEx);
+ }
+
+ // timeout: API response is null
+ if (null == apiResponse) {
+ response.AddException(new Exception("No Reponse."));
+ } else {
+ // https://www.mapbox.com/api-documentation/#rate-limit-headers
+ if (null != apiResponse.Headers) {
+ response.Headers = new Dictionary();
+ foreach (var hdr in apiResponse.Headers) {
+ string key = hdr.Key;
+ string val = hdr.Value.FirstOrDefault();
+ response.Headers.Add(key, val);
+ if (key.Equals("X-Rate-Limit-Interval", StringComparison.OrdinalIgnoreCase)) {
+ int limitInterval;
+ if (int.TryParse(val, out limitInterval)) { response.XRateLimitInterval = limitInterval; }
+ } else if (key.Equals("X-Rate-Limit-Limit", StringComparison.OrdinalIgnoreCase)) {
+ long limitLimit;
+ if (long.TryParse(val, out limitLimit)) { response.XRateLimitLimit = limitLimit; }
+ } else if (key.Equals("X-Rate-Limit-Reset", StringComparison.OrdinalIgnoreCase)) {
+ double unixTimestamp;
+ if (double.TryParse(val, out unixTimestamp)) {
+ DateTime beginningOfTime = new DateTime(1970, 1, 1, 0, 0, 0, 0, DateTimeKind.Utc);
+ response.XRateLimitReset = beginningOfTime.AddSeconds(unixTimestamp).ToLocalTime();
+ }
+ } else if (key.Equals("Content-Type", StringComparison.OrdinalIgnoreCase)) {
+ response.ContentType = val;
+ }
+ }
+ }
+
+ if (apiResponse.StatusCode != HttpStatusCode.OK) {
+ response.AddException(new Exception(string.Format("{0}: {1}", apiResponse.StatusCode, apiResponse.ReasonPhrase)));
+ }
+ int statusCode = (int)apiResponse.StatusCode;
+ response.StatusCode = statusCode;
+ if (429 == statusCode) {
+ response.AddException(new Exception("Rate limit hit"));
+ }
+
+ if (null != apiResponse) {
+ response.Data = await apiResponse.Content.ReadAsByteArrayAsync();
+ }
+ }
+
+ return response;
+ }
+#endif
+
+#if UNITY // within Unity or UWP build from Unity
+ public static Response FromWebResponse(IAsyncRequest request, UnityWebRequest apiResponse, Exception apiEx)
+ {
+
+ Response response = new Response();
+ response.Request = request;
+
+ if (null != apiEx)
+ {
+ response.AddException(apiEx);
+ }
+
+ // additional string.empty check for apiResponse.error:
+ // on UWP isNetworkError is sometimes set to true despite all being well
+ if (apiResponse.isNetworkError && !string.IsNullOrEmpty(apiResponse.error))
+ {
+ response.AddException(new Exception(apiResponse.error));
+ }
+
+ if (request.RequestType != HttpRequestType.Head)
+ {
+ if (null == apiResponse.downloadHandler.data)
+ {
+ response.AddException(new Exception("Response has no data."));
+ }
+ }
+
+#if NETFX_CORE
+ StringComparison stringComp = StringComparison.OrdinalIgnoreCase;
+#elif WINDOWS_UWP
+ StringComparison stringComp = StringComparison.OrdinalIgnoreCase;
+#else
+ StringComparison stringComp = StringComparison.InvariantCultureIgnoreCase;
+#endif
+
+ Dictionary apiHeaders = apiResponse.GetResponseHeaders();
+ if (null != apiHeaders)
+ {
+ response.Headers = new Dictionary();
+ foreach (var apiHdr in apiHeaders)
+ {
+ string key = apiHdr.Key;
+ string val = apiHdr.Value;
+ response.Headers.Add(key, val);
+ if (key.Equals("X-Rate-Limit-Interval", stringComp))
+ {
+ int limitInterval;
+ if (int.TryParse(val, out limitInterval)) { response.XRateLimitInterval = limitInterval; }
+ }
+ else if (key.Equals("X-Rate-Limit-Limit", stringComp))
+ {
+ long limitLimit;
+ if (long.TryParse(val, out limitLimit)) { response.XRateLimitLimit = limitLimit; }
+ }
+ else if (key.Equals("X-Rate-Limit-Reset", stringComp))
+ {
+ double unixTimestamp;
+ if (double.TryParse(val, out unixTimestamp))
+ {
+ response.XRateLimitReset = UnixTimestampUtils.From(unixTimestamp);
+ }
+ }
+ else if (key.Equals("Content-Type", stringComp))
+ {
+ response.ContentType = val;
+ }
+ }
+ }
+
+ int statusCode = (int)apiResponse.responseCode;
+ response.StatusCode = statusCode;
+
+ if (statusCode != 200)
+ {
+ response.AddException(new Exception(string.Format("Status Code {0}", apiResponse.responseCode)));
+ }
+ if (429 == statusCode)
+ {
+ response.AddException(new Exception("Rate limit hit"));
+ }
+
+ if (request.RequestType != HttpRequestType.Head)
+ {
+ response.Data = apiResponse.downloadHandler.data;
+ }
+
+ return response;
+ }
+#endif
+
+
+
+ }
+}
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Response.cs.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Response.cs.meta
new file mode 100644
index 0000000..2d766d8
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Response.cs.meta
@@ -0,0 +1,12 @@
+fileFormatVersion: 2
+guid: f904217270b634d929d1a92bee809d3e
+timeCreated: 1494951007
+licenseType: Pro
+MonoImporter:
+ serializedVersion: 2
+ defaultReferences: []
+ executionOrder: 0
+ icon: {instanceID: 0}
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/SQLite.meta b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/SQLite.meta
new file mode 100644
index 0000000..406bc7a
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/SQLite.meta
@@ -0,0 +1,9 @@
+fileFormatVersion: 2
+guid: e42bed265428942f4817d4918fbb7c41
+folderAsset: yes
+timeCreated: 1497883478
+licenseType: Pro
+DefaultImporter:
+ userData:
+ assetBundleName:
+ assetBundleVariant:
diff --git a/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/SQLite/SQLite.cs b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/SQLite/SQLite.cs
new file mode 100644
index 0000000..b28b443
--- /dev/null
+++ b/Assets/Mapbox/Core/mapbox-sdk-cs/Platform/SQLite/SQLite.cs
@@ -0,0 +1,3638 @@
+//
+// Copyright (c) 2009-2012 Krueger Systems, Inc.
+//
+// Permission is hereby granted, free of charge, to any person obtaining a copy
+// of this software and associated documentation files (the "Software"), to deal
+// in the Software without restriction, including without limitation the rights
+// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+// copies of the Software, and to permit persons to whom the Software is
+// furnished to do so, subject to the following conditions:
+//
+// The above copyright notice and this permission notice shall be included in
+// all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+// THE SOFTWARE.
+//
+#if WINDOWS_PHONE && !USE_WP8_NATIVE_SQLITE
+#define USE_CSHARP_SQLITE
+#endif
+
+using System;
+using System.Diagnostics;
+using System.Runtime.InteropServices;
+using System.Collections.Generic;
+using System.Reflection;
+using System.Linq;
+using System.Linq.Expressions;
+using System.Threading;
+
+#if USE_CSHARP_SQLITE
+using Sqlite3 = Community.CsharpSqlite.Sqlite3;
+using Sqlite3DatabaseHandle = Community.CsharpSqlite.Sqlite3.sqlite3;
+using Sqlite3Statement = Community.CsharpSqlite.Sqlite3.Vdbe;
+#elif USE_WP8_NATIVE_SQLITE
+using Sqlite3 = Sqlite.Sqlite3;
+using Sqlite3DatabaseHandle = Sqlite.Database;
+using Sqlite3Statement = Sqlite.Statement;
+#else
+using Sqlite3DatabaseHandle = System.IntPtr;
+using Sqlite3Statement = System.IntPtr;
+#endif
+
+namespace SQLite4Unity3d
+{
+ public class SQLiteException : Exception
+ {
+ public SQLite3.Result Result { get; private set; }
+
+ protected SQLiteException(SQLite3.Result r, string message) : base(message)
+ {
+ Result = r;
+ }
+
+ public static SQLiteException New(SQLite3.Result r, string message)
+ {
+ return new SQLiteException(r, message);
+ }
+ }
+
+ public class NotNullConstraintViolationException : SQLiteException
+ {
+ public IEnumerable Columns { get; protected set; }
+
+ protected NotNullConstraintViolationException(SQLite3.Result r, string message)
+ : this(r, message, null, null)
+ {
+
+ }
+
+ protected NotNullConstraintViolationException(SQLite3.Result r, string message, TableMapping mapping, object obj)
+ : base(r, message)
+ {
+ if (mapping != null && obj != null)
+ {
+ this.Columns = from c in mapping.Columns
+ where c.IsNullable == false && c.GetValue(obj) == null
+ select c;
+ }
+ }
+
+ public static new NotNullConstraintViolationException New(SQLite3.Result r, string message)
+ {
+ return new NotNullConstraintViolationException(r, message);
+ }
+
+ public static NotNullConstraintViolationException New(SQLite3.Result r, string message, TableMapping mapping, object obj)
+ {
+ return new NotNullConstraintViolationException(r, message, mapping, obj);
+ }
+
+ public static NotNullConstraintViolationException New(SQLiteException exception, TableMapping mapping, object obj)
+ {
+ return new NotNullConstraintViolationException(exception.Result, exception.Message, mapping, obj);
+ }
+ }
+
+ [Flags]
+ public enum SQLiteOpenFlags
+ {
+ ReadOnly = 1, ReadWrite = 2, Create = 4,
+ NoMutex = 0x8000, FullMutex = 0x10000,
+ SharedCache = 0x20000, PrivateCache = 0x40000,
+ ProtectionComplete = 0x00100000,
+ ProtectionCompleteUnlessOpen = 0x00200000,
+ ProtectionCompleteUntilFirstUserAuthentication = 0x00300000,
+ ProtectionNone = 0x00400000
+ }
+
+ [Flags]
+ public enum CreateFlags
+ {
+ None = 0,
+ ImplicitPK = 1, // create a primary key for field called 'Id' (Orm.ImplicitPkName)
+ ImplicitIndex = 2, // create an index for fields ending in 'Id' (Orm.ImplicitIndexSuffix)
+ AllImplicit = 3, // do both above
+
+ AutoIncPK = 4 // force PK field to be auto inc
+ }
+
+ ///
+ /// Represents an open connection to a SQLite database.
+ ///
+ public partial class SQLiteConnection : IDisposable
+ {
+ private bool _open;
+ private TimeSpan _busyTimeout;
+ private Dictionary _mappings = null;
+ private Dictionary _tables = null;
+ private System.Diagnostics.Stopwatch _sw;
+ private long _elapsedMilliseconds = 0;
+
+ private int _transactionDepth = 0;
+ private Random _rand = new Random();
+
+ public Sqlite3DatabaseHandle Handle { get; private set; }
+ internal static readonly Sqlite3DatabaseHandle NullHandle = default(Sqlite3DatabaseHandle);
+
+ public string DatabasePath { get; private set; }
+
+ public bool TimeExecution { get; set; }
+
+ public bool Trace { get; set; }
+
+ public bool StoreDateTimeAsTicks { get; private set; }
+
+ ///
+ /// Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
+ ///
+ ///
+ /// Specifies the path to the database file.
+ ///
+ ///
+ /// Specifies whether to store DateTime properties as ticks (true) or strings (false). You
+ /// absolutely do want to store them as Ticks in all new projects. The default of false is
+ /// only here for backwards compatibility. There is a *significant* speed advantage, with no
+ /// down sides, when setting storeDateTimeAsTicks = true.
+ ///
+ public SQLiteConnection(string databasePath, bool storeDateTimeAsTicks = false)
+ : this(databasePath, SQLiteOpenFlags.ReadWrite | SQLiteOpenFlags.Create, storeDateTimeAsTicks)
+ {
+ }
+
+ ///
+ /// Constructs a new SQLiteConnection and opens a SQLite database specified by databasePath.
+ ///
+ ///
+ /// Specifies the path to the database file.
+ ///
+ ///
+ /// Specifies whether to store DateTime properties as ticks (true) or strings (false). You
+ /// absolutely do want to store them as Ticks in all new projects. The default of false is
+ /// only here for backwards compatibility. There is a *significant* speed advantage, with no
+ /// down sides, when setting storeDateTimeAsTicks = true.
+ ///
+ public SQLiteConnection(string databasePath, SQLiteOpenFlags openFlags, bool storeDateTimeAsTicks = false)
+ {
+ if (string.IsNullOrEmpty(databasePath))
+ throw new ArgumentException("Must be specified", "databasePath");
+
+ DatabasePath = databasePath;
+
+#if NETFX_CORE
+ SQLite3.SetDirectory(/*temp directory type*/2, Windows.Storage.ApplicationData.Current.TemporaryFolder.Path);
+#endif
+
+ Sqlite3DatabaseHandle handle;
+
+#if SILVERLIGHT || USE_CSHARP_SQLITE
+ var r = SQLite3.Open (databasePath, out handle, (int)openFlags, IntPtr.Zero);
+#else
+ // open using the byte[]
+ // in the case where the path may include Unicode
+ // force open to using UTF-8 using sqlite3_open_v2
+ var databasePathAsBytes = GetNullTerminatedUtf8(DatabasePath);
+ var r = SQLite3.Open(databasePathAsBytes, out handle, (int)openFlags, IntPtr.Zero);
+#endif
+
+ Handle = handle;
+ if (r != SQLite3.Result.OK)
+ {
+ throw SQLiteException.New(r, String.Format("Could not open database file: {0} ({1})", DatabasePath, r));
+ }
+ _open = true;
+
+ StoreDateTimeAsTicks = storeDateTimeAsTicks;
+
+ BusyTimeout = TimeSpan.FromSeconds(0.1);
+ }
+
+ static SQLiteConnection()
+ {
+ if (_preserveDuringLinkMagic)
+ {
+ var ti = new ColumnInfo();
+ ti.Name = "magic";
+ }
+ }
+
+ public void EnableLoadExtension(int onoff)
+ {
+ SQLite3.Result r = SQLite3.EnableLoadExtension(Handle, onoff);
+ if (r != SQLite3.Result.OK)
+ {
+ string msg = SQLite3.GetErrmsg(Handle);
+ throw SQLiteException.New(r, msg);
+ }
+ }
+
+ static byte[] GetNullTerminatedUtf8(string s)
+ {
+ var utf8Length = System.Text.Encoding.UTF8.GetByteCount(s);
+ var bytes = new byte[utf8Length + 1];
+ utf8Length = System.Text.Encoding.UTF8.GetBytes(s, 0, s.Length, bytes, 0);
+ return bytes;
+ }
+
+ ///
+ /// Used to list some code that we want the MonoTouch linker
+ /// to see, but that we never want to actually execute.
+ ///
+#pragma warning disable 0649
+ static bool _preserveDuringLinkMagic;
+#pragma warning restore 0649
+
+ ///
+ /// Sets a busy handler to sleep the specified amount of time when a table is locked.
+ /// The handler will sleep multiple times until a total time of has accumulated.
+ ///
+ public TimeSpan BusyTimeout
+ {
+ get { return _busyTimeout; }
+ set
+ {
+ _busyTimeout = value;
+ if (Handle != NullHandle)
+ {
+ SQLite3.BusyTimeout(Handle, (int)_busyTimeout.TotalMilliseconds);
+ }
+ }
+ }
+
+ ///
+ /// Returns the mappings from types to tables that the connection
+ /// currently understands.
+ ///
+ public IEnumerable TableMappings
+ {
+ get
+ {
+ return _tables != null ? _tables.Values : Enumerable.Empty();
+ }
+ }
+
+ ///
+ /// Retrieves the mapping that is automatically generated for the given type.
+ ///
+ ///
+ /// The type whose mapping to the database is returned.
+ ///
+ ///
+ /// Optional flags allowing implicit PK and indexes based on naming conventions
+ ///
+ ///
+ /// The mapping represents the schema of the columns of the database and contains
+ /// methods to set and get properties of objects.
+ ///
+ public TableMapping GetMapping(Type type, CreateFlags createFlags = CreateFlags.None)
+ {
+ if (_mappings == null)
+ {
+ _mappings = new Dictionary();
+ }
+ TableMapping map;
+ if (!_mappings.TryGetValue(type.FullName, out map))
+ {
+ map = new TableMapping(type, createFlags);
+ _mappings[type.FullName] = map;
+ }
+ return map;
+ }
+
+ ///
+ /// Retrieves the mapping that is automatically generated for the given type.
+ ///
+ ///
+ /// The mapping represents the schema of the columns of the database and contains
+ /// methods to set and get properties of objects.
+ ///
+ public TableMapping GetMapping()
+ {
+ return GetMapping(typeof(T));
+ }
+
+ private struct IndexedColumn
+ {
+ public int Order;
+ public string ColumnName;
+ }
+
+ private struct IndexInfo
+ {
+ public string IndexName;
+ public string TableName;
+ public bool Unique;
+ public List Columns;
+ }
+
+ ///
+ /// Executes a "drop table" on the database. This is non-recoverable.
+ ///
+ public int DropTable()
+ {
+ var map = GetMapping(typeof(T));
+
+ var query = string.Format("drop table if exists \"{0}\"", map.TableName);
+
+ return Execute(query);
+ }
+
+ ///
+ /// Executes a "create table if not exists" on the database. It also
+ /// creates any specified indexes on the columns of the table. It uses
+ /// a schema automatically generated from the specified type. You can
+ /// later access this schema by calling GetMapping.
+ ///
+ ///
+ /// The number of entries added to the database schema.
+ ///
+ public int CreateTable(CreateFlags createFlags = CreateFlags.None)
+ {
+ return CreateTable(typeof(T), createFlags);
+ }
+
+ ///
+ /// Executes a "create table if not exists" on the database. It also
+ /// creates any specified indexes on the columns of the table. It uses
+ /// a schema automatically generated from the specified type. You can
+ /// later access this schema by calling GetMapping.
+ ///
+ /// Type to reflect to a database table.
+ /// Optional flags allowing implicit PK and indexes based on naming conventions.
+ ///
+ /// The number of entries added to the database schema.
+ ///
+ public int CreateTable(Type ty, CreateFlags createFlags = CreateFlags.None)
+ {
+ if (_tables == null)
+ {
+ _tables = new Dictionary();
+ }
+ TableMapping map;
+ if (!_tables.TryGetValue(ty.FullName, out map))
+ {
+ map = GetMapping(ty, createFlags);
+ _tables.Add(ty.FullName, map);
+ }
+ var query = "create table if not exists \"" + map.TableName + "\"(\n";
+
+ var decls = map.Columns.Select(p => Orm.SqlDecl(p, StoreDateTimeAsTicks));
+ var decl = string.Join(",\n", decls.ToArray());
+ query += decl;
+ query += ")";
+
+ var count = Execute(query);
+
+ if (count == 0)
+ { //Possible bug: This always seems to return 0?
+ // Table already exists, migrate it
+ MigrateTable(map);
+ }
+
+ var indexes = new Dictionary();
+ foreach (var c in map.Columns)
+ {
+ foreach (var i in c.Indices)
+ {
+ var iname = i.Name ?? map.TableName + "_" + c.Name;
+ IndexInfo iinfo;
+ if (!indexes.TryGetValue(iname, out iinfo))
+ {
+ iinfo = new IndexInfo
+ {
+ IndexName = iname,
+ TableName = map.TableName,
+ Unique = i.Unique,
+ Columns = new List()
+ };
+ indexes.Add(iname, iinfo);
+ }
+
+ if (i.Unique != iinfo.Unique)
+ throw new Exception("All the columns in an index must have the same value for their Unique property");
+
+ iinfo.Columns.Add(new IndexedColumn
+ {
+ Order = i.Order,
+ ColumnName = c.Name
+ });
+ }
+ }
+
+ foreach (var indexName in indexes.Keys)
+ {
+ var index = indexes[indexName];
+ var columns = index.Columns.OrderBy(i => i.Order).Select(i => i.ColumnName).ToArray();
+ count += CreateIndex(indexName, index.TableName, columns, index.Unique);
+ }
+
+ return count;
+ }
+
+ ///
+ /// Creates an index for the specified table and columns.
+ ///
+ /// Name of the index to create
+ /// Name of the database table
+ /// An array of column names to index
+ /// Whether the index should be unique
+ public int CreateIndex(string indexName, string tableName, string[] columnNames, bool unique = false)
+ {
+ const string sqlFormat = "create {2} index if not exists \"{3}\" on \"{0}\"(\"{1}\")";
+ var sql = String.Format(sqlFormat, tableName, string.Join("\", \"", columnNames), unique ? "unique" : "", indexName);
+ return Execute(sql);
+ }
+
+ ///
+ /// Creates an index for the specified table and column.
+ ///
+ /// Name of the index to create
+ /// Name of the database table
+ /// Name of the column to index
+ /// Whether the index should be unique
+ public int CreateIndex(string indexName, string tableName, string columnName, bool unique = false)
+ {
+ return CreateIndex(indexName, tableName, new string[] { columnName }, unique);
+ }
+
+ ///
+ /// Creates an index for the specified table and column.
+ ///
+ /// Name of the database table
+ /// Name of the column to index
+ /// Whether the index should be unique
+ public int CreateIndex(string tableName, string columnName, bool unique = false)
+ {
+ return CreateIndex(tableName + "_" + columnName, tableName, columnName, unique);
+ }
+
+ ///
+ /// Creates an index for the specified table and columns.
+ ///
+ /// Name of the database table
+ /// An array of column names to index
+ /// Whether the index should be unique
+ public int CreateIndex(string tableName, string[] columnNames, bool unique = false)
+ {
+ return CreateIndex(tableName + "_" + string.Join("_", columnNames), tableName, columnNames, unique);
+ }
+
+ ///
+ /// Creates an index for the specified object property.
+ /// e.g. CreateIndex(c => c.Name);
+ ///
+ /// Type to reflect to a database table.
+ /// Property to index
+ /// Whether the index should be unique
+ public void CreateIndex(Expression> property, bool unique = false)
+ {
+ MemberExpression mx;
+ if (property.Body.NodeType == ExpressionType.Convert)
+ {
+ mx = ((UnaryExpression)property.Body).Operand as MemberExpression;
+ }
+ else
+ {
+ mx = (property.Body as MemberExpression);
+ }
+ var propertyInfo = mx.Member as PropertyInfo;
+ if (propertyInfo == null)
+ {
+ throw new ArgumentException("The lambda expression 'property' should point to a valid Property");
+ }
+
+ var propName = propertyInfo.Name;
+
+ var map = GetMapping();
+ var colName = map.FindColumnWithPropertyName(propName).Name;
+
+ CreateIndex(map.TableName, colName, unique);
+ }
+
+ public class ColumnInfo
+ {
+ // public int cid { get; set; }
+
+ [Column("name")]
+ public string Name { get; set; }
+
+ // [Column ("type")]
+ // public string ColumnType { get; set; }
+
+ public int notnull { get; set; }
+
+ // public string dflt_value { get; set; }
+
+ // public int pk { get; set; }
+
+ public override string ToString()
+ {
+ return Name;
+ }
+ }
+
+ public List GetTableInfo(string tableName)
+ {
+ var query = "pragma table_info(\"" + tableName + "\")";
+ return Query(query);
+ }
+
+ void MigrateTable(TableMapping map)
+ {
+ var existingCols = GetTableInfo(map.TableName);
+
+ var toBeAdded = new List();
+
+ foreach (var p in map.Columns)
+ {
+ var found = false;
+ foreach (var c in existingCols)
+ {
+ found = (string.Compare(p.Name, c.Name, StringComparison.OrdinalIgnoreCase) == 0);
+ if (found)
+ break;
+ }
+ if (!found)
+ {
+ toBeAdded.Add(p);
+ }
+ }
+
+ foreach (var p in toBeAdded)
+ {
+ var addCol = "alter table \"" + map.TableName + "\" add column " + Orm.SqlDecl(p, StoreDateTimeAsTicks);
+ Execute(addCol);
+ }
+ }
+
+ ///
+ /// Creates a new SQLiteCommand. Can be overridden to provide a sub-class.
+ ///
+ ///
+ protected virtual SQLiteCommand NewCommand()
+ {
+ return new SQLiteCommand(this);
+ }
+
+ ///
+ /// Creates a new SQLiteCommand given the command text with arguments. Place a '?'
+ /// in the command text for each of the arguments.
+ ///
+ ///
+ /// The fully escaped SQL.
+ ///
+ ///
+ /// Arguments to substitute for the occurences of '?' in the command text.
+ ///
+ ///
+ /// A
+ ///
+ public SQLiteCommand CreateCommand(string cmdText, params object[] ps)
+ {
+ if (!_open)
+ throw SQLiteException.New(SQLite3.Result.Error, "Cannot create commands from unopened database");
+
+ var cmd = NewCommand();
+ cmd.CommandText = cmdText;
+ foreach (var o in ps)
+ {
+ cmd.Bind(o);
+ }
+ return cmd;
+ }
+
+ ///
+ /// Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?'
+ /// in the command text for each of the arguments and then executes that command.
+ /// Use this method instead of Query when you don't expect rows back. Such cases include
+ /// INSERTs, UPDATEs, and DELETEs.
+ /// You can set the Trace or TimeExecution properties of the connection
+ /// to profile execution.
+ ///
+ ///
+ /// The fully escaped SQL.
+ ///
+ ///
+ /// Arguments to substitute for the occurences of '?' in the query.
+ ///
+ ///
+ /// The number of rows modified in the database as a result of this execution.
+ ///
+ public int Execute(string query, params object[] args)
+ {
+ var cmd = CreateCommand(query, args);
+
+ if (TimeExecution)
+ {
+ if (_sw == null)
+ {
+ _sw = new Stopwatch();
+ }
+ _sw.Reset();
+ _sw.Start();
+ }
+
+ var r = cmd.ExecuteNonQuery();
+
+ if (TimeExecution)
+ {
+ _sw.Stop();
+ _elapsedMilliseconds += _sw.ElapsedMilliseconds;
+ Debug.WriteLine(string.Format("Finished in {0} ms ({1:0.0} s total)", _sw.ElapsedMilliseconds, _elapsedMilliseconds / 1000.0));
+ }
+
+ return r;
+ }
+
+ public T ExecuteScalar(string query, params object[] args)
+ {
+ var cmd = CreateCommand(query, args);
+
+ if (TimeExecution)
+ {
+ if (_sw == null)
+ {
+ _sw = new Stopwatch();
+ }
+ _sw.Reset();
+ _sw.Start();
+ }
+
+ var r = cmd.ExecuteScalar();
+
+ if (TimeExecution)
+ {
+ _sw.Stop();
+ _elapsedMilliseconds += _sw.ElapsedMilliseconds;
+ Debug.WriteLine(string.Format("Finished in {0} ms ({1:0.0} s total)", _sw.ElapsedMilliseconds, _elapsedMilliseconds / 1000.0));
+ }
+
+ return r;
+ }
+
+ ///
+ /// Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?'
+ /// in the command text for each of the arguments and then executes that command.
+ /// It returns each row of the result using the mapping automatically generated for
+ /// the given type.
+ ///
+ ///
+ /// The fully escaped SQL.
+ ///
+ ///
+ /// Arguments to substitute for the occurences of '?' in the query.
+ ///
+ ///
+ /// An enumerable with one result for each row returned by the query.
+ ///
+ public List Query(string query, params object[] args) where T : new()
+ {
+ var cmd = CreateCommand(query, args);
+ return cmd.ExecuteQuery();
+ }
+
+ ///
+ /// Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?'
+ /// in the command text for each of the arguments and then executes that command.
+ /// It returns each row of the result using the mapping automatically generated for
+ /// the given type.
+ ///
+ ///
+ /// The fully escaped SQL.
+ ///
+ ///
+ /// Arguments to substitute for the occurences of '?' in the query.
+ ///
+ ///
+ /// An enumerable with one result for each row returned by the query.
+ /// The enumerator will call sqlite3_step on each call to MoveNext, so the database
+ /// connection must remain open for the lifetime of the enumerator.
+ ///
+ public IEnumerable DeferredQuery(string query, params object[] args) where T : new()
+ {
+ var cmd = CreateCommand(query, args);
+ return cmd.ExecuteDeferredQuery();
+ }
+
+ ///
+ /// Creates a SQLiteCommand given the command text (SQL) with arguments. Place a '?'
+ /// in the command text for each of the arguments and then executes that command.
+ /// It returns each row of the result using the specified mapping. This function is
+ /// only used by libraries in order to query the database via introspection. It is
+ /// normally not used.
+ ///
+ ///
+ /// A to use to convert the resulting rows
+ /// into objects.
+ ///
+ ///
+ /// The fully escaped SQL.
+ ///
+ ///
+ /// Arguments to substitute for the occurences of '?' in the query.
+ ///
+ ///
+ /// An enumerable with one result for each row returned by the query.
+ ///
+ public List