Skip to content

Commit f3ff431

Browse files
authored
Release/v1.4.1 (#682)
* Fix to properly show Mesh & GO modifiers in the UI * Add UI for removing/combining filters * Break classes into separate files, remove MapAPI wrapper. UnifiedMap takes over the functionality. Fix bug with filters * Add new prefabs for LocationBasedGame and CitySim * Fixes loadingPanel script to work with UnifiedMap * Trigger finished state when no vector layer is turned off. * Fix mapId for Satellite & satellite-streets * update PR template * Update UI to match design - round 1 * Add new data containers * Enable loading external configurations - take 2 (#552) * carry over changes from #352 to latest develop * Fix the merge typo. * Integrate mapbox-ar-unity (#544) * add ARCore, ARKit, UnityARInterface * Mapbox AR code and examples * add KalmanFilter * some updated metas * fix .gitignore to not ignore parts of ARCore * add AR prefabs * fix .gitignore for .metas from temp files from docs generation * add additional properties to `Location` * add helper class for onscreen console * [wip] integrate AR * more logging for caching * MBTilesCache: Windows fix for path and filenames with +260 chars * add some logging to AbstractMap.cs * add editorconfig * debug messages around telem lib initialization * ARTableTop: test in Vienna * ProjectSettings: enable AR on Android * remove Debug messages * fix typo in TelemetryAndroid.cs file name * add layers needed for AR demo to the project settings * fix Unity's byte stripping for .Net 4.6 and IL2CPP * throw out uncessary stuff that comes with UnityARInterface and ARCore * update readme, add AR readme. * update CHANGELOG * wip integrate ar * Throw away unused ARKit stuff. * Update prefabs & scene * Add defaults options + linewidth parameter. * Add mockup for Presets UI * Adding tooltips for General, Image & Terrain sections. * Fix extra space in Terrain UI. * [WIP] Remove old map files, rename UnifiedMap to AbstractMap - working towards clean merge. * [WIP] Replace old VectorTileFactory with refactored ( VectorTileFactoryNew gets renamed) * add kalman comment * appveyor: don't use PowerShell to download docfx * Fix typo in terrain source. * New textures/materials for default building style * Merge StyleOptimizedVectorTileFactory functionality into VectorTileFactory * Updated settings to TextureSideWall * VectorLayerVisualizer refactor. * Hookup node editor with Plug & play refactor. * Add tooltips for vector section. * Add missing changes to VectorTIle.cs * add QueryTerrainHeight function to AbstractMap (#571) Looks good. * try with GPS position/heading, ignoring AR and bias * Fix compile error related to return type. (#572) minor change. * Added a API call to query height Added a API call on AbstractMap to query height at a certain latitude longitude. * Add preset defaults switching + snapMaptoZero hookup. * Changes to MapEditor. * Add code comments for LatitudeLongitudeToTileId change. (#573) * Fix compile error related to return type. * update code comments * Layer Visualizer for Building Ids (#502) * change VectorFeatureUnity and VectorLayerVisualizer classes to support buildings ids and do not render duplicates of same featuer from different tiles * add comments for an if clause in VectorFeatureUnity * Uv mapping (#503) * add uv mapping height modifier and a demo scene to show it off * fix TextureSideWallModifier to respect min_height property * fix a bug in wall segment calculation in TextureSideWallModifier where CenterSegment feature yielded long first sections fix a bug in PolygonModifier where it doesn't create tangents fix wrong asset bindings * fix an issue where TextureSideWallModifier doesn't take atlas section height into consideration * add a 8 building texture atlas * add new texture from random google images * fix a bug where bottomOfMidUv was calculated wrong * Fix formatting. * Add atlas texturing modifier into Plug & play UI. * Remove presets from map * work on DeviceLocationProvider, AutomaticSyncScene: size of player shows hdop, remove some debug statements * Add parameters to hookup Globe terrain factory. * Mapbox styles - MapboxStyles shader for layer colorization, AtlasTemplateGenerator for creating template images from AtlasInfo files, various scripts for assisting with building colorization. * Set defaults for all properties * Add API calls for layers * Renamed AddColorizeMapboxStyles.cs to MapboxStylesColorModifier.cs to better match existing nomenclature. Refactored MapboxStylesColorModifier.cs: Run method no longer adds ColorizeMapboxStyles.cs monobehaviour to VectorEntity.GameObject; Run method now includes all logic for color selection and material property setting previously found in ColorizeMapboxStyles.cs; utilizes VectorEntity's cached MeshRenderer component to set colors. Deleted ColorizeMapboxStyles.cs and ColorizeMapboxStylesEditor.cs. * Add custom option to primitive type - for fully custom modifier stack. * Hook up scriptable palette with P&P * Add code comments to Abstract Map. * Cleanup unused stuff. * Fixed private field naming to meet code style requirements. * Fix indentation * Adds ability to add custom tile providers. * more checks if access token is set (#564) * Style development - colorization and atlas template generator (#579) * add uv mapping height modifier and a demo scene to show it off * fix TextureSideWallModifier to respect min_height property * fix a bug in wall segment calculation in TextureSideWallModifier where CenterSegment feature yielded long first sections fix a bug in PolygonModifier where it doesn't create tangents fix wrong asset bindings * fix an issue where TextureSideWallModifier doesn't take atlas section height into consideration * change VectorFeatureUnity and VectorLayerVisualizer classes to support buildings ids and do not render duplicates of same featuer from different tiles * add comments for an if clause in VectorFeatureUnity * add a 8 building texture atlas * add new texture from random google images * add roof uv & atlas support * test textures for styling development * add missing constant Vector3Right * fix materials in mat modifier * fix atlas info object * Removed unused properties from shader * New textures/materials for default building style * Updated settings to TextureSideWall * Mapbox styles - MapboxStyles shader for layer colorization, AtlasTemplateGenerator for creating template images from AtlasInfo files, various scripts for assisting with building colorization. * Renamed AddColorizeMapboxStyles.cs to MapboxStylesColorModifier.cs to better match existing nomenclature. Refactored MapboxStylesColorModifier.cs: Run method no longer adds ColorizeMapboxStyles.cs monobehaviour to VectorEntity.GameObject; Run method now includes all logic for color selection and material property setting previously found in ColorizeMapboxStyles.cs; utilizes VectorEntity's cached MeshRenderer component to set colors. Deleted ColorizeMapboxStyles.cs and ColorizeMapboxStylesEditor.cs. * Fixed private field naming to meet code style requirements. * Fix indentation * log GPS timestamp once more * Cleanup + update prefabs & UI. * Fixes atlas textures bug, UI bug and creates city sim prefab with textured buildings. * Add building Id tileset as default, fix minor issues. * Update map prefab with default style * Fix to trigger finished state on VectorTileFactory. * Add loading texture, build locationProvider example , fix bug with imagery init. * Update Camera script to work with new map, LocationBasedGame prefab uses camerabounds by default. * Code cleanup - move drawers into their own files. * Code Cleanup. Arrange files into folders. * Foldouts don't forget what they were told to do ;) * Fixed null ref error on MapboxStylesColorModifier; class now null checks m_scriptablePalette on Initialize and Run, and returns if object is null. Cleanup up names in Scriptable Palette Editor to make inspector look slightly cleaner. * Update ARTabletop scene. * updated Clip/Box shader (#580) * updated shader * fix indentation * fixed indent * Recreate ZoomableMap and Globe with new Plug and Play functionality (#585) * created clip shaders for stylized map * Fix errors from meta files. * Add TabletopARkit prefab. * fix missing tangents bug. * Set Relative height = false as default. * Fix issue with final state not being triggered when image factory was disabled. * add UniAndroidPermission * DeviceLocationProvider: request runtime location permissions on Android * add class to open settings for app on Android * update AutoSyncScene * fix AutoSyncScene and WorldAlignmentKit prefab * increase desired accuracy * increase desired accuracy * hopefully getting there * Prefab block for configuration window * update worldalignmentprefab * Merge explorer and interactive styled map examples. * images updated * layout, changelog link * Update WorldAlignmentKit prefab + fix reload script to use "update" function. * ar example scene names * Updated `Explorer` scene. * Updated worlsAlignmentKit * Updated working AR scene. * Fix double map initialize issue. * remove extra example scenes * fix merge conflict: PropertyDrawers.meta * prefab body text * update TabletopAR image * Possible fix for worldScale AR * Add namespace for ObjectPool + change Awake to start in Position with LocationProvider * WIP manual sync AR scene * fix broken WorldAlignmentKit.prefab after merge * make debug paths thicker * Add missing namespaces. * Missing namespace. * Manual World Alignment scene and prefab * fix broken meta file * Update scenes. * Update version to 1.4.0 * Scene cleanup - delete old examples * Fix wrong unwrapped tile id * Possible fix for Configuration window `NullReference` * remove Android pre-build checks for duplicate libraries (#574) * WorldAlignmentKit prefab: remove layer 'Map' from culling mask of Main Camera * move UniAndroidPermission to PlugIns folder * add sub-assets in scenelists via editor (#586) * Moved editor files to Assets/Mapbox/Unity/Editor * Delete moved files - Atlas Generator & scriptable Palette UI * Added Mapbox.Editor namespace, converted spaces to tabs. * Fix compile errors related to meta files. * Cleanup tooltip text. * Fix Warnings. * Update scenes. * Cleanup warnings - pass 2. * Cleanup warnings pass 3. * Update ScenesList.cs * Fix typecast error on filters + filter Pois labels based on localRank. * Add Update method to RangeTileProvider. * Update PathHelpers.cs * Change explorer to Data Explorer, clean unused assets. * fix duplicate buildings in WorldScaleAR-ManualAlignment * silence remaining warnings * Fix screenshot name for explorer, add initialization to elevationLayerProperties as a defensive fix. * Fix typo * Fix build error, turn vector layer off for Globe example, Add build settings. * Config window 1.4 (#587) * add sub-assets in scenelists via editor * assign default value to MapboxConfiguration's token status * Change camera for city simulator scene. * fix RasterTileExample * fix VoxelMap * Fix finished status not getting fired event for globe example. * silence another warning and remove unused using * make TileErrorHandler work with new AbstractMap * Fixes for RC3 * Renamed TabletopARKit prefab to ARTableTop * Turn off initializeOnStart for LocationBasedGame prefab. * Defensive fix for crash on iOS. * Fix for missing features - Add property in vectorsublayerproperties to clip features at tile boundary. * Change scene & prefab with clip at tile boundary setting. * Fix NRE's on inspectors for scriptable objects in sharedmodules. * Remove new from LocationProvider prefab name in LocationBasedGame prefab * Asset file cleanup * Trigger finished status for tiles that error out. * Fix flat terrain factory editor. * remove inital wait for GPS on DeviceLocationProvider start. Implement 'IsLocationServiceEnabled' property on 'Location' and send one Location event when location services are not enabled or failed to start in time. * Fix issue with prefab modifier where removing the `IFeaturePropertySettable` was not setting transforms for prefabs. * Make Modifiers & map selectable from node editor, change mismatching button style. * add 'IsLocationServiceInitializing' to 'Location.cs'. Expose that info in the LocationBasedGame scene * Add all layers from explorer v130 example (most layers turned off) * Make foldouts static. * Update scenelist. * move misplaced `link.xml` into MapboxAR subfolder * Remove interaction from DataExplorer scene, Added a new scene for interaction. * Turn buildings on in Data Explorer :) * Scale the canvas to fit the screen. * Change zoomSpeed = 0, merge building layers. * Update formatting of playground scenes, enable camera for data explorer. * Tweaks to scenes for performance & formatting. * Finally turn on the camera movement script on DataExplorer * Fix scaling in y for map & unity tile. Add script to keep camera above terrain for zoomable map. * Update buildingswithUniqueIds property. * Add prerequisite info for AR scenes. * work around crashes on iOS with escaped characters in the URL * Fix height data query. * Add missing using UnityEngine. * Update example descriptions * Disable SetCameraHeight script + add method to query height in unity units. * Update zoomable map scene to not have setCameraHeight * Remove replacing text with latlong for geocode response. * Fix formatting * Remove DirectionsQuery * Update project version * Add event system to CitySimulator scene + filter mouse events on search UI. * Format main scene UI. * another fix for URL encoding for iOS * Update changelog * Make filter values case - insensitive. (#632) * Make filter values case - insensitive. * Add checks to remove white spaces & empty entries. * Actually fix the issue :( * Fix tile position issue with vector features. Remove option when features are grouped. (#629) * Change file folder names (#635) * Remove folder with bad name. * Change name of folder to MapboxStyles instead of MapBoxStyles * Fix range height extrusion (#613) * Fix range height extrusion mesh generation. * Add extrusion scale factor to multiply height values when extruding geometry. * Update Changelog. * Add missing tooltips. * Don't clip min height for RangeHeight Extrusion option. * Add warning if max height is less than min height. Also, add error message and swap values in code * Collider Dropdown in Abstract Map for adding colliders on top of extruded geometry (#637) * wip * Geometry options drawer modified * collider options added * changed order of the collider options * dots * tooltips added * adding changes to tooltips * Playmode tests (#628) * [wip] PlayMode tests * playmode tests: try with copying files via MapboxDev menu * remove external test project * rename test files to follow naming convention * swtich from FileUtil.Copy/Delete to AssetDatabase.Copy/Delete * fix directions tests * try custom global MAPBOX_PLAYMODE_TESTS define in msc.rsp * remove mcs.rsp * change access modifiers on Directions, Geocoder and TileResource to make them available in EditorMode tests * enable more tests for PlayMode tests * some fixes for OSX and iOS * disbale Request.Cancel test for iOS and Android as results are not cosistent * HACK: workaround to make ForwardGeocode tests pass on iOS * more iOS fixing * add feature collections and kdtree collection (#565) * add feature collections and kdtree collection * Add namespaces to new files. * change InteractiveStyledVectorMap.unity to include a feature collection and query script * change scene objects * add missing highlight buildings script * Remove duplicate file * Updated changelog. * Ui fixes (#643) * Fix foldouts not retaining states between play mode & editor. * Don't allow empty names for layer visualizers. * Add defaults for all sublayer properties to not carry over any options from the previous layer. * Add missing tooltips. * Fix indentation. * Update tooltip for Extent Type. * Add tooltips for prefix labels for dropdowns. * Change `Style Name` to `Data Source` * Fix typo in colorPalette. * Selected newly created layer visualizer. * Update scenes with missing ScriptablePalette. * Update tooltip for min/max height extrusion. * Updated scene. * Update tooltip of sampleCount * Update scene after merge with develop * Fix scene, indentation for collider type. * Update scene with collider options. * [publish docs] (#652) * Add camera table top ar (#614) * Change RangeAroundTransformTile Provider to use the new API. * Add sample camera script for pan & zoom . * Update scene to use the new camera script. * Add reposition tile logic to RangeAroundTransformTileProvider. * Add method to click and get latlong under the mouse. * Added relative panning from camera * removed unnecessary line of code * Quick fix for panning speed * Clean up script and scene. * Update Changelog * Fix satellite imagery on roof not working. (#638) * Fix satellite imagery on roof not working. * Remove commented code. * Update changelog * Disable buildingsWithUniqueIds setting for MapboxStreets data source. (#655) * Added workaround to prevent users from accidentally turning on filtering for MapboxStreets building. * Update changelog * Disable InitializeOnStart when `InitializeWithLocationProvider` is used. (#656) * Disable initialize on start for AR cases. * Add check to make sure map is initialized before updating tiles. * Updated changelog * Updated manual synchornization example scene (#636) * updated manual synchornization example scene * Update TouchCamera.cs Uncommented line at 38. * added hint text to ManualSyncScene * fixed namespaces & moved scripts to new folder * updated scene & made a new manual aligment prefab * added namespace to UpdateMapPosByARPlaneY.cs * Changed map update to correct method. * Update ProjectSettings. * Updated version number +scenelist * Update scene to show ObjectInspector panel again. * fix a bug in LayerPropertyIsEqualFilterComparer (#662) * fix a bug in LayerPropertyIsEqualFilterComparer where it does <= instead of == (fixes #660) * Simplified expression. * Fix incorrect editor culture handling on some locales (#658) (#659) Geocode coordinates are now converted with InvariantCulture, which makes sure they do not depend on the locale of the computer being used. * Set scaleFactor = 1 in property drawer. (#665) * Fix custom mapid (#666) * Fix custom mapId being overridden by empty string. * Add missing reference * removed error messages from manual touch script (#667) * Fix scaling for world scale when zoom level was changed. (#668) * Update worldscale AR scene - fix ARDelta not registering. * fix a bug where SpawnInsideModifier getting stuck in infinite loop (#676) * fix a bug where SpawnInsideModifier getting stuck in infinite loop * Update changelog * Remove duplicate scene. * Make internal method private. * Update Image settings to use retina & mip map * Add BuildingsWithUniqueIds checkbox back. * Update changelog & license. * Update scene.
1 parent db24680 commit f3ff431

File tree

197 files changed

+5697
-6300
lines changed

Some content is hidden

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

197 files changed

+5697
-6300
lines changed

LICENSE

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,4 +92,31 @@ Unless required by applicable law or agreed to in writing, software
9292
distributed under the License is distributed on an "AS IS" BASIS,
9393
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
9494
See the License for the specific language governing permissions and
95-
limitations under the License.
95+
limitations under the License.
96+
97+
============================================================================
98+
99+
Contains a portion of kd-sharp for C#
100+
https://github.com/acgessler/kd-sharp
101+
102+
The MIT License (MIT)
103+
104+
Copyright (c) 2013, Original Committers
105+
106+
Permission is hereby granted, free of charge, to any person obtaining a copy
107+
of this software and associated documentation files (the "Software"), to deal
108+
in the Software without restriction, including without limitation the rights
109+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
110+
copies of the Software, and to permit persons to whom the Software is
111+
furnished to do so, subject to the following conditions:
112+
113+
The above copyright notice and this permission notice shall be included in
114+
all copies or substantial portions of the Software.
115+
116+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
117+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
118+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
119+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
120+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
121+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
122+
THE SOFTWARE.

documentation/docs/05-changelog.md

Lines changed: 36 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,47 @@
11
## CHANGELOG
2+
### v.1.4.1
3+
*04/17/2018*
4+
5+
##### New Features
6+
- Add two new modules, KdTreeCollection and AddToCollection Gameobject modifier.
7+
- Add Collider option for vector features.
8+
- Add scale factor for extrusion value derived from feature property.
9+
- Add camera script with zoom & pan support for TabletopAR scene.
10+
11+
##### Bug Fixes
12+
- Remove `buildingsWithUniqueIds` setting for `Mapbox Streets` data source.
13+
- Change `Style Name` to `Data Source`
14+
- Fix to make filter values case insensitive.
15+
- Fix issue where position vector features was not being set.
16+
- Fix `Range Property` extrusion option for vector features.
17+
- Select newly created layer visualizer.
18+
- Fix typo in colorPalette.
19+
- Add defaults for all sublayer properties to not carry over any options from the previous layer.
20+
- Don't allow empty names for layer visualizers.
21+
- Fix foldouts not retaining states between play mode & editor.
22+
- Add missing tooltips.
23+
- Fix issue with Satellite TextureType.
24+
- Added a check to prevent NRE on tile update because map was not initialized.
25+
- Added method to disable `InitializeOnStart` in the `Initialize With Location Provider` script.
26+
- Fix loop counter in `SpawnInsidePrefabModifier` which was causing an infinite loop.
227

328
### v.1.4.0
429
*03/20/2018*
530

631
#####
7-
- Drag and drop prefabs for most common use cases.
32+
- Drag and drop prefabs for most common use cases.
833
- New Abstract Map UI
9-
- Style development - colorization and atlas template generator
34+
- Style development - colorization and atlas template generator
1035
- Use texture atlas for building geometries.
11-
- Merge buildings with unique ids using the experimental 3D buildings tileset.
36+
- Merge buildings with unique ids using the experimental 3D buildings tileset.
1237
- Added a API call on AbstractMap to query height at a certain latitude longitude.
1338
- Included EditorConfig file to enforce coding style
1439
- Integration of previously seperate AR support https://github.com/mapbox/mapbox-unity-sdk/pull/544
1540

1641
### v.1.3.0
1742
*12/18/2017*
1843

19-
##### Upgrade Instructions
44+
##### Upgrade Instructions
2045
- As always, if you already have a project with a previous version of the SDK, please remove older versions before installing this new one!
2146
- `FeatureBehaviour` is no longer added to feature gameobjects by default. Use a `FeatureBehaviourModifier` to add this component (optimization).
2247
- `TextureModifier` is obsolete. Please use `MaterialModifier`.
@@ -31,7 +56,7 @@
3156

3257
##### New Features
3358
- Added convenience methods to `AbstractMap` to convert between Lat/Lon ↔ Vector3. This also works for maps that have been translated, rotated, or scaled! #387
34-
- Added tile error exception events that you can hook into to know when specific tiles fail to load. We provide an example `TileErrorHandler` object that logs these to console.
59+
- Added tile error exception events that you can hook into to know when specific tiles fail to load. We provide an example `TileErrorHandler` object that logs these to console.
3560
- Added C# wrapper for Mapbox Token API (to validate tokens).
3661
- Added transparency shader for raster tiles—this enables you to convert black to alpha from Mapbox studio styles (to render just road labels, for example).
3762
- Added new `LoftModifier`—use this to make complex geometry from line features.
@@ -43,7 +68,7 @@
4368
##### Bug Fixes
4469
- It should now be safe to nest the Mapbox folder (SDK) in your own projects.
4570
- You can now properly change/load scenes at runtime. #381
46-
- Fixed token validation issues (validate token when initializing `MapboxAccess`). #430
71+
- Fixed token validation issues (validate token when initializing `MapboxAccess`). #430
4772
- Custom inspectors now properly serialize assets assigned via built-in object browser.
4873
- Fix for certain tile providers not updating properly when re-initializing a map.
4974
- Fixed issue where clipped features would result in several new features. #398
@@ -67,7 +92,7 @@
6792
- Array support to mock a specific route (`LocationArrayEditorLocationProvider`).
6893
- Transform support on `EditorLocationProvider` to create simple offsets.
6994
- Use Unity Remote app to send location updates directly to the Unity editor from your device!
70-
- `DynamicZoom` example has been improved, see new `Zoomable` map example.
95+
- `DynamicZoom` example has been improved, see new `Zoomable` map example.
7196
- Added string to lat/lon conversion method.
7297
- Various nodes in the map factory framework now have public fields to support run-time styling or modification before map generation (based on settings, for example).
7398
- Maps now support float values for zoom level—you can use this to inform camera controllers, for example.
@@ -214,7 +239,7 @@
214239
- Elevation textures are no longer held in memory and height data parsing and access is much faster
215240
- Added new `FlatTerrainFactory` that is optimized specifically for flat maps
216241
- Tiles can now be cached in memory—configure the cache size in `MapboxAccess.cs` (default size is 500)
217-
- Slippy maps now dispose tiles that determined to be "out of range"
242+
- Slippy maps now dispose tiles that determined to be "out of range"
218243
- Tiles that are out of range before completion are properly cancelled
219244
- Terrain generation in Unity 5.5+ should be much faster and allocate less memory
220245

@@ -256,12 +281,12 @@
256281
- Fixed issue where visualizers for `MeshFactories` were not being serialized properly
257282
- Fixed null reference exception when creating a new `MeshFactory`
258283

259-
### v0.5.0
284+
### v0.5.0
260285

261286
*04/26/2017*
262287

263-
- Added support for UWP
264-
- Share your Hololens creations with us!
288+
- Added support for UWP
289+
- Share your Hololens creations with us!
265290
- Fixed precision issue with tile conversions
266291
- Replaced `Geocoordinate` with `Vector2d`
267292
- Mapbox API Token is now stored in MapboxAccess.txt

sdkproject/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor/CheapRulerCsTests.cs renamed to sdkproject/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor/MapboxUnitTests_CheapRulerCs.cs

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//-----------------------------------------------------------------------
1+
//-----------------------------------------------------------------------
22
// <copyright file="FileSourceTest.cs" company="Mapbox">
33
// Copyright (c) 2016 Mapbox. All rights reserved.
44
// </copyright>
@@ -10,20 +10,14 @@ namespace Mapbox.CheapRulerCs.UnitTest
1010
{
1111

1212

13-
using Mapbox.Platform;
1413
using NUnit.Framework;
1514
using System.Collections.Generic;
16-
using System.Globalization;
17-
using System.IO;
18-
using System.Text;
19-
using System;
20-
using System.Linq;
2115
using UnityEngine;
2216
using Mapbox.CheapRulerCs;
2317
using Mapbox.Json.Linq;
2418

2519
[TestFixture]
26-
internal class ProbeExtractorCsTest
20+
internal class CheapRulerCsTest
2721
{
2822

2923

@@ -67,11 +61,8 @@ public void DistanceInMiles()
6761

6862
private List<line> loadFixtures()
6963
{
70-
string fixturePath = Application.dataPath + "/Mapbox/Core/cheap-ruler-cs/Tests/Editor/lines.json";
71-
string fixtureAsText;
72-
using (TextReader tw = new StreamReader(fixturePath, Encoding.UTF8)) { fixtureAsText = tw.ReadToEnd(); }
73-
74-
var json = JArray.Parse(fixtureAsText);
64+
TextAsset fixturesAsset = Resources.Load<TextAsset>("ChearRulerCs_fixtures");
65+
var json = JArray.Parse(fixturesAsset.text);
7566
List<line> fixtures = new List<line>();
7667

7768
foreach (var line in json)
@@ -91,4 +82,4 @@ private List<line> loadFixtures()
9182

9283

9384
}
94-
}
85+
}

sdkproject/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor/CheapRulerCsTests.cs.meta renamed to sdkproject/Assets/Mapbox/Core/cheap-ruler-cs/Tests/Editor/MapboxUnitTests_CheapRulerCs.cs.meta

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sdkproject/Assets/Mapbox/Core/mapbox-sdk-cs/Directions/Directions.cs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,15 @@ public IAsyncRequest Query(DirectionResource direction, Action<DirectionsRespons
5555
/// </summary>
5656
/// <param name="str">JSON String.</param>
5757
/// <returns>A <see cref="DirectionsResponse"/>.</returns>
58-
internal DirectionsResponse Deserialize(string str)
58+
public DirectionsResponse Deserialize(string str)
5959
{
6060
return JsonConvert.DeserializeObject<DirectionsResponse>(str, JsonConverters.Converters);
6161
}
62+
63+
public string Serialize(DirectionsResponse response)
64+
{
65+
return JsonConvert.SerializeObject(response, JsonConverters.Converters);
66+
}
67+
6268
}
6369
}

sdkproject/Assets/Mapbox/Core/mapbox-sdk-cs/Geocoding/Geocoder.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ public IAsyncRequest Geocode<T>(GeocodeResource<T> geocode, Action<ForwardGeocod
7979
/// <param name="str">JSON String.</param>
8080
/// <returns>A <see cref="GeocodeResponse"/>.</returns>
8181
/// <typeparam name="T">Forward or reverse geocode. </typeparam>
82-
internal T Deserialize<T>(string str)
82+
public T Deserialize<T>(string str)
8383
{
8484
return JsonConvert.DeserializeObject<T>(str, JsonConverters.Converters);
8585
}

sdkproject/Assets/Mapbox/Core/mapbox-sdk-cs/Map/TileResource.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ namespace Mapbox.Map
99
using System;
1010
using Mapbox.Unity.Telemetry;
1111

12-
internal sealed class TileResource : IResource
12+
public sealed class TileResource : IResource
1313
{
1414
readonly string _query;
1515

@@ -65,7 +65,8 @@ public string GetUrl()
6565
uriBuilder.Query = TelemetryFactory.EventQuery;
6666
}
6767

68-
return uriBuilder.ToString();
68+
//return uriBuilder.ToString();
69+
return uriBuilder.Uri.ToString();
6970
}
7071
}
7172
}

sdkproject/Assets/Mapbox/Core/mapbox-sdk-cs/Tests/UnitTests/Editor/DirectionsTest.cs

Lines changed: 0 additions & 64 deletions
This file was deleted.

0 commit comments

Comments
 (0)