Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [mapbox-gl-js]

A WebGL JavaScript interactive maps library that can render Mapbox Vector Tiles.

2
votes
1answer
17 views

Mapbox - Icon rotations in FeatureCollection

I'm displaying various ships on a map and I have made real sized polygons to represent them. These are not visible at lower zooms, so I wanted to also add icons representing each ship. The icon is a ...
1
vote
1answer
21 views

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

Here: https://docs.mapbox.com/mapbox-gl-js/example/3d-buildings/ It's possible to draw 3D buildings by taking advantage of extrusions, however the 3D vector layer source is the Mapbox's underlying ...
0
votes
0answers
7 views

Putting inset map Popup in front using Mapbox GL?

I have maps of Hawaii and Alaska inset on a map of the continental US. All maps have markers and popups when you click the markers. How do I position the AK and HI popups so they are fully visible?
0
votes
0answers
14 views

Cannot display GeoServer vector tiles when serving web map using IIS [duplicate]

I am currently developing a web map with Mapbox GL JS. I have been adding layers to the map from GeoServer using the following url: "http://localhost:8080/geoserver/...". When opening the map in ...
0
votes
0answers
31 views

How to add GeoServer WMS layer to Mapbox GL API?

I have been using GeoServer WMS layers with OpenLayers 3 and it is working well. Below is the code how I have used to add my GeoServer WMS layer to the Mapbox GL API: var mapOptions: MapboxOptions ...
0
votes
0answers
41 views

Interact with vector tiles from Mapbox in Leaflet.JS

I am trying to add GeoJSON layers on a Leaflet.JS map, but there are GsoJSON files with a very big size that can not be rendered as GeoJSON on the map. So i have added it to the map vector tile ...
0
votes
0answers
10 views

Categorical circle colour on mapbox gl js

Adapting the documented example here To produce the code below I get the following error. Error: "layers.circles-heat.paint.circle-color.stops[9][1]: color expected, "#5675d2" found" map....
1
vote
0answers
14 views

vectortiles: change style of basemap instead of data

I'm using Mapbox-GL-Leaflet bindings on Leaflet to style my vector tiles. I'd now allow the user to switch a style using Leaflet control. The easiest way would be to use LayerControl for this. Since ...
0
votes
1answer
22 views

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

I am trying to resolve an issue with the accuracy of a selected point using queryRenderedFeatures. The accuracy is fine when zoomed out, but when zooming in it appears off. I am using the ...
0
votes
1answer
72 views

Get distance for mapbox-gl-directions

Using the following code, how do I get the distance of the route directions? I want to run some math against the length. container: 'map', // container id style: 'mapbox://styles/mapbox/...
0
votes
1answer
131 views

Matching multiple properties in mapbox gl js filter

I am trying to write a filter that will match on values from several properties of a layer. For example, in my hypothetical layer of breweries, I'd like to match those breweries that have a state ...
0
votes
0answers
30 views

Mapbox GL JS - QuerySourceFeatures for clustered features?

I load a GeoJSON file within the map and want to retrieve an array of all GeoJSON features that are loaded. However, I have the data clustered and this seems to be a problem. I use the function ...
0
votes
0answers
120 views

Adding select option menu to Mapbox map and filtering data source?

I'm attempting to add a drop down select menu for # of bedrooms to a mapbox map. The data source that I'm attempting to filter on is a geojson data file. I setup window onchange event listener ...
0
votes
1answer
81 views

How to post marker to Mapbox GL map

I'm following this tutorial about Mapbox GL and flask which has been going great until the step to add markers to the map. I've tried to distill it to make it as simple as possible but it's still not ...
4
votes
0answers
71 views

Fixing buildings that do not appear in 3D using Mapbox gl js?

I'm trying to adopt this Display buildings in 3D example, but I found out that in my city (Minsk, Belarus) some buildings look flat like this: The coordinates of this particular building are 27....
0
votes
0answers
59 views

Merging two MapBox MBTiles files using javascript/typescript in Cordova?

I am using the MapBox-GL-JS API to render maps in a Cordova hybrid app that runs on Android and iOS. I have serving vector tiles locally from the phone working. In my use case, I would like users to ...
1
vote
0answers
103 views

Convert Z/X/Y tile coordinate to WMTS

I would like to add a WMTS tile endpoint to Mapbox-GL-JS, which only supports "XYZ" or TMS tiling schemes. According to what I understand of the WMTS specification the two seem to have the same zoom ...
0
votes
1answer
108 views

Opacity Transition Mapbox Fade In

I am facing a problem using the 'fill-opacity-transition' in Mapbox GL JS. Maybe someone has an idea what the mistake could be? <!DOCTYPE html> <html> <head> <...
0
votes
1answer
218 views

Mapbox GL JS - 3D Buildings - display only some buildings in 3D

I am using this example provided by mapbox gl js: Display buildings in 3D Now the problem is I only want to show some buildings in 3D. How can achieve this? I don't know where to find the source-...
0
votes
1answer
106 views

How to query features of raster layers hosted on GeoServer that are added to Mapbox?

Currently working with Mapbox gl js. I know for OpenLayers there's a function called GetFeatureInfo to do this, but is there a similar one for Mapbox? What I want to do is whenever the user clicks on ...
1
vote
1answer
108 views

Tippecanoe Vector Tiles overzooming not working

I have created Vector tiles with Tippecanoe in mbtiles format. I am using tileserver-gl for serving the Vector tiles. Firstly I am creating 20 mbtiles separately as different layers needed different ...
1
vote
0answers
107 views

How to update circle-color or marker symbol on update of a source property in Mapbox GL?

I am trying to get Mapbox GL work in my React code as below: I have a property called strength in each of my features in a FeatureCollection of a mapbox-gl map. I want to display a circle (ideally a ...
0
votes
0answers
17 views

How can GeoServer transform a 'no RHR layer' into a RHR layer?

We are using GeoServer 2.11.2 and Mapbox. We have many layers that do not follow the rule of the right hand and we need to serve them to other application. The problem is that we have to show in a ...
0
votes
2answers
220 views

GeoServer GeoJSON WMS layer request in Mapbox

I'm creating a Mapbox GL JS web map which pulls GeoJSON layers from GeoServer. I've used the documentation to find my problem lies in the 'GetFeatureInfo' get request URL which follows the following ...
1
vote
0answers
64 views

Extend / override Mapbox-gl 'baselayer' loadTile

Similar to how Leaflet's guide shows how to override L.TileLayer's getTileUrl method in place of your own (and L.GridLayer's createTile method), I want to know how to extend/override Mapbox-gl's ...
1
vote
1answer
157 views

Clipping/cropping/masking a raster tile layer in Mapbox GL JS

I'm loading Landsat tiles into a Mapbox GL JS map via an AWS S3 tile server, and this is working OK, but what I'd really like to do is clip the tile layer to a GeoJSON polygon which is loaded in ...
1
vote
0answers
23 views

Merge node results into one MultilineString

I'm trying to generate MultiLineStrings from street data nodes. Right now my workflow is as follows: I run something like the following through the Overpass Api, to get all the nodes: [out:json][...
1
vote
0answers
129 views

Mapbox multiple filters to layers

I'm new to Mapbox GL and want to understand how i would go about the following; I have 5 principle layers (from the same source, all vector tiles from Geoserver) which will only be drawn in ...
1
vote
0answers
104 views

Vector Tiles in a JavaFX application

I currently building a desktop routing application using Java and JavaFX plus MapBox and Leaflet. My problems occured when i try to load a vector tile into a WebView component. If i'm using this HTML ...
0
votes
1answer
78 views

How to load geojson features outside view with Mapbox GL?

I am trying to load all features from an imported geoJSON. I want to do so because I need some propeties in order to create a list of all elements. But when trying to access them it looks like I can ...
0
votes
0answers
73 views

Mapserver with tileindex to Mapbox

I have many tif files in a single directory which I want to show as a layer in Mapbox. Starting with Mapserver (running a Docker container) to publish the tifs as PNG raster layer. I receive png ...
2
votes
0answers
199 views

Mapbox GL Expression to filter array in property

I have GeoJSON Feature properties that look like this: { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": { "id": "someID", "...
2
votes
1answer
225 views

Can I use a browser's developer tools to see the zoom level of current map in browser?

What I'm looking for Where a map is being served by Mapbox in my browser is there anywhere within the Chrome/Firefox Developer Tools where it shows the current zoom level as displayed on screen? ...
0
votes
1answer
178 views

Mapbox.js (or GL) with OpenLayers

Our initial need is to have a GIS tool that overlays images on a map which is not facing north. In our research we have seen that only Mapbox and OpenLayers support this. Along with that we want ...
1
vote
0answers
76 views

Remove map layer when animation restarts Mapbox gl

I am having issues in 'clearing' the map from lines when the user clicks on an element. The idea is to switch between different city-animations on click. For each city, a new geojson is called. The ...
4
votes
1answer
358 views

How do I filter a layer based on property that's an array in with Mapbox GL JS?

I've got a relational dataset broken into two layers: members and organizations. They're GeoJSON, with features that look something like this: // Org Features { "type": "Feature", "geometry": { ...
0
votes
0answers
76 views

Data-driven cluster colour with mapboxgl

I am trying to draw circle which colour depends on a "group" attribute in my geojson. I followed a simple example with these colours: map.addSource("data", { type: "geojson", data: url, ...
0
votes
1answer
66 views

GDAL - Unable to convert to Web Mercator using gdalwarp

I am making geoTIFs of weather data (for a Mapbox overlay) and I am converting them to web mercator for use on the map. The images were generated from the same source file and both images have the ...
0
votes
1answer
146 views

Mapbox GL JS Toggle Layers default to “off”

Using Mapbox's 'Toggle Layer' example, how would I load the map with the "contours" and "museums" layers turned off? I want the layers to be turned "off" by default and have the user turn "on" the ...
1
vote
0answers
139 views

Using GDAL tools to convert GeoTIFF for Mapbox use

(Edit) I have added a link to the files needed to reproduce problem (unzips to 180MB TIFF) : https://www.dropbox.com/s/qrrlsjlmafctt38/issue.zip?dl=0 I have been working on a project the past few ...
0
votes
1answer
169 views

Mapbox GL JS - toggling 2 layers

I'm using Mapbox's Show and Hide Layer example where the user can toggle on/off layers, but seem to be running into an issue I can't pinpoint. What I did In Mapbox's example, I replace the first ...
1
vote
0answers
129 views

Vector tile layers over 3D terrain

I have a set of vector tile layers I'm hosting (mbtiles) on Mapbox. Currently, I'm using Leaflet to overlay these on a 2D satellite view and works. However I'm wanting to add in some features to my ...
0
votes
0answers
48 views

Convert “world file” GIS for MapBox GL?

I'm trying to display GIF image with a world file on Mapbox gl. The image is displayed but it looks like it was shifted couple of degrees up.The Image documentation state that it was created using ...
1
vote
0answers
104 views

MapBox GL JS - Markers or Layers

Ok. I've a server which send me a geojson data, according to the specifications. I'm using mapbox gl js, and not sure what type of method to choose: 1) creating a layer with geojson properties of ...
0
votes
0answers
40 views

Add image over the fill/line layers in Mapbox GL JS

I have custom map (image overlay with bounds) with some areas (fill/line layers): How to add image layer (like image overlay in map style and with same size) over the other layers? This image have ...
1
vote
1answer
96 views

Combining popup info from overlapping polygons in Mapbox Studio?

I'm trying to display popup information from overlapping polygons similar to this question, but instead of a click, I'm using the mouse over to identify my popup. In areas that have overlapping ...
0
votes
2answers
694 views

Mapbox Feature icon-rotate as symbol

I have a requirement to enable a user to Rotate a single feature they've added to the map. The feature is part of a geojson FeatureCollection and styled as a symbol with layout properties. Obviously ...
1
vote
0answers
72 views

Looped query rendered feature function for a set of intersect points upon a GeoJSON building layer in Mapbox GL JS

I'm currently using mapbox gl to visualise and analyse a GeoJSON layer of buildings. My current aim is to develop a function that will use the mapbox draw functionality to draw a line (using the ...
1
vote
0answers
173 views

Visualising road segments as heatmap

I have some data on frequency of different road segments, and need to visualise it as a heatmap. Is there some utility/plugin for Mapbox or Leaflet which does this kind of visualisation. I am only ...
1
vote
1answer
1k views

mapbox gl expression to match multiple values

i have a layer that i want to filter by multiple values stored in array let filter = ['in','id', 1,2,3] map.setFilter('layer_name',filter) this works fine and it will return only features with ID 1,...