2,548 questions
0
votes
0
answers
19
views
Ordering features inside of layer dynamically - Mapbox
I have a bunch of lines drawn on a map that come from a geojson. When a user clicks on one of the lines, the clicked one changes color, opacity, etc. and all the other lines also become thinner and ...
0
votes
0
answers
84
views
Different image warp between mapbox v2.3.1 and mapbox v2.4 and following
I’ve noticed that images are displayed a bit differently between Mapbox v1 (until v2.3.1) and on the other hand Mapbox v3 (beginning with v2.4). Both screenshots of the animated GIF use flat Mercator ...
0
votes
0
answers
37
views
Mapbox gljs map in Flutter issues with any kind of sheet/overlay
I'm using Mapbox in my Flutter app and am having some issues with building out UI the way I want to because of all of the hacks I need to put in place to have bottom sheets and any kind of overlay ...
0
votes
0
answers
27
views
How Can I Use String of Coordinates Within a Mapbox Feature?
I am trying to fetch a comma separated list of coordinates from a database and then show them on a Mapbox GL JS map.
By using the following FeatureCollection, I am able to show a Line between ...
1
vote
0
answers
29
views
Mapbox tileset : Points appear aligned on a grid at low zoom levels
I’ve created a tileset with point data that I’d like to display around zoom levels 11–12. It works perfectly at higher zoom levels, but when I zoom out below 12, the points start appearing aligned on ...
0
votes
0
answers
42
views
Move features and preserve spatial relationsips with maplibre
I'm moving all polyline features around a centre to a new center. How can I ensure that their spatial relationships are preserved after the features have been moved?
It seems I would calculate the ...
0
votes
0
answers
20
views
Why the layer fill-extrusion-height changes when I enable terrain layer on mapbox?
In this example, I have a Mapbox map where I draw a cube on top of it.
When I enable an online terrain service to add a terrain layer, I notice that the fill-extrusion-height appears visually ...
0
votes
0
answers
31
views
Style using coordinates in Mapbox GL JS
I have a map loaded with a large geojson feature collection and would like to apply some fading (opacity) of the geometries that are near a certain latitude. All of the feature collections are ...
0
votes
0
answers
29
views
Is there a way to know the maximum pitch/zoom to prevent having the camera inside mountains?
I'm using Mapbox GL JS with terrain and exaggeration, and would like to adjust maximum pitch dynamically based on what's visible on the map.
More specifically, I would like to prevent the user from ...
0
votes
0
answers
65
views
How to consume paginated GeoJSON sources
I would like to consume the following GeoJSON source in Mapbox:
https://geospatial.alberta.ca/titan/rest/services/transportation/access_facility_roads/FeatureServer/0/query
If I try loading this into ...
0
votes
0
answers
39
views
Custom draw control component works on local instance but not after build and deployment
Custom draw control component from mapbox-gl-draw works on local instance but not after build and deployment in React environment.
I have a custom draw control here:
import React, { useCallback } from ...
0
votes
1
answer
78
views
How to enable Mapbox GL JS "devtools" mode?
In Mapbox GL JS's 3.2.0 change-log notes, they say that they introduced a new feature:
Add a debug UI for the development build of GL JS, enabled with devtools: true in Map options.
If I add ...
0
votes
0
answers
39
views
How to style unselected line points in Mapbox draw gl?
Initially, when drawing a line in Mapbox GL Draw, the vertex points are only visible when the line is selected. However, I want the points to remain visible even when the line is unselected, and to ...
1
vote
0
answers
46
views
mapbox-gl-js creates artifacts in corner of edge with geojson data when world-wrapping (only when screen height is > 1024px)
Minimum reproducible example:
I am using mapbox-gl-js on a website (angular)
I am using this dataset for the MRE (minimum reproducible example):
Here is the github repo:
https://github.com/folsze/...
4
votes
2
answers
250
views
"Cannot use namespace 'Point' as a type" when updating Mapbox GL
In our Angular project, we recently updated from Mapbox GL 1.13.2 to 3.6.0. For context, Mapbox GL has a dependency on @mapbox/vector-tile, and @mapbox-vector-tile has a dependency on @mapbox/point-...
1
vote
0
answers
46
views
Add side resize for rectangle polygon layer in Mapbox GL
I'm building a tool for editing rectangular polygon on a Mapbox map in web. I rectangle has controls on the middle of each rectangle side that allow side resizing. This resizing should allow move only ...
0
votes
1
answer
46
views
Mapbox Custom Marker as a "Pillar" on the Map
My goal is to have my markers standing like pillars at 90 degrees to the Mapbox map.
Like this:
I got this from https://github.com/vasturiano/globe.gl
Currently I have this code to add a Marker but ...
0
votes
0
answers
38
views
Get number of features in source data
I have a problem I'm struggling to get my head around. I am generating an .mbtiles file, in which 13935 features are present (a mix of Polygon and Point). See below:
enter image description here
But ...
0
votes
0
answers
57
views
mapbox - Create a rotating globe
I am trying to rollout mapbox with a spinning globe feature as explained here: https://docs.mapbox.com/mapbox-gl-js/example/globe-spin/
However I had to notice that from some user this feature in our ...
0
votes
0
answers
97
views
promoteId in Mapbox Studio
I use a geojson file such as the following to upload data as a Mapbox tileset to Mapbox Studio. The tileset is then used for a Mapbox style created with Studio. Within my file, I assign both a top-...
-1
votes
1
answer
65
views
Is there a way in mapbox expression to check if attribute values are empty or blank space?
I am trying to check if the field values are null or empty(blank space). Is there a way to trim the field values and check if those are empty string or not?
'icon-image': [
'case',
['==', [...
0
votes
0
answers
29
views
Mapbox search feature by lat lng
I want to search for a feature just like queryRenderedFeatures, but instead of providing viewport coordinates, providing geographical coordinates.
I tried to achieve this with map.project but it is ...
1
vote
1
answer
48
views
Mapbox rendering empty labels if background color is not null
I’m working on a web application where I need to exclude labels from rendering if their values are null or empty. In my labelingInfo, the issue arises when labels have no valid value—the background ...
0
votes
1
answer
66
views
Trouble Adding Mapbox Sprite Assets via API vs Studio
I am trying to create a sprite via Mapbox using Sprite API endpoints and can do so successfully via the following endpoint:
PUT https://api.mapbox.com/styles/v1/{{username}}/{{style_id}}/sprite/pin-...
2
votes
1
answer
70
views
circle-color is not displayed correctly
This is my setting for a circle
map.addLayer({
'id': _identifier,
'type': 'circle',
'source': _open,
'paint': {
'circle-radius': 26,
'circle-...
2
votes
0
answers
187
views
Custom Mapbox Style Returns Blank/Gray Tiles While HTML Preview Works
I'm developing a Flutter app using flutter_map and have been using Mapbox for my map tiles.
Public Mapbox styles (such as mapbox/streets-v11) work perfectly in my app. However, I'm facing an issue ...
0
votes
1
answer
116
views
Feature hover state not working on Mapbox GL JS
I have added a hover state to the countries in my map, but the hover state only works in the Studio environment and not in any other external embed e.g. iframe or preview.
I have created a codepen to ...
2
votes
0
answers
32
views
How to anchor a clipping plane?
We're trying to implement a section tool in Threebox, and it appears that we cannot add a clipping plane (THREE.Plane()) to tb, via tb.Object3D() or tb.add(). I'm assuming it's because a THREE.Plane ...
0
votes
1
answer
115
views
Mapbox: how to prevent page-scroll hijacking while allowing pinch to zoom
I'm inserting a Mapbox map with mapbox-gl-js as a full-width, full-height div into my website. The default behaviour is that scroll is used for zooming. But I don't want that as then the user can't ...
0
votes
0
answers
29
views
Clusters added into mapbox gl using setPaintProperty for circle-color showing wrong color for some clusters when zoom in
We are showing cluster points on our map based on the lat, long values according to the zoom level. We are having 3 different colors which will be shown based on some condition, colors are red, green ...
0
votes
1
answer
389
views
MapLibre GL custom mask layer causing subsequent vector tile line layer to render incorrectly
I have created a mask layer using MapLibre GL JS's CustomLayerInterface to mask a raster layer behind it. The mask layer works correctly in hiding the raster behind, however it is causing issues with ...
0
votes
0
answers
54
views
Mapbox GL JS Heatmap: Issues with Color Coding and Opacity Across Zoom Levels
I'm developing an interactive map using Mapbox GL JS to visualize snowfall data across various ski resorts. Each resort's data includes its name, latitude, longitude, and snowfall amount (in inches). ...
0
votes
0
answers
42
views
How to retain text symbols on linestrings at low zoom?
I have some very high resolution contour lines generated from topographic data which is in the form of GeoJSON MultiLineStrings. I upload and create a vector tile using Mapbox Tile Service Tilesets ...
0
votes
0
answers
30
views
A unexpected behavior about draw circle with the radius in meters with mapbox gl js
I attempted to achieve drawing a circle with the radius in miles meters with mapbox gl js.
At first glance,it works well. But an unexpected behavior occurred when i drag and zoom the map near the ...
0
votes
0
answers
67
views
Why is Mapbox selecting the wrong feature on click, even without zoom changes?
I'm facing an issue where, when clicking on a feature on a Mapbox map, it selects the wrong feature, even though the cursor is visually placed over the correct feature. This happens even when I haven'...
0
votes
1
answer
68
views
Set Mapbox layer text-size based on multiple properties
I have a layer of points on my map. I want all points whose id belong to a list to be size 16 at all times. I want the remaining points to change their size based on the zoom level of the map. Each of ...
0
votes
0
answers
14
views
How to display collada file content ( xml ) on mapbox using ThreeJS?
I get my Collada file as XML file from an API:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<COLLADA xmlns="http://www.collada.org/2005/11/...
2
votes
1
answer
474
views
Mapbox GL JS - fitBounds with bearing and/or pitch sets bounds for North aligned, zero pitch map. How to set bounds for rotated map?
I have a JS class to add maps with routes to my page (mapbox-gl-js v3.8.0).
Once the route has loaded, I'm using fitBounds to adjust the map to fill the available space with the route.
This all works ...
1
vote
0
answers
74
views
Mapbox queryRenderedFeatures detecting features offset from point provided at some zoom levels
I have a mapbox app that plots points on a map and lets the user hover to reveal additional info. To detect hover state, I'm using a mousemove event + queryRenderedFeatures, but the event's lngLat ...
1
vote
1
answer
84
views
Get custom property in addLayer 'layout' - works selectively
I'm using Mapbox GL JS to create custom maps with travel-tours and I have following "strange" error:
That's my "code":
const transportIconGeoJsonData = {
'type': '...
0
votes
1
answer
169
views
How to resolve Uncaught (in promise) TypeError: Cannot read properties of null (reading 'setAttribute') when using Mapbox inside a modal?
I was trying to incorporate an input address autofill inside a modal. The autofill suggestions appear, but when I try to click/select the preferred address an error is occurring and the modal closes. ...
1
vote
0
answers
22
views
Setbounds for Mapbox GL JS in Albers
Are there any ways to set the initial bounds for a Mapbox GL JS map when the projection is in Albers? Example below
const map = new mapboxgl.Map({
container: "map",
projection: "...
0
votes
1
answer
138
views
How to disable the midpoints of polygon created by Mapbox-gl-draw
I use mapbox-gle-draw to create polygons on the map and the default behavior creates a midpoint that allow me later when clicking on it to add new point
I want to disable the default behavior and ...
0
votes
1
answer
42
views
Mapbox Geocoder on Safari
The following snippet works perfectly on Chrome displaying a search bar to autofill address results. Unfortunately Safari (17.5 in my case) does not recognize .on method on mapboxGeocoder object. Is ...
0
votes
1
answer
426
views
Mapbox/Maplibre raycast with only a projection matrix and georeferenced objects
I guess this could be considered a continuation of this question so please check it out for context about his one, especially the JSFiddle reported in said question.
I'm basically trying to achieve ...
2
votes
1
answer
382
views
How to create a gradient background layer in MapboxGL?
Is there any way to create a gradient background in mapboxGL JS or Studio? There is a prop for linear gradient, but I can't find any information about polygonal gradient.
As a background layer or a ...
0
votes
1
answer
691
views
WARNING: Too many active WebGL contexts. Oldest context will be lost (Mapbox+React+Marzipano)
We are using marzipano with Mapbox in one of our project, there we use to display points on map and on click of any point we are displaying 360 images with the help of marzipano.we need to click on ...
2
votes
0
answers
33
views
Mapbox: Text of the point/circle behind is visible over the point in front
I want to show the points and to write data inside. Problem is that the data (numbers) are shown for the points behind instead of the ones in front.
I would also like for smaller number circles to ...
1
vote
0
answers
151
views
Mapbox-gl-draw setting the drawing color of different polygons
I want to be able to have my own custom buttons that call the «start draw polygon» function from mapbox-gl-draw. The idea is to pass what type of polygon it is (custom definition), so that I in the «...
0
votes
1
answer
291
views
Unable to Import some classes from Mapbox Navigation Modules in android studio
I'm new to Kotlin and Java programming and have just finished the basics. I'm currently trying to build a Mapbox navigation Android app but am running into several issues related to various Mapbox ...