Code Monkey home page Code Monkey logo

Comments (14)

derekdominoes avatar derekdominoes commented on August 21, 2024 1

Thank you David. I was able to get it working by creating a MeshFactory with my MapId from the TileSet and it has a Visualizer with my TileSet's Keyname. I can now see the polygon from the imported shape file along with properties from the shapes.
I even have GameObjectModifier working.
Nice architecture!

from mapbox-unity-sdk.

wilhelmberg avatar wilhelmberg commented on August 21, 2024

@derekdominoes Could you double check the access token?

from mapbox-unity-sdk.

derekdominoes avatar derekdominoes commented on August 21, 2024

Yes, It is taken from the "Develop with the style" section and validated in the Unity Editor when I added it from the menu.

from mapbox-unity-sdk.

wilhelmberg avatar wilhelmberg commented on August 21, 2024

@derekdominoes are you still using 0.4 of the SDK?
We had a bug when a requested tile did not exist that could cause that error, but that should be fixed with current versions.
Either unitypackage 0.5.1 or develop branch directly from here.

from mapbox-unity-sdk.

derekdominoes avatar derekdominoes commented on August 21, 2024

v0.5.1-beta
I'll help you debug any way I can?

from mapbox-unity-sdk.

derekdominoes avatar derekdominoes commented on August 21, 2024

Here is the request going across if it helps:
https://api.mapbox.com:443/v4/mapbox:/styles/taitex/cj332db8u00342smdjnu9akqc/14/3401/6200.vector.pbf?access_token=pk.eyJ1IjoidGFpdGV4IiwiYSI6ImNqMnI4NzdjbzAwNjMzM3E4ZDJ1ZGJleHEifQ.W1msqGd3DHBUVx7HHzFS7Q

from mapbox-unity-sdk.

wilhelmberg avatar wilhelmberg commented on August 21, 2024

@derekdominoes thanks for the request.
The problem is as expected, if you open the URL in a browser you get Not Found.
So the response should never get to VectorTileReader.
I thought the fix was already in 0.5.1

Let me check the code ...

from mapbox-unity-sdk.

david-rhodes avatar david-rhodes commented on August 21, 2024

@derekdominoes I'm a bit confused. Are you trying to render the custom tileset in a raster tile, or extract raw data from the vector tile generated from your tileset? It sounds like you are trying to use a style URL for the mesh factory, and that will not work.

If you are trying to use vector tiles, the layer name is the name of the tileset and the MapId should start with your mapbox studio username.

If you want to use raster tiles, then you need to put your style url in the MapImageFactory, instead.

from mapbox-unity-sdk.

derekdominoes avatar derekdominoes commented on August 21, 2024

I didn't open it in a browser. I just grabbed the path out of the HTTPRequest.cs so you may be able to try it. The request returns a byte[] that is given to VectorTileReader.
I suspect I don't have it configured correctly. I put things in the only places I could find proper fields for. I can't find documentation on this whole custom layer process and how to configure the components in the Unity Inspector.
I have vector data from a shp file I want to see in my Unity app using the MapBox Unity SDK. I've imported the shp file data into MapBox Studio. It seems the only way to get it delivered to me is to add it to a Style and publish the style. Inside the TerrainDemoMeshFactory in the Inspector, I added the uri from MapBox Studio starting with "MapBox:/styles..." as the MapId. The "key" for the visualizer is the name of the imported tileset.
At your suggestion, I removed the everything before my username from the MapId so that it is sending: https://api.mapbox.com:443/v4/taitex/cj332db8u00342smdjnu9akqc/14/3401/6200.vector.pbf?access_token=pk.eyJ1IjoidGFpdGV4IiwiYSI6ImNqMnI4NzdjbzAwNjMzM3E4ZDJ1ZGJleHEifQ.W1msqGd3DHBUVx7HHzFS7Q but the error still occurs.

from mapbox-unity-sdk.

david-rhodes avatar david-rhodes commented on August 21, 2024

@derekdominoes Do you want images or raw data for your visualization? If you want raw data, you cannot use a style url--you need to get the Map Id from the tileset itself (it does not need to live in a style). You can find this in the tileset editor in Mapbox Studio.

If you want images, paste that style url into the image factory--not the mesh factory! Your URL should look like this: https://api.mapbox.com/styles/v1/taitex/cj332db8u00342smdjnu9akqc/tiles/14/3401/6200?access_token=pk.eyJ1IjoidGFpdGV4IiwiYSI6ImNqMnI4NzdjbzAwNjMzM3E4ZDJ1ZGJleHEifQ.W1msqGd3DHBUVx7HHzFS7Q.

I recommend you scrub your personal token and get a new one so nobody steals this.

from mapbox-unity-sdk.

david-rhodes avatar david-rhodes commented on August 21, 2024

@derekdominoes Glad it worked for you!

from mapbox-unity-sdk.

richabwt avatar richabwt commented on August 21, 2024

hey is there anybody to help i am getting little confused in integrating mapbox-unity-sdk_v1.4.0 in unity 2017.3.1f1 as i know mapbox-unity-sdk_v1.4.0 is the latest version but i can't find vector tile factory in mapbox and also maptype in image factory of mapbox so please let me know is these option is removed from the latest version

from mapbox-unity-sdk.

abhishektrip avatar abhishektrip commented on August 21, 2024

@richabwt vectortilefactory is setup using the Vector section under AbstractMap inspector. Maptype is now Style Name under Image section

from mapbox-unity-sdk.

richabwt avatar richabwt commented on August 21, 2024

@atripathi-mb Thanku for your reply i find it but i didn't find any integration link of latest version mapbox sdk in unity please help me out.

from mapbox-unity-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.