Questions tagged [mapbox-gl-js]

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

Filter by
Sorted by
Tagged with
0
votes
0answers
17 views

Fetching GeoServer vector tiles in Mapbox GL is slow

I want to create a basemap with Mapbox GL and GeoServer and PostGIS (to store layers). I use GeoServer 2.18 and the latest version of Mapbox GL. There are about 20 layers in PostGIS. One layer is the ...
0
votes
0answers
10 views

Drawing custom markers on Mapbox

I'am using mapbox-gl-js draw, and I need to draw custom markers inside the map. I can't find anyway in the documentation that talked about this issue. Work around is needed, any ideas?
2
votes
1answer
12 views

Mapbox select road feature, how to return uncomposited features?

I'm trying to build an interface in which the user can click to select a road. You can see a simple version here: https://codepen.io/lizzie-malk/pen/eYBWbjm What I have noticed is that the features ...
0
votes
1answer
18 views

Mapbox GL JS - Is there a way to specify a different zoom level for mobile devices?

With Mapbox GL JS, is there a way to specify a different zoom level for mobile devices? I found two examples, both from the older mapbox.js (links below), but I can't seem to translate them to GL JS ...
0
votes
0answers
4 views

Smart paint settings for mapboxGL layer

I'm adding a vector layer that is referencing a mapbox:// url that the user has created via an import. As such, I will not know in advance what kind of features are inside that import e.g. polgyons, ...
0
votes
1answer
17 views

Mapbox GL JS add raster without tiling

With leaflet with reference to this sample: https://github.com/stuartmatthews/leaflet-geotiff I was able to host a GeoTIFF file on the server and access it without tiling. Can the same be achieved ...
0
votes
1answer
57 views

Mapbox - routing over specified data

I'm making a map which enables routing over hiking trails. I have GeoJSON data containing my custom hiking trails and they are displayed as layer on the map. User can click on that layer and add ...
0
votes
0answers
14 views

Mapbox - filters override each other

I'm creating a map based on this example: https://labs.mapbox.com/education/impact-tools/finder-with-filters/ In their example, they have two dropdown filters and one checkbox filter. I would like to ...
0
votes
1answer
30 views

Changing Mapbox popup based on null values

I currently have a popup in Mapbox that displays some properties and a photo. Not all of the points have photos though, so the ones that have a null value in the image link field just show a blank box ...
0
votes
0answers
11 views

Sort Custom Tileset Features in MapBox Studio or GL

I have a large number (hundreds of thousands) of point features uploaded to my account in MapBox studio as a dataset, and have generated a tileset based on that dataset. This tileset is used in a ...
1
vote
1answer
55 views

Tippecanoe to not hide geometry

I use these options to create mbtiles for mapbox --accumulate-attribute to accumulate population from polygons, so I can get population with mapbox.queryRenderedFeatures in bbox tippecanoe -o out_sum....
1
vote
3answers
413 views

Open source alternatives to mapbox-gl?

What are the alternative vector tiles pipeline tools (producing -> rendering) to mapbox-gl as it is no longer open-source starting from its version 2.0.0? Source: https://github.com/mapbox/mapbox-...
2
votes
0answers
39 views

How to get a segment between two points

I have a map made of two layers, the first is a list of trails (path) and the second is a point based layer (different intersection between the trails). I am looking for a way to select a segment ...
0
votes
1answer
72 views

Putting a Mapbox-GL canvas into an OpenLayers node results in the Mapbox canvas being slim

I follow this example but my canvas is slim. I set a breakpoint here. const mbMap = new mapboxgl.Map({ // the node has a clientWidth of 674px. container: node }) The canvas is 15px less wide. <...
2
votes
1answer
47 views

How to intersect more than 2 polygons using Turf.js?

We use Mapbox GL JS 1.12.0 in our Vue.js project. I need to create intersection objects if I have 2 or more polygons. But, I'm able to do it with 2 polygons only. The code looks as following: import * ...
1
vote
0answers
33 views

Combining Mapbox GL JS plugin with another SQLite-based plugin (Cordova)

I'm creating an App with Cordova. For this I want to use Mapbox GL JS for using offline maps and a SpatiaLite database for storing additional spatial data. The mapbox-gl-cordova-offline plugin ...
1
vote
1answer
42 views

Filtering layers displayed on map only for point layers, lineString layers or polygon layers using mapbox

I tried to use setFilter method in mapbox but this method is used to filter existing layer's features depending on specific property but not filtering all layers according to geometry In other words, ...
0
votes
0answers
68 views

Handling large shapefiles and many features( e.g > 1 million points) in Mapbox and GeoServer

I have some issues. But I want to get clarity/assistance on a fundamental one. I use GeoServer as my tile server to my client using Mapbox GL JS. Now, I have uploaded a shapefile that constitutes ...
1
vote
0answers
34 views

Accessing all layers displayed on map in Mapbox

I want to access names of all layers that I display on the map using Mapbox GL with React. Is there any specific method that enables me to access that?
0
votes
0answers
33 views

MapBox GL Style version

We are using QGIS 3.4.14 -Madeira - Vector Tiles Reader plugin (3.2.2). What version of MapBox GL style JS is used in the Vector Tiles Reader plugin? Regards, Rajesh
4
votes
1answer
94 views

Loss of vector line accuracy when exporting from QGIS

I'm new to QGIS and having a little trouble understanding why my vector lines in QGIS look sharp and accurate but when I export and then import into MapBox, the line accuracy is reduced. Vector end ...
0
votes
0answers
42 views

How to visualize traffic data in a Mapbox map?

I am trying to visualize traffic data which I have estimated using FCD data. The traffic data format is as follow : osm_start_node | osm_end_node | speed(Kmh) 113054533 | 113096757 | 54 ...
2
votes
1answer
160 views

Mapbox GL - data driven icon rotation

So I am trying to rotate map icons based on an "orientation" attribute field (which provides the bearing in degrees). I've tested this in Mapbox studio and it is working fine. When I copy ...
1
vote
0answers
12 views

Binding Popup from database to a marker

I am trying to add popup to markers from database. Markers are showing unable to add title to popup. function add_markers(coordinates) { var geojson = (saved_markers == ...
1
vote
1answer
313 views

Mapbox GL JS: Displaying polygons from different coordinate systems / projections

I'm new to GIS and have access to OS MasterMap Topography Layer data (UK). I've got it loaded into PostGIS and am querying the polygons that I'm interested in (buildings). My understanding is the ...
1
vote
1answer
426 views

Get MapBox Marker Coordinates Dynamically

I am new to MapBox and this may be a very simple solution, what I am trying to Achieve is to get the Coordinates of the marker which pops up when I search for Any Address/Location in the Search box. ...
0
votes
1answer
427 views

Creating a popup when hovering a line in Mapbox

I have a custom line in mapbox that displays a popup when you click it, how can I make it so it shows only when you hover it ? I changed from "click" to "mouseenter" but it did not ...
2
votes
0answers
37 views

How to project an image with gdalwarp to cover a Mapbox map?

I'm trying to re-project a geographical raster source covering entire world (temperature data from GFS) to Web Mercator with this command: gdalwarp -t_srs EPSG:3857 input.grib output.tif However, ...
0
votes
1answer
237 views

Unable to Load ArcGIS vector tiles to mapbox-gl-leaflet

So basically I am using the mapbox-gl-leaflet plugin to render mapbox vector tiles on leaflet map. Now I am trying to load ArcGIS vector tiles in the plugin but the vector tile is not rendering on the ...
1
vote
0answers
155 views

Render all from react component into .setHTML() Mapbox-gl-js with React

How can I Render react component inside .setHTML() whe in create popup? import PopUpClick from "../../components/Map/PopUpClick"; map.on('click', 'mapPins', function(e) { map....
1
vote
1answer
122 views

Maputnik: iso_a2 filter

I'd like to show place labels (cities and towns) only for the one country. Is it possible to achieve this in Maputnik editor? I'm looking for something like Mapbox "iso_3166_1" parameter. I'...
0
votes
0answers
69 views

Add Label to WMS layer Using Mapbox GL JS

When We add wms layer to map Using mapbox gl js to vector map multiple layer get called and multiple time wms layer url called thats why we get many wms layer so if we have label with wms layer when ...
1
vote
1answer
243 views

Mapbox Geocoder with a Leaflet map. Zoom to result, how?

I have a Lealfet map together with the Mapbox geocoder outside the map. The Geocoder and the map works. But i need to zoom to the result from the geocoder. Some code: var map = L.map('...
1
vote
1answer
31 views

Layers not appearing even after source is loaded

I have written this code to source USPS postal route data from ESRI, which is to be displayed on a map. The code works fine, the data source is also loaded, as per the console.log I put in place, ...
2
votes
1answer
933 views

How to change the icon-image on click

I am using Mapbox and I am trying to change the icon-image by clicking on it, for example I want to change this: With this when I click: map.on('load', function() { map.loadImage('./images/...
0
votes
0answers
151 views

mapboxgl full update of a layer style

I am trying to change a full-paint property for a vector layer at user request. I store these styles in a JSON, each 'paint' property for different parameters. As you can see below, some styles are ...
0
votes
0answers
61 views

Leaflet Easyprint alternative with MapboxGL

I have a logo (logoContainer) on top of my map, that i need to include in the print: mapboxgl.accessToken = '<ACCESS TOKEN>';; var map = new mapboxgl.Map({ container: 'map'...
0
votes
0answers
289 views

Load a cluster layer with vue mapbox plugin

I have a map in my client application. The map is built with Mapbox-GL and Vue Mapbox, the Mapbox wrapper built for Vue.js applications. I have a list of points that I would like to cluster. Actually, ...
1
vote
0answers
16 views

How to size clusters on a map using js

I have clusters containing population counts in a mapbox-gl map. The cluster data is based on geohash aggregations from elasticsearch. I am having trouble sizing the diameter of my clusters. They ...
0
votes
1answer
548 views

How to remove default map label of places in Mapbox GL JS?

I've added Mapbox map layer in my HTML page using following script. mapboxgl.accessToken = '***********************'; var map = new mapboxgl.Map({ container: 'map', style: 'mapbox://...
1
vote
0answers
40 views

how to put the data on the map from database

I wanted to display a polygon with the coordinated on my map and each time i click the button. This is my database: I get the data from the database with php $sql = "SELECT * FROM ...
1
vote
1answer
302 views

Using ST_AsMVT with ST_TileEnvelope clipping in mapbox

I have been searching for a while for a way to correctly project the ST_AsMVT to ensure it fits to the map. The below query was the only suggestion I found that will correctly transform to the mapbox ...
0
votes
0answers
18 views

I want to show different administrative levels within the same level

I am using Mapbox as platform and I have an issue with administrative boundaries (admin_level in OSM language). I have some areas that don't have admin_level = 2, and I want them to show their ...
1
vote
1answer
35 views

Adding a map legend to a webpage

On the web page where the map shows (using Mapbox GL) and I want to add legend. The icons in the mapbox map are in a sprite with the details in JSON. I can see the PNG sprite and JSON in the browser ...
0
votes
1answer
299 views

Set center on Mapbox GL map

I have a form HTML, e.g. like this: <form id="form" method="post" action="#"> <input class="sidebar__input" type="text" name="lat" id="latitude" /> <input class="...
1
vote
0answers
103 views

Map from video game with Cartesian coordinates in Mapbox GL JS

I want to create an interactive map in the browser from the RPG video game. I think I'm quite experienced in both backend and frontend development, so this is definitely not one of that naive ...
0
votes
1answer
93 views

Publishing a vector layer from GeoServer to use in Mapbox

I have published a vector file in GeoServer 2.15.1. How can I add this layer to Mapbox? The example in doc.geoserver.com works fine but when I use my layer in the provided format it keeps showing 404 ...
0
votes
1answer
120 views

Reproject Geoserver layer in Web Mercator Mapbox frontend

I am looking to visualise live satellite imagery in a Mapbox GL JS Fronend. There exists a Geoserver instance which has exactly the resource I want to use. However, the layer is in the wrong EPSG. ...
2
votes
0answers
56 views

How to put custom icon on polygon?

This is my code to draw a polygon on map but instead on putting a circle on each point, I want to put a image (custom icon). How do I do that? var draw = new MapboxDraw({//modifier des buttons pour ...
0
votes
0answers
123 views

Adding CQL Filters to either a GeoJSON Layer to Vector (TMS) Layer Generated Using Geoserver and to be Used with Mapbox GL JS

I am looking for the best approach to include CQL filters for use with either a Vector (TMS) layer or GeoJSON layer that is generated in GeoServer for display in Mapbox GL JS. I am currently able to ...

1
2 3 4 5 6