Search Results
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 |
A WebGL JavaScript interactive maps library that can render Mapbox Vector Tiles.
1
vote
Accepted
Collapsible sidebar instead of popup message in Mapbox?
Problem with your code logic is that sidebar toggle function toggleSidebar is called on each feature click, regardless if sidebar is already opened or not. Code should check if sidebar is opened and n …
3
votes
Accepted
Cropping specific area of map using Mapbox GL-JS
Mapbox GL JS is not using 2d context for canvas, but webgl context, so operation is not trivial. Logic goes like this:
Polygon coordinates are converted to map pixel coordinates with map.project meth …
2
votes
Accepted
Mapbox - combining multiple checkbox filters
To achieve combined effect of selected filters you have to create a combined filter each time one of the individual filters change.
One way to do this is to have some filters object where you set key …
0
votes
Accepted
Two MapLibre GL JS raster layers pointing to same Geoserver layer
Two things have to be corrected to make this work:
When defining highlighted layer you have to leave out option 'source-layer': layer_name, it should be used only for vector tile source (see https:// …
2
votes
Accepted
How to style Mapbox heatmap
Problem is in your heatmap-weight specification:
"heatmap-weight": [
"interpolate",
[
"linear"
],
[
"get",
"value"
],
1, 0,
90, 1
]
Instead of using actual value count from …
1
vote
Accepted
Project Mercator coordinates at a specified zoom level in Mapbox GL JS
If you are using map.project and map.unproject methods in Leaflet for projecting/unprojecting coordinates, these are not Mercator coordinates, but "pixel coordinates relative to the CRS origin", see h …
0
votes
Accepted
Adding WMS layer in Mapbox GL JS
It seems you are out of luck here. If you look at the result of getCapabilities request, you'll see that Dybdekontur layer is available only in EPSG:4258 projection. This effectively means you can't u …
1
vote
Using "CASE WHEN" and "IN" condition in MapBox GL JS?
Have a look at Mapbox GL expressions case at https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/#case and all at https://docs.mapbox.com/mapbox-gl-js/style-spec/expressions/#all.
Your express …
3
votes
Slice circular linestring by shortest distance between 2 points
Explanation for this is simple. If the start/end point of line string created with the polygonToLine method is between measuring points on the short section that you want to measure, measuring has to …
1
vote
Mapbox GL JS Equivalent to Leaflet LayerGroup?
Concept of layer groups was present in predecessor Mapbox JS (see https://docs.mapbox.com/mapbox.js/api/v3.3.1/l-layergroup), but was left out in it's successor Mapbox GL JS.
However there's a simple …
2
votes
Accepted
Unable to Load ArcGIS vector tiles to mapbox-gl-leaflet
I'm not familiar with mapbox-gl-leaflet plugin, but it seems it's not sufficient to display ArcGIS Esri vector layers. ArcGIS has it's own Esri Leaflet Vector Tile plugin (https://github.com/Esri/esri …
1
vote
Accepted
Distorted image overlay in Leafet and Mapbox
As you wrote in your comment, your image is in EPSG:4326 CRS, so it cannot show correctly in default Leaflet map that uses EPSG:3857 CRS.
Since Leaflet (unlike OpenLayers) supports only one CRS per ma …
0
votes
Query mbtile vector at a higher zoom level while visualising in lower zoom in Mapbox GL JS?
One possible solution is to create second map that's copy of the original one, but not displayed. This one can then be used to set zoom independent of the displayed map and retrieve features from ther …
5
votes
Accepted
How do I translate MapBox GL JS GPS coordinates into SWEREF 99 TM ones?
Library proj4.js (http://proj4js.org/) is usually used for coordinated transformation in JS. To use it one needs CRS definition, which can be easily found on epsg.io site.
SWEREF 99 TM coordinate syst …
1
vote
Accepted
Collapse geocoder plugin search box in Mapbox
If you look at the docs of mapbox-gl-geocoder plugin, there is collapsed option just for that.
So code could then look something like this:
map.addControl(
new MapboxGeocoder({
accessToken: mapb …