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 23673

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

2 votes

Location is not accurate when replicating an existing feature and zooming in

When you first called queryRenderedFeatures you're getting the coordinates generalised to the zoom level your map was initially at, which as you can see is a bit off the source data coordinates. You' …
AndrewHarvey's user avatar
  • 2,269
16 votes
Accepted

Removing events map.on("click"...) from mapbox gl?

First split out the click function so it can be referenced on it's own: function onClick(e) {...} Then register your on click with: map.on('click', 'clusters', onClick); Then just before you rem …
AndrewHarvey's user avatar
  • 2,269
1 vote

Mapbox GL geocoder autocomplete

https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder-outside-the-map/ <div id='geocoder' class='geocoder'></div> var geocoder = new MapboxGeocoder({ accessToken: mapboxgl.accessToken } …
AndrewHarvey's user avatar
  • 2,269
1 vote
Accepted

Offset a label inside a polygon with mapbox-gl style?

I believe using "text-keep-upright": true is the way to go, the fact that that causes the labels to render on the wrong side of the line, I think is a bug see https://github.com/mapbox/mapbox-gl-js/is …
AndrewHarvey's user avatar
  • 2,269
1 vote

Spatial Query tool for Mapbox

Yes you'll need to build a JavaScript app for this. You can see a similar filter example at https://www.mapbox.com/mapbox-gl-js/example/timeline-animation/, and review the setFilter documentation at h …
AndrewHarvey's user avatar
  • 2,269
4 votes
Accepted

Change dynamically created layer's minZoom after render

Use map.setLayerZoomRange: map.setLayerZoomRange('my-layer', minzoom, maxzoom);
AndrewHarvey's user avatar
  • 2,269
2 votes
Accepted

Mapbox GL JS/Android: Draw User's 3D Vector Layer of Buildings

Check the error console, it explains that 'fill-color': '#088', 'fill-opacity': 0.8 aren't valid paint properties for fill-extrusion layers. See the example at https://docs.mapbox.com/mapbox-gl-j …
AndrewHarvey's user avatar
  • 2,269
1 vote

Geocoding to only reference Tileset using Mapbox GL JS?

Cross posted at https://stackoverflow.com/questions/49114648/mapbox-gl-js-geocoding-to-only-reference-tileset/49119921 The example you linked to shows how to supplement search results with a local so …
AndrewHarvey's user avatar
  • 2,269
1 vote

Making legends for each layers and switching between them using Mapbox GL JS?

https://www.mapbox.com/mapbox.js/api/v3.1.1/l-mapbox-legendcontrol/ is an example for Mapbox.js which is a different library to Mapbox GL JS. I'm afraid building the legend is something you need to b …
AndrewHarvey's user avatar
  • 2,269
0 votes

GZIP geojson files & Mapbox GL JS

Set the Content-Encoding: gzip header on your web server when serving the gzip files. Then the browser will transparently decompress.
AndrewHarvey's user avatar
  • 2,269
3 votes
Accepted

Symbolizing field with many values in Mapbox Studio?

In QGIS you would do this by choosing a color ramp (or random) and hitting Classify, Mapbox Studio doesn't yet offer this feature but in the meantime if you choose the "Edit property as JSON" at the b …
AndrewHarvey's user avatar
  • 2,269
2 votes
Accepted

Get MapBox Marker Coordinates Dynamically

When you select a result from the search, as it places the marker on the map, the Geocoder will also fire a 'result' event, https://github.com/mapbox/mapbox-gl-geocoder/blob/master/API.md#on which you …
AndrewHarvey's user avatar
  • 2,269
0 votes

Combining popup info from overlapping polygons in Mapbox Studio?

neighbourhood is an Array of features under the mouse, so where you are grabbing the first only with neighbourhood[0] you can iterate over or concatenate.
AndrewHarvey's user avatar
  • 2,269
1 vote
Accepted

How to manipulate mapbox symbol icons - MapboxGL.js

Yes using querySourceFeatures to get the GeoJSON from there you can use the draggable point example you've linked to.
AndrewHarvey's user avatar
  • 2,269