[TASK] Initial commit with basic product setup

This commit is contained in:
2019-08-18 13:50:14 +02:00
commit 01a66a8e1f
2548 changed files with 167528 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
using System;
using System.Collections.Generic;
using Mapbox.Map;
using Mapbox.Utils;
using UnityEngine;
namespace Mapbox.Unity.Map.Interfaces
{
public interface IMap : IMapReadable, IMapWritable, IUnifiedMap { }
public interface IMapReadable
{
Vector2d CenterMercator { get; }
float WorldRelativeScale { get; }
Vector2d CenterLatitudeLongitude { get; }
/// <summary>
/// Gets the zoom value of the map.
/// This allows for zoom values in between actual zoom level "AbsoluteZoom" requested from the service.
/// </summary>
float Zoom { get; }
/// <summary>
/// Gets the zoom value at which the map was intialized.
/// </summary>
int InitialZoom { get; }
/// <summary>
/// Gets the zoom value at which the tiles will be requested from the service.
/// Use this only for calls which require an integer value of zoom to be passed in.
/// </summary>
int AbsoluteZoom { get; }
Transform Root { get; }
float UnityTileSize { get; }
Texture2D LoadingTexture { get; }
Material TileMaterial { get; }
HashSet<UnwrappedTileId> CurrentExtent { get; }
event Action OnInitialized;
event Action OnUpdated;
Vector2d WorldToGeoPosition(Vector3 realworldPoint);
Vector3 GeoToWorldPosition(Vector2d latitudeLongitude, bool queryHeight = true);
}
public interface IMapWritable
{
void SetCenterMercator(Vector2d centerMercator);
void SetCenterLatitudeLongitude(Vector2d centerLatitudeLongitude);
void SetZoom(float zoom);
void SetWorldRelativeScale(float scale);
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: d5a989744ad8746e5bc533ee230d00c6
timeCreated: 1494990683
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,7 @@
namespace Mapbox.Unity.Map.Interfaces
{
public interface IMapPlacementStrategy
{
void SetUpPlacement(AbstractMap map);
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: aa6c9ee2f3b546dc9df96694c85e82c5
timeCreated: 1538658253

View File

@@ -0,0 +1,7 @@
namespace Mapbox.Unity.Map.Interfaces
{
public interface IMapScalingStrategy
{
void SetUpScaling(AbstractMap map);
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: a3d0db333c6d474aa152ccac7439e444
timeCreated: 1538658226

View File

@@ -0,0 +1,42 @@
using System;
using Mapbox.Map;
using Mapbox.Unity.Map.TileProviders;
namespace Mapbox.Unity.Map.Interfaces
{
public interface ITileProvider
{
event EventHandler<ExtentArgs> ExtentChanged;
ITileProviderOptions Options { get; }
// TODO: add cancel event?
// Alternatively, give mapvisualizer an object recycling strategy that can separately determine when to change gameobjects.
// This removal would essentially lead to a cancel request and nothing more.
void Initialize(IMap map);
// TODO: Maybe combine both these methods.
void SetOptions(ITileProviderOptions options);
// TODO: add reset/clear method?
}
public interface IUnifiedTileProvider
{
event Action<UnwrappedTileId> OnTileAdded;
event Action<UnwrappedTileId> OnTileRemoved;
// TODO: add cancel event?
// Alternatively, give mapvisualizer an object recycling strategy that can separately determine when to change gameobjects.
// This removal would essentially lead to a cancel request and nothing more.
void Initialize(IUnifiedMap map);
// TODO: add reset/clear method?
}
public class TileStateChangedEventArgs : EventArgs
{
public UnwrappedTileId TileId;
}
}

View File

@@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 21517bafda8f54be39ccf7c230b76f9c
timeCreated: 1494606252
licenseType: Pro
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@@ -0,0 +1,11 @@
using Mapbox.Utils;
namespace Mapbox.Unity.Map.Interfaces
{
public interface IUnifiedMap
{
//void InitializeMap(MapOptions options);
void UpdateMap(Vector2d latLon, float zoom);
void ResetMap();
}
}

View File

@@ -0,0 +1,3 @@
fileFormatVersion: 2
guid: be115c5fdb26480791b43d27c2bc1bfb
timeCreated: 1538657911