Skip to main content
Search type Search syntax
Tags [tag]
Exact "words here"
Author user:1234
user:me (yours)
Score score:3 (3+)
score:0 (none)
Answers answers:3 (3+)
answers:0 (none)
isaccepted:yes
hasaccepted:no
inquestion:1234
Views views:250
Code code:"if (foo != bar)"
Sections title:apples
body:"apples oranges"
URL url:"*.example.com"
Saves in:saves
Status closed:yes
duplicate:no
migrated:no
wiki:no
Types is:question
is:answer
Exclude -[tag]
-apples
For more details on advanced search visit our help page
Results tagged with
Search options answers only not deleted user 105333

A client-side framework for rendering web maps with implementations on native platforms utilizing OpenGL.

1 vote

Mapbox GL / separation of style and data

You could join local JSON data with vector tile geometries: Here is a Mapbox example which shows how to achieve this: https://www.mapbox.com/mapbox-gl-js/example/data-join/
pathmapper's user avatar
  • 2,005
1 vote
Accepted

Filtering layers displayed on map only for point layers, lineString layers or polygon layers...

You could get all layers of a style with var layers = map.getStyle().layers and then filter depending on the layer type (e.g. symbol, line, fill). Here's an official example which shows how to find t …
pathmapper's user avatar
  • 2,005
12 votes

How to test if a layer exist in a MapBox GL JS map?

From: https://github.com/mapbox/mapbox-gl-js/issues/4466#issuecomment-288177042 To safely remove a layer that may or may not exist, guard the call to removeLayer with getLayer: // Always remove the …
pathmapper's user avatar
  • 2,005
2 votes
Accepted

Mapbox GL JS - toggling 2 layers

You implemented the toggle on/off functionality right. Your layer is not visible, because the alpha channel (which specifies the opacity for a color) of fill-color and fill-outline-color is 0. Settin …
pathmapper's user avatar
  • 2,005
1 vote
Accepted

Mapbox GL JS Toggle Layers default to "off"

Additionally to what you've done replacing link.className = 'active'; with link.className = '';, you need to set 'visibility': 'none' for both layers when adding them to the map: Example: http …
pathmapper's user avatar
  • 2,005
5 votes
Accepted

Set border width and color in Mapbox GL

For a layer of type: fill: Border color could be set with the paint property fill-outline-color. For the border width you'll need to use an additional layer, see: https://stackoverflow.com/questions …
pathmapper's user avatar
  • 2,005
14 votes
Accepted

How to add CSS styling in Mapbox GL Popup?

I've read this and several posts on SE, which pointed me in the right direction Your link is pointing to the docs about mapbox.js which is different from mapbox-gl.js. Docs for Mapbox GL JS: htt …
pathmapper's user avatar
  • 2,005