Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Place labels are broken on mapbox-streets-v8 #1879

Open
KuraiAndras opened this issue Aug 23, 2022 · 2 comments
Open

Place labels are broken on mapbox-streets-v8 #1879

KuraiAndras opened this issue Aug 23, 2022 · 2 comments

Comments

@KuraiAndras
Copy link

  • Unity version: 2022.11.13f1
    • Scripting Backend: mono, IL2CPP
    • Api Compatibility Level: netstandard2.1
  • Mapbox SDK version: 2.1.1, and also the performance branch
  • The platform you're building to: Editor, Windows Standalone, Android, HoloLens, WebGL, iOS
  • A description of what you're trying to do:
  • Steps to recreate the bug if appropriate:
  1. Open the official mapbox examples
  2. Select the ZoomableMap scene
  3. On the Map object in the hiearchy select the mapbox-streets-v8 data source
  4. add a points feature
  5. Select the data layer to be place_label
Unity log
ArgumentException: An item with the same key has already been added. Key: class
System.Collections.Generic.Dictionary`2[TKey,TValue].TryInsert (TKey key, TValue value, System.Collections.Generic.InsertionBehavior behavior) (at <f3aec01a34d14c7080754e28743c8472>:0)
System.Collections.Generic.Dictionary`2[TKey,TValue].Add (TKey key, TValue value) (at <f3aec01a34d14c7080754e28743c8472>:0)
Mapbox.VectorTile.VectorTileFeature.GetProperties () (at <46c2876888ca4405b893cea4e20d647f>:0)
Mapbox.Unity.MeshGeneration.Data.VectorFeatureUnity..ctor (Mapbox.VectorTile.VectorTileFeature feature, System.Collections.Generic.List`1[T] geom, Mapbox.Unity.MeshGeneration.Data.UnityTile tile, System.Single layerExtent, System.Boolean buildingsWithUniqueIds) (at Assets/Mapbox/Unity/MeshGeneration/Data/VectorFeatureUnity.cs:66)
Mapbox.Unity.MeshGeneration.Interfaces.VectorLayerVisualizer.ProcessFeature (System.Int32 index, Mapbox.Unity.MeshGeneration.Data.UnityTile tile, Mapbox.Unity.MeshGeneration.Interfaces.VectorLayerVisualizerProperties layerProperties, System.Single layerExtent) (at Assets/Mapbox/Unity/MeshGeneration/LayerVisualizers/VectorLayerVisualizer.cs:584)
Mapbox.Unity.MeshGeneration.Interfaces.VectorLayerVisualizer+<ProcessLayer>d__37.MoveNext () (at Assets/Mapbox/Unity/MeshGeneration/LayerVisualizers/VectorLayerVisualizer.cs:537)
Mapbox.Unity.Utilities.Runnable+Routine.MoveNext () (at Assets/Mapbox/Unity/Utilities/Runnable.cs:130)
UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) (at <eba5c5b2c6de4af992b2cc99354e483e>:0)
UnityEngine.MonoBehaviour:StartCoroutine(IEnumerator)
Mapbox.Unity.Utilities.Routine:.ctor(IEnumerator) (at Assets/Mapbox/Unity/Utilities/Runnable.cs:116)
Mapbox.Unity.Utilities.Runnable:Run(IEnumerator) (at Assets/Mapbox/Unity/Utilities/Runnable.cs:47)
Mapbox.Unity.MeshGeneration.Interfaces.VectorLayerVisualizer:Create(VectorTileLayer, UnityTile, Action`2) (at Assets/Mapbox/Unity/MeshGeneration/LayerVisualizers/VectorLayerVisualizer.cs:479)
Mapbox.Unity.MeshGeneration.Factories.VectorTileFactory:CreateFeatureWithBuilder(UnityTile, String, LayerVisualizerBase) (at Assets/Mapbox/Unity/MeshGeneration/Factories/VectorTileFactory.cs:457)
Mapbox.Unity.MeshGeneration.Factories.VectorTileFactory:CreateMeshes(UnityTile) (at Assets/Mapbox/Unity/MeshGeneration/Factories/VectorTileFactory.cs:394)
Mapbox.Unity.MeshGeneration.Factories.VectorTileFactory:OnVectorDataRecieved(UnityTile, VectorTile) (at Assets/Mapbox/Unity/MeshGeneration/Factories/VectorTileFactory.cs:341)
<>c__DisplayClass2_0:<FetchData>b__0() (at Assets/Mapbox/Unity/MeshGeneration/Factories/VectorDataFetcher.cs:34)
Mapbox.Map.Tile:HandleTileResponse(Response) (at Assets/Mapbox/Core/mapbox-sdk-cs/Map/Tile.cs:244)
Mapbox.Platform.Cache.CachingWebFileSource:Request(String, Action`1, Int32, CanonicalTileId, String) (at Assets/Mapbox/Core/mapbox-sdk-cs/Platform/Cache/CachingWebFileSource.cs:166)
Mapbox.Unity.MapboxAccess:Request(String, Action`1, Int32, CanonicalTileId, String) (at Assets/Mapbox/Unity/MapboxAccess.cs:234)
Mapbox.Map.Tile:Initialize(IFileSource, CanonicalTileId, String, Action) (at Assets/Mapbox/Core/mapbox-sdk-cs/Map/Tile.cs:144)
VectorDataFetcher:FetchData(DataFetcherParameters) (at Assets/Mapbox/Unity/MeshGeneration/Factories/VectorDataFetcher.cs:21)
Mapbox.Unity.MeshGeneration.Factories.VectorTileFactory:OnRegistered(UnityTile) (at Assets/Mapbox/Unity/MeshGeneration/Factories/VectorTileFactory.cs:210)
Mapbox.Unity.MeshGeneration.Factories.AbstractTileFactory:Register(UnityTile) (at Assets/Mapbox/Unity/MeshGeneration/Factories/AbstractTileFactory.cs:71)
Mapbox.Unity.Map.AbstractMapVisualizer:LoadTile(UnwrappedTileId) (at Assets/Mapbox/Unity/Map/AbstractMapVisualizer.cs:266)
Mapbox.Unity.Map.AbstractMap:TileProvider_OnTileAdded(UnwrappedTileId) (at Assets/Mapbox/Unity/Map/AbstractMap.cs:656)
Mapbox.Unity.Map.AbstractMap:TriggerTileRedrawForExtent(ExtentArgs) (at Assets/Mapbox/Unity/Map/AbstractMap.cs:935)
Mapbox.Unity.Map.AbstractMap:OnMapExtentChanged(Object, ExtentArgs) (at Assets/Mapbox/Unity/Map/AbstractMap.cs:942)
Mapbox.Unity.Map.TileProviders.AbstractTileProvider:OnExtentChanged() (at Assets/Mapbox/Unity/Map/TileProviders/AbstractTileProvider.cs:41)
Mapbox.Unity.Map.TileProviders.QuadTreeTileProvider:UpdateTileExtent() (at Assets/Mapbox/Unity/Map/TileProviders/QuadTreeTileProvider.cs:67)
Mapbox.Unity.Map.AbstractMap:InitializeMap(MapOptions) (at Assets/Mapbox/Unity/Map/AbstractMap.cs:774)
Mapbox.Unity.Map.AbstractMap:SetUpMap() (at Assets/Mapbox/Unity/Map/AbstractMap.cs:651)
Mapbox.Unity.Map.AbstractMap:MapOnStartRoutine(Boolean) (at Assets/Mapbox/Unity/Map/AbstractMap.cs:538)
Mapbox.Unity.Map.AbstractMap:Start() (at Assets/Mapbox/Unity/Map/AbstractMap.cs:500)

We tracked down the bug to be in the vector-tile-cs project which povides the precompiled DLLs in the mapbox plugins folders. I also created an issue there mapbox/vector-tile-cs#47 .
Our current workaround is to replace the DLLs with the source code from github and then implement the fix manually. This works for now, but in the end we needed to implement other workarounds, because of other exceptions happening in the base library.

These features used to work for us, but sometime this summer the place_label feature broke. It also broke in one of our deployed projects which we did not touch since last year.

On another, but somewhat related note, what is the current state of this project's development? We plan on supporting multiple products made with the Mapbox Unity SDK in the future and we already have plans for creating more. In the current state of things we even considered implementing our own SDK for MapBox with C# and Unity because of the current state of the project. We also considered moving the the Google Maps platfrom.

Can you share any plans for the roadmap of this project? Can we count on you to provide support for the SDK in the long run?

@brnkhy
Copy link
Contributor

brnkhy commented Oct 17, 2022

Hey @KuraiAndras
The development on Unity&Mapbox continues but in different paths (so not like v2.2). If you are planning on using Unity SDK I would highly suggest contacting Mapbox sales and let them know your usage and interest.

@KuraiAndras
Copy link
Author

Thanks, we will contact sales

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants