Relative Content

Tag Archive for mapbox-gl-js

How to retain text symbols on linestrings at low zoom?

I have some very high resolution contour lines generated from topographic data which is in the form of GeoJSON MultiLineStrings. I upload and create a vector tile using Mapbox Tile Service Tilesets CLI and add the source and layer to a map as shown below.

Is there a way I can flyTo a coordinate but rotate the map to ensure the marker is visible and not behind a hill?

I am using mapbox gl js, which has an intended behaviour of ‘dimming’ a marker if a direct view is obstructed by 3D terrain. I would like to know if there is a calculation I can make to position the camera so that the marker is always directly visible. There are pitch and bearing options with the flyTo command so technically possible if the correct values can be somehow calculated.

Mapbox – Error: There is already a source with this ID

All of a sudden I am geting this error with mapbox gl js: Error: There is already a source with this ID. The app has been working fine but today this error occured. How can I find what ID and what source? Not much detail in the error.