Questions tagged [mapbox-gl-js]

WebGL based Javascript library that renders Mapbox Vector Tiles in the browser. Not to be confused with Mapbox.js (older, Leaflet based library) or Mapbox-GL (collective term for several similar SDKs, including Android and iOS specific libraries).

A Javascript library that renders interactive maps, particularly using Mapbox Vector Tiles, using WebGL. It also supports GeoJSON, traditional raster tiles, static images and video. Mapbox-GL-JS is open source, and actively developed by Mapbox, as part of a suite of mapping APIs, including Android and iOS SDKs, and routing and geoocoding APIs.


Resources :

  1. The official documentation
  2. Mapbox Style Specification
  3. Visual Map Designer for Mapbox - [maputnik/editor]
  4. Map tile server for Mapbox GL JS - [klokantech/tileserver-gl]
  5. GitHub
2528 questions
0
votes
1 answer

How to store the coordinates from a mapbox geocoder search?

Im trying to add a circle around a location after you search on mapbox. The built-in mapbox geocoder doesn't let you handle the response by default and I can't find any documentation on how to do this. I was hoping to add the search result to a…
tearisha
  • 71
  • 10
0
votes
0 answers

Popup not appear on MapBox

Help please, i`m not understande why i`m not see popup next to mark on map, i have selectedMarker state and state have coordinates and title, but when i click on mark i don`t see popup with title. import Map, {Marker, Popup} from…
0
votes
0 answers

Mapbox GL JS: add custom style layer and resize the map without resizing the canvas

Looking at this jsfiddle sample (available in this post). I have created a map and added an image using a custom style layer so everything is within the same WebGL Canvas: Now I would like to resize the map but keeping the full-screen canvas…
Forna
  • 81
  • 1
  • 8
0
votes
0 answers

queryRenderedFeatures doesnt work when i tried to get point data from map (mapbox)

I need to do something like that: example source That is, when the user clicks at the accident point, they should see data about the accident, as a card of the accident that occurred (type ant other info from geojson file) But my features from my…
0
votes
1 answer

SetLayoutProperty is 'undefined' despite previous checks

I have an issue in a mapboxgl js project. I am trying to display a heatmap and change it to a simple circle layer when the zoom is high enough. Despite checks i get this : Uncaught TypeError: Cannot read properties of undefined (reading…
q_bmn
  • 1
0
votes
1 answer

Mapbox GL JS, change POIs size

I'd like to know if there is a way to change POIs size (schools, restaurants, ...) . I'm using Mapbox GL v2.8.2 On the documentation I only found about layers, but I'm not sure the "native" POIs are related to layers. Thanks
Shojikama
  • 23
  • 5
0
votes
1 answer

Using Mapbox Javascript SDK to import external geojson file

I'm trying to use Mapbox Static API through their Javascript SDK. I want to upload an external geojson source to my map. I can't figure out a way to do it. I tried following a Mapbox tutorial called Using style parameters with Static Images…
Zaynaib Giwa
  • 5,366
  • 7
  • 21
  • 26
0
votes
1 answer

Mapbox Style - why does my simple case expression not work?

I try to style my Mapbox layer using a case expression. My expression is quite simple and should for different integer ranges set different colors. Although doing the same as provided in examples, it must contain an error, and all lines are only…
Robbert
  • 109
  • 5
0
votes
0 answers

How can I rotate the map so that a mailbox marker is always visible using terrain mode?

I am plotting locations using mapbox GL JS and but when switching to 3D terrain the marker is sometimes behind a hill. This is signified by the marker appearing slightly more transparent. I was wondering if there was a way to automatically position…
TangoMike
  • 75
  • 7
0
votes
0 answers

how to change marker size when map is zoomed in I am using Mapbox GL (React native)

I need to change the marker size depending on the camera zoom level. Now the marker size is fixed, how could I fix this?
Dexik
  • 1
0
votes
0 answers

Is there an option/method available to restrict mapboxgl directions setting origin/destination on map click

Need to toggle mapboxgl directions and based on its value the origin/destination should be set.
Renjith JR
  • 189
  • 1
  • 3
  • 14
0
votes
0 answers

Loading custom MapBox GL JS tile source generated with Python tornado async RequestHandler

I created custom tile source provider with python running tornado web server. On the server I generate on the fly the specific tile and output it as a "image/png" header format. To prevent blocking I did all the server stuff in async mode. Now I see…
toni
  • 361
  • 7
  • 19
0
votes
0 answers

Ripple issue when I give box shadow inset value

I'm trying to do the Mapbox design. There is a fog on the globe in Mapbox. I use "box shadow inset" for the same effect. But because I give high value, there are various fluctuations. My Try; enter image description here The effect I use to give the…
user21151330
0
votes
0 answers

Mapbox supercluster throws error when trying to zoom a cluster

I use supercluster to display clusters on mabox with react-map-gl. If I click on a cluster, it doesn't zoom in as expected, but the above error is thrown. Does anyone know why or has the same problem solved? Uncaught TypeError: Cannot read…
Captai-N
  • 1,124
  • 3
  • 15
  • 26
0
votes
0 answers

Mapbox problem with creating PopUp for each cluster/marker with dynamic data

I have a problem where I am fetching my data from my API using WordPress. I have multiple clusters/markers on my map. But I am not able to create for each location a PopUp marker with the data coming from the API. I am facing some scoping issue…
Galanthus
  • 1,958
  • 3
  • 14
  • 35