Stack Exchange Network

Stack Exchange network consists of 174 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.

0
votes
0answers
14 views

Mapbox – how to create a web map of geotagged photos? [on hold]

I'm trying to create a simple interactive web map of a region using Mapbox GL, based on an existing Mapbox style I've built, which shows the locations of a large collection (100,000+) of geotagged ...
1
vote
0answers
16 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
12 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
53 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 ...
0
votes
0answers
17 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
32 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 ...
0
votes
0answers
15 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][...
0
votes
0answers
30 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
30 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
15 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
31 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 ...
0
votes
0answers
27 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
81 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
44 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
38 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 ...
3
votes
1answer
142 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
38 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
41 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
71 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
55 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
65 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
71 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
38 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
89 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
22 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
63 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
253 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
58 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
103 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
536 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,...
1
vote
0answers
40 views

Building RGB-encoded DEM for Mapbox GL

I'm trying to create a RGB-encoded DEM file like the one that mapbox has for Maputnik that is being hosted on TileserverGL. I've converted a single-band DEM into a color-mapped RGB DEM then converted ...
0
votes
1answer
93 views

Adding geojson features to OpenMapTiles displayed with MapboxGLJS is not working

The OpenMapTiles example for display using Mapbox GL JS works nicely to display the map. However, when trying to add lines and features to the map using Mapbox GL JS functions like this: map.on('...
1
vote
1answer
92 views

Mapbox Vector Tiles dropping features across tile boundaries

I'm currently working on a project that involves the creation of vector tiles from geojson files. These vector tiles are then displayed using Mapbox GL JS. Recently, we've ran into an issue where ...
1
vote
1answer
157 views

Missing tile endpoint in OpenMapTiles -> Mapbox GL JS example

OpenMapTiles.org gives an example snippet (which is described as) showing how to use Mapbox GL JS to display openmaptiles generated tiles. The full OMT example: <!DOCTYPE html> <html> &...
5
votes
1answer
202 views

Mapbox vector tiles version 2 MVTv2 and Geoserver 2.13.x

I use WMS on Geoserver to display MVTs in conjunction with mapboxgl.js v0.45.0. A OSM road layer renders 1:1 on top of the Mapbox base layer, so far so good. However, I got a warning from the js ...
0
votes
1answer
210 views

Mapbox GL JS - Adding variable dependent images to popup

I've been working with popups in Mapbox GL JS, using HTML and want to be able to use variables within the Mapbox dataset, so different popups show different images, depending on attributes in the ...
2
votes
1answer
576 views

How to get geometry of clicked feature?

From Mapbox's documentation I should get a GeoJson feature object when I call queryRenderedFeatures method. I run it from a click event without any filter : this.map.on("click", function(e) { ...
0
votes
1answer
684 views

How to add text labels to a Mapbox GL JS map that has no vector layers?

Using http://bl.ocks.org/danswick/a4de5c170c04fdd38bb4 and https://www.mapbox.com/mapbox-gl-js/example/cluster/ I made a Mapbox GL JS map. It has no vector tiles basemap but raster tiles. It has ...
1
vote
0answers
98 views

Turf.js midpoint of line

I'd like to open a popup in on the midpoint of a polyline/linestring in Mapbox GL, like it's the default case in Leaflet. How can I do this via turf.js? If I use centroid/center/centerOfMass it will ...
0
votes
1answer
251 views

Local GeoJSON Access Mapbox GL JS / Online GeoJSON Updating?

I've seen a lot of similar questions floating around but they have not really addressed what I am looking for. I am a novice at web development. I'm attempting to change my project so that my ...
1
vote
0answers
58 views

How would I go about getting the user input from a popup that contains a text input in Mapbox GL JS?

I want to make a list of places I'd like to visit. When I click on the map a marker is placed and a popup appears above the marker. The popup contains a text input field and a submit button to save ...
0
votes
0answers
501 views

mapbox set fill-color dynamcally

I'm using the mapbox library and I have this function that processes a response of type json, but I want the color of every single feature to be dynamic based on a property of the feature itself: ...
0
votes
0answers
176 views

Mapbox GL JS Marker Collision?

I want to make it such that my markers at higher zoom levels are replaced by one marker. This is similar to the cluster function, which I have also not been able to make work either. I believe that ...
0
votes
0answers
192 views

Popups offset from points Mapbox GL JS

I've been playing a lot with mapbox for mapping some data of mine. I have created a map that is heavily borrowed from the original mapbox sweetgreen tutorial here. However, now that I am almost ...
0
votes
1answer
448 views

Mapbox GL JS set Max Zoom level not working?

I cant seem to get my map to set a max zoom level. Here is a snippit of my code - var map = new mapboxgl.Map({ container: 'map', style: 'mapbox://styles/cdickinson11/cjg49l1f305ou2rls3hd65a6s', ...
1
vote
2answers
548 views

How to add links to popups in Mapbox GL JS

I have managed to make a map w/ styled pops and such. However, what I am trying to do now is to have it such that the links inside of the popups connect directly to websites. If possible, I would like ...
1
vote
1answer
2k views

How to add CSS styling in Mapbox GL Popup?

I am aware this is similar to many other questions, but I have been unable to determine how to add the correct code to style my popups in mapbox-gl. I'm very new to CSS, Mapbox-gl, and coding in ...
0
votes
2answers
60 views

Symbolizing field with many values in Mapbox Studio?

I am using Mapbox Studio and trying to symbolize my Tileset which has about 200 unique values. I am able to create individual 'stops' and manually assign a unique color, but looking for a more ...
1
vote
0answers
31 views

Hosting a FEMA floodmap to a subset of the layer [duplicate]

Going to try this one more time as I think the last time I posted this I was unclear. I have this map here, that is a combination of some ArcGIS analysis and written in Mapbox GL JS. Basically, it is ...
0
votes
1answer
749 views

How to filter layer features by value?

I use Mapbox GL JS for visualization massive dataset. And now I try to create several checkboxes for filtering some features of a tileset by its value. Dataset was uploaded to Mapbox through Mapbox ...