Questions tagged [mapbox-gl]

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

Filter by
Sorted by
Tagged with
1
vote
0answers
21 views

Load a cluster layer using Mapbox

I have a Tile server developed in JavaScript using express. Here you can see the code. But I would like to know if its possible to load a cluster layer created using Mapbox and tiles to cluster layer....
0
votes
1answer
20 views

GZIP geojson files & Mapbox GL JS

Is there a way to serve mapbox GL gzipped geojson files? I have style.json file that pulls multiple geojson files and it is pretty heavy.
0
votes
1answer
48 views

Adding collapsible legend box to Mapbox and features no longer click-able

So, first I started with this map: https://codepen.io/melissad34/pen/mNGjKR It works exactly the way I want it to work. Then I added a collapsible sidebar: https://codepen.io/melissad34/pen/LYYrLKN ...
0
votes
1answer
85 views

How to manipulate mapbox symbol icons - MapboxGL.js

I have my own Mapbox style that I build in MapBox Studio. Now I want to allow my user to move poi_label symbols. How could I do that? I am following this example Create a draggable point and also I am ...
1
vote
1answer
196 views

mapbox gl - multiple styles and filters per layer

The intention here is to determine the proper convention for adding multiple styling rules for a single layer in 'layers' list. My impression was such that multiple layer entries would mean a call to ...
0
votes
1answer
77 views

Setting correct proj4 string/info using GDAL

I am going to try and be as clear as I can - because I don't exactly know what I am doing but I am trying my best. I am sure this is probably simple but I have tried for hours to figure this out. I am ...
0
votes
1answer
33 views

Open iFrame of Links in Map Feature Data in MapBox

I have a MapBox map of points, with a column called "iframe_link", where there's a different link for each point. I made an iframe that works for one page, but I want to open an iframe for each point. ...
0
votes
0answers
224 views

Mapbox GL filter features by ID? No unique Ids?

I am getting the the OSM Buildings (mapbox://mapbox.mapbox-streets-v8) via mapbox style. I want to hide some building within a BBox. Getting the corresponding features: var features = this.map....
0
votes
1answer
32 views

Way to analyze size of mbtiles file or pg database to find largest objects to optimize final size

Is there a way to figure out what OSM data is taking up the most space in my final mbtiles file? For example, Connecticut is 54MB after I have made some modifications to the scripts in openmaptiles. ...
0
votes
1answer
86 views

Mapbox GL Feature Manipulation

Running "mapbox-gl": "^0.53.1" I want to update the color of a layer "type": "fill-extrusion" This is not just one feature that I select, but it might be a multitude of features that are altered (...
1
vote
0answers
9 views

Map-box layer to zoom [closed]

I have used a sector in my Geo map using turf.sector(),and using add layers() filling the sector with colors. Now how can I add zoom option to this sector.? I want it to reduce size on zooming in
1
vote
0answers
139 views

Blur all other area outside polygon in mapbox-gl

I am trying to create an effect like Can view it by adding feature from fiddle in http://geojson.io/#map=14/46.9597/7.1446 when added the feature in mapbox as geojson layer of mapbox-gl I am getting ...
0
votes
1answer
331 views

Mapbox gl expression to get match in text field

I am trying to set one of the values from feature properties to text-field depending on a property "text-field": [ "match", ["get","label"], "L1","{...
0
votes
1answer
64 views

Change dynamically created layer's minZoom after render

I want to change the minzoom of dynamically created layer after the rendering. I tried couple of things: map.getLayer('my_custom_layer'); // this gets the layer map.getLayer('my_custom_layer')....
1
vote
1answer
266 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
36 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
571 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
317 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....
0
votes
0answers
46 views

Filtering Custom Mapbox style implemented in Android

I created Custom Mapbox styles by importing Tilesets containing custom point locations in it.I implemented the same style in my android app.I can access the data inside each points by using ...
0
votes
1answer
162 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
0answers
148 views

Mapbox GL - change all marker symbols based on zoom

I am adding markers from a GeoJSON one by one. myGeoJSON.features.forEach(function(marker) { var elem = document.createElement('div'); var text = var text = document.createTextNode(marker....
0
votes
0answers
60 views

Using Mapbox, I have a filter input. As i type I would like the points to filter by words in the input

Below I have a code that basically filters as I move along the view which is good. However I would like to also include a portion within here that would make points disappear as I type in my search ...
0
votes
0answers
486 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
286 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
119 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....
3
votes
2answers
946 views

Get GeoJSON Features using Mapbox?

I'm using Mapbox to create webmapping, I want to get GeoJSON Features. I tried map.queryRenderedFeatures but it returns array empty. there are my code: map.on('load', function(e) { map.addSource("...
1
vote
0answers
152 views

WMTS with Mapbox WebGL

I need to add a WMTS to a mapping application that uses mapbox-webgl (this is a React App using react-map-gl). There is no support for WMTS in mapbox-webgl but it seems like I should be able to do ...
1
vote
0answers
246 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 ...
1
vote
0answers
224 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
1answer
2k views

Set border width and color in Mapbox GL

I'm working on an application based on Mapbox GL, I need to give to the user the opportunity to set the width and the color of the borders of polygons but I can't find the right GeoJSON proprieties to ...
2
votes
1answer
430 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
286 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 ...
0
votes
1answer
368 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 ...
2
votes
3answers
3k views

React Native - react-native-mapbox-gl vs react-native-maps

I have to develop apps with React Native for mobile that concern with mapping and found out there are two libraries for Native on this - react-native-mapbox-gl and react-native-maps. From github pages ...
1
vote
1answer
225 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
0answers
140 views

Mapbox minimum zoom extent

I uploaded a custom shapefile (converted to geoJSON) using the mapbox python SDK and visualize it in a Jupyter Notebook using the MapboxGL python module. After I successfully upload the GeoJSON file ...
1
vote
1answer
230 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 ...
0
votes
1answer
118 views

Workflow to create global mapbox tileset

I am in process of creating a hiking map rendered from OSM data using Mapbox. It works quite fine already, however some data are missing in the Mapbox Streets V7 datasets, namely: bus stops power ...
0
votes
0answers
262 views

Vector Tiles: Considering a rule, change each building color of Buildings layer

I'm consuming a Mapbox hosted map with Mapbox GL (but if needed, I can use leaflet or whatever) that has the standard Mapbox street layers including OSM Buildings layer plus a custom layer uploaded by ...
1
vote
1answer
506 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 ...
2
votes
1answer
7k 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 ...
1
vote
2answers
135 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 ...
2
votes
1answer
2k views

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

I created a map using Mapbox GL JS with several layers using this example At the same time I don't have any spatial knowledge in Javascript. It's restrict me to create legends for each layers. The ...
0
votes
1answer
158 views

Geocoding to only reference Tileset using Mapbox GL JS?

I'm using Mapbox's Geocoding (search box) and was wondering if there's a way that it would only reference my Tileset data rather than the generic global address search? Looks like Mapbox has a "...
0
votes
1answer
661 views

How to return count of popups opened up by clicking on a mapbox gl map feature?

I’ve a point dataset with overlapping points. For each feature a popup is created automatically. When I click on a point with other overlapping point on it all popups are opened up and it’s messed up. ...
3
votes
1answer
2k views

Leaflet MapBox Issue of poly line which crosses the International dateline

I am using mapbox leaflet js in my application "https://api.mapbox.com/mapbox.js/v3.0.1/mapbox.js". Previously i was using google map, I am facing an issue when i draw a polyline in map which crosses ...
1
vote
2answers
4k views

Custom icon for clusters in Mapbox GL Js

Is it possible to use a custom icon instead of a circle and a symbol (with the cluster_count string) for Mapbox GL Js' "Superclusters?" My goal here is to approximate something like Pie Clusters or ...
1
vote
1answer
492 views

Filter geojson file to Get last 24 Hours Data [closed]

i am using mapbox platform to showing the map in my site. geojson is having time attribute Ex: "time":1510301955145 I want to show the map of last 24 hours.
0
votes
1answer
479 views

How can I use icons on a my own maptiles klokantech docker container?

If I take this example: https://www.mapbox.com/mapbox-gl-js/example/geojson-markers/ an change the mapsource from: style: 'mapbox://styles/mapbox/light-v9' to my own docker container: var map = ...
1
vote
1answer
191 views

tippocanoe feature filter not working

I use tippocanoe to build Mapbox Vector Tiles from GEOJSON features but can't get the filter to work. I use a geojson file which contains millions of features and want to filter them for different ...