How to use a tileset Id of Mapbox in a layer inside mapboxgl? - layer

I have a tileset in my mapbox studio with its correspondent tilesetID.
Is there a way to use this tileset as a layer inside mapboxgl, I mean in a map.addLayer situation?

Related

React Native Maps renders 2 background layers - blurred effect

I have a React Native application that contains a (react-native-maps) mapview with several different polylines and polygons created from http request data. The problem is that the map renders the background twice as you can see in the attached picture. This second layer is always a bit larger and more out of focus than the actual layer (the polygon/lines match with coordinaates on the clear defined layer). Im wondering how this second background came to be and how to prevent it from rendering.
Kind regards
Are you saying, that without providing an you are getting two layers?
Otherwise, when you use a different provider, for a layer and want to hide the layer provided by google, You should set mapType to "none".

HERE Maps REST API - rotation of tile labels

I'm using REST API provided by HERE Maps to display a map inside an application. As I'm not using any SDKs provided by HERE, I'm forced to fetch map tiles and render them using react-native-maps (custom tiles).
<UrlTile urlTemplate={...} />
What I'm getting is this:
current behaviour on rotate
regular (north up) view
Basically, all of the labels don't rotate on map rotation, and that makes them hard to read. Is there any possible way to handle tile rotation using only REST API?
Tile REST API doesn't support rotation. You may try to investigate the possibility of implementing rotation in react-native-maps.

Gradient slider in React Native?

Is it possible to implement slider with static gradient track in React Native using any 3rd party library or what-soever?
Illustrative image from Google:
Right now I'm using sldier from #react-native-community/slider, but it doesn't seem to support gradient slider track? I can customize minimumTrackTintColor and maximumTrackTintColor, but I would like to have static gradient track independent of the indicator position. I have looked into other 3rd party slider libraries as well, but encountered the same problem.
So, is there any way in any library to achieve this in React Native?
I dont think any package upfront gives this functionality, but you can always use linear-gradient. this library, make a view with. gradient like that, and on top of that, by using position:'relative' make a cursor and slide it by using rn-draggable . You will need to work out on that, but you can create a new functionality , and maybe publish it so that it can be used by others in future.
Hopeit helps.feel free for doubts
Inspired from what #Gaurav_Roy answered above, in the end, I achieved what I wanted with react-native-gesture-responder . I positioned my custom gradient slider track and slider dot as images and used createResponder from the library to capture user interactions with the slider dot. Then calculated the distance between dot position and track edges to get the value.

Add a new layer below labels for deck.gl

It is probably very easy but I couldn't find how to add a new layer below the labels for deck.gl which uses Mapbox GL JS under the hood. For mapbox gl it is explained here.
I searched their docs also for z-index or picking the label layer from the vector tiles source but without success so far.
As of June 2018 there is no simple solution.
To anyone stumble upon this question in 2022, you might want to have a look at the Mapbox Deck.gl submodule which will help you achieve this behaviour.
Here is the documentation: https://deck.gl/docs/api-reference/mapbox/overview

TMX: Only 1 tilset per layer is supported

i am take two layer Background and Cloud and in background i put background image and cloud layer i put cloud image and both TMX add to my project and when run i got error TMX: Only 1 tilset per layer is supported but only one layer use it run successfully..
Code:
CCTMXTiledMap *TiledFirst = [CCTMXTiledMap tiledMapWithTMXFile:#"BackgroundTiled.tmx"];
[self addChild:TiledFirst];
CCTMXTiledMap *Clould = [CCTMXTiledMap tiledMapWithTMXFile:#"Clould.tmx"];
[self addChild:Clould];
Cocos2d only supports one tileset per layer. This error occurs as soon as you add one tile (even a completely transparent one) from another tileset onto the same layer. Since there's no easy way to identify these tiles in Tiled and your map still being simple the easiest fix is to delete and re-add both layers, then make sure you add only tiles of one tileset to either layer.
PS: both KoboldTouch and Kobold Kit do not have this restriction.