Is there a way to spawn a GameObject in every neighbourhood listed in Mapbox? - unity3d

I'm working on a geolocation-based game, currently using MapBox API, we need to spawn a GameObject in every neighbourhood, MapBox have a script to spawn in map when the user is closer enough to a spot, the problem is, i have to put all the coordinates manually, and that is just impossible because of the number of neighborhoods in the world.
Edit: MapBox is a Geolocation service for real-time mapping. It's a SDK for Unity. all configuration is in-editor, so no revelant scripts to show off. My problem is to spawn in every neighbourhood, this kinds of tags already exists inside Mapbox API, but i have no clue how to use
Edit 2: Im trying to make it search automatic for an neighbourhood, and so put an gameobject there whatever he claims to be a neighbourhood.
Is there a smarter way to spawn that? Like a instruction to spawn in determinated places that im missing?
I'll leave some links to MapBox here.
API playground (here you can see how the api works):
Link
API reference (if it helps somehow, doesn't helped me yet):
Link
Add markers tutorial:
Link

Related

How to build a route from an array of coordinates in "flutter" using "Mapbox"

I am new to mobile development and have set myself the goal of creating an application that will follow me, the scenario is as follows, I launch the application, press a button and after that the longitude and latitude coordinates of my current location are sent to the server every 5 seconds, after about an hour- two walks around the city in the database there is an array of coordinates.
Next, in the application that I create on “flutter”, a map of my journey should be displayed. From the forums, I understood that "mapbox" is ideal for visualizing a route with lines between coordinates, but I could not find tutorials on how to do this with an array of coordinates. Please tell me where to learn how to work with this library.
In the official docs, I couldn't figure out what I need to learn. Maybe you know sites with recipes or with ready-made examples of building routes using an array of coordinates? Thank you in advance.
I could not find tutorials on how to do this with an array of coordinates. Please tell me where to learn how to work with this library. In the official docs, I couldn't figure out what I need to learn.

Best Way to approach a 3D customisable Globe in Flutter?

following question:
I'm currently working on a Travel App and I thought of the idea of implementing an 3D Globe that can be rotated by the user. I thought of the Globe as a basic White Sphere with the borders of the countries visible as a stroke. All countries that have been visited should be filled with a color.
I thought of implementing it with the unity widget, but I'd like to maintain a lightweight feeling.
Is there a way to emulate js or WebGL?
What do you think is the best way to approach this?
Thank you for your time
Linus
You can use webview_flutter, I played with it a little bit to display planet models in javascript library three.js. Thanks to it you can use it like standard js instance of it with only one drawback that I didn't try to solve: I was unable to run it in browser mode as Flutter needs to emulate js itself by platform speciffic way. There is option to load js/html code from local assets but then you will not be able to load models in js directly as you will face cors policy restrictions, then the only way is to pass models as json from flutter code. It works pretty well, supports two way communication between js and flutter so you can also add events to model etc.

What happened to this Mapbox Tile image?

So I'm attempting to get Mapbox working with my Leaflet implementation (using React Leaflet), and my spidey sense is telling me something is off.
The URL:
https://api.mapbox.com/v4/mapbox.mapbox-streets-v8/11/568/825#2x.jpg?access_token=pk.eyJ1IjoiamFtaWxsZXI2MTkiLCJhIjoiY2t3Y3JnbG5uMzZ2MzJ1bmhyaHhpczJpcCJ9.3X8OkNioN_C8CN15YPmDDQ
Note: I created the access_token used above for this SO question, and will be deleted soon. So the link may not work when you see this, which is why I used SO's handy dandy image upload!
I assume this has something to do with how the tile coordinates and/or zoom is being calculated, but really, I don't have a damn clue in the world.
Using mapbox.mapbox-streets-v4 as the tileset_id produces results that are better, but still bad. I haven't yet been able to load a stylesheet either...
What gives?
As it turns out I was correct in my hunch that it had something to do with how the tiles were being generated by Leaflet. And while I'll probably never know the specific reasons behind it, I was able to solve it. The secret sauce ended up being mapbox-gl-leaflet.
I threw together a super simple example on Code Sandbox showing the successful implementation of Mapbox tiles as a React component within React Leaflet. It's pretty snazzy, IMO, even if you have to import a few hundred different packages (doubly if using TS) to make it all work 😕
https://codesandbox.io/s/sharp-payne-m3hll
NOTE: To see the codesandbox link working, you'll need to supply your own Mapbox API key. The API key from above won't work (even if it was still valid, which it may or may not be depending on how much I care to do anything about it...)
The mapbox.mapbox-streets-v11 tileset from Mapbox is originally intended to be used as vector data, e.g. with Mapbox Vector Tiles API : https://docs.mapbox.com/help/glossary/vector-tiles-api/
The only difference with your URL is the requested format mvt (instead of jpg). And no #2x resolution modifier.
What may be confusing is that the vector tilesets can also be requested as raster, by specifying a raster format like jpg or png through Mapbox Raster Tiles API https://docs.mapbox.com/help/glossary/raster-tiles-api/.
Mapbox server then generates an image from the vector data. But in the case of the streets tileset, it has a lot of data in hand, and it renders all of it, making it appear messed up.
Mapbox provides 5 default tilesets (https://docs.mapbox.com/studio-manual/reference/tilesets/), some of them are raster only (typically Satellite mapbox.satellite) while others are originally vector, but can also be generated as raster (Streets, Terrain, Terrain-RGB/elevation, Traffic).
Unfortunately Leaflet does not handle vector data built-in. If you really need to use vector data, you have to use plugins like Leaflet.VectorGrid or Mapbox GL Leaflet, or another switch to another mapping library.

unity3d nft marker how to make

Helo Guys,
I've ran into a very deep trouble within a very long time of googling havent found answers. so here it is.
i'm trying to make Augmented Reality without any commercial plugins i have to pay for (vuforia) in unity3d, this program i will send to android.
i've messing around with vuforia, kudan, and other, but i want more power with my apps i can control myself.
i want to make nft marker based augmented reality, i've tried artoolkit, but the explanation and samples only get into generating .fset .iset .fset3 file but it stopped there, no info about generating the .patt file needed nor info about where to put those dataset files.
i've tried using openspace3d, but also only generating fset iset file, no .patt file.
my question is : how to generate .patt file, and if i have the dataset file (iset fset fset3) how do i proceed on creating my own custom nft marker augmented reality in unity3d?
I'm afraid you have a slight misconception of marker files for Artoolkit.
Artoolkit knows two types of markers. Patterns and NFT markers.
The pattern (.patt) files are for the so-called framemarkers.
The fset(.iset,.fset,.fset3) files are for the NFT markers. You don't need a pattern file for NFT markers.
For a comprehensive list with examples of AR-Marker you can look here.
So in your case, you only need the fset files.
Training:
For training, you can use the description and the tools from this site and this site. But be warned. Finding good values is a bit of a trial and error.
Usage:
If you haven't already done so, download the Unity package from this page. If you're using windows you can also download the windows tool on the same page.
That package comes with several example scenes. Including TwoNFTMarker. ( under Assets/Artoolkit5-unity/Example Scenes). Open that and look at the ARToolkit Object. In the inspector, you will find two ARMarker scripts with two NFT Markers already configured. To replace the standard NFT Marker with your own you can put your own fset files under Assets/StreamingAssets and restart unity. After that, you should be able to choose your files in the marker script.
That being said. NFT markers work considerably worse than in vuforia and kudan. There is a reason why this a "paid" frameworks.
I hope this helps.

Replace spider with list when multiple icons are at the same location

In Google Earth if I have multiple icons that appear in the same location and you click on it, it results in a spider. I would like to override this with a list instead that stays static until you close it.
How would I go about creating this functionality?
You would have to do your own custom clustering, since Earth doesn't expose to you any information about that spider cluster in the API. You'd want, perhaps, to look at the MarkerClusterer utility library for inspiration, but the code is Maps specific, not Earth.