Podcast #128: We chat with Kent C Dodds about why he loves React and discuss what life was like in the dark days before Git. Listen now.

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
1answer
149 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 "...
3
votes
1answer
327 views

Turfjs default es6 import fails

I'm trying to use Turf distance and Turf point with Mapbox GL JS. I've installed @turf/distance from npm which also installs @turf/helpers. I see that distance has a default export exports.default =...
0
votes
0answers
111 views

QGIS2WEB with omnivore

I've used QGIS2WEB to output a leaflet map, all of which works well. It's a simple map showing markers, I want the markers to update based on a csv which is updated daily. Omnivore looks like my ...
1
vote
1answer
588 views

Can ArcGIS Server render Mapbox Vector Tiles?

I am planning to build an application using Mapbox GL JS. All the data sources I need to import are stored on an ArcGIS server 10.5. There are several feature layers on this server which I'll be able ...
1
vote
1answer
455 views

GeoServer WMS service CQL filter query with Mapbox GL

Is there any way to query WMS tile layer for Mapbox GL? map.addLayer({ 'id': 'wms-test-layer', 'type': 'raster', 'source': { 'type': 'raster', 'tiles': [ '...
0
votes
0answers
619 views

How to animate a line-stroke property in MapBox GL

I'd like to add a style property to a line that invokes flow. For example, a flowing river or a fiber optic line carrying data. Can anyone suggest how to create this sort of effect on a line in MapBox-...
1
vote
1answer
2k views

How to enlarge the marker on mouseover in mapbox gl js

i have 3 markers and when i hover on the marker, i want the marker to get enlarged. can anyone help me to solve this. I had tried to change the pointer on mouseover but not getting how to enlarge ...
0
votes
1answer
526 views

query features from a bounding box bigger than viewport mapbox gl js

I made a map for a local game and seem to be stuck. The map is filtering features, but only from the current viewport. As the map I would like to use is only 6km square, I would like to query, not ...
4
votes
1answer
2k views

Alternative to Tippecanoe for generating Mapbox vector tiles on command-line

Tippecanoe is the tool I always use for converting Shapefiles/GeoJSONs to Mapbox vector tiles in PBF format, for rendering in Mapbox-GL-JS. But it doesn't seem ideal: its primary use case seems to be ...
0
votes
1answer
82 views

Purpose of filterEl.addEventListener('keyup', function(e)

I'm learning the mapbox gl js examples and have trouble understanding a function. The function can be found here https://www.mapbox.com/mapbox-gl-js/example/filter-features-within-map-view/ it's in ...
0
votes
1answer
592 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. ...
1
vote
0answers
104 views

Geoserver sending BigDecimal data as String in vector tiles

Setup details: Geoserver: 2.12.1 DataStore: PostgreSQL 10.1 with PostGIS 2.4.2 mapbox-gl: 0.42.0 I am using mapbox-gl to render vector tiles from geoserver using TMS. I am styling the tiles using ...
0
votes
1answer
168 views

Where is data coming from Tilevector or mapstyle

I'm struggling to use the data that's in a vector tileset source (PortalsWithOrderNr) I commented out the add.source and add.layer but when I click on a portal I get most of the data that's in the ...
3
votes
1answer
2k views

Get properties data from MapBox vector tile source

I struggle with getting data from a MapBox Vector Tile source or MapBox DataSet. I found the example page from MapBox GL JS. The goal is to let users put in a number (1-24) in a input field, this ...
1
vote
0answers
149 views

Combining (merging) neighbour points to one centred point in PostGIS (reducing density)?

I'm new to spatial algorithms and PostGIS functionality. Currently I have a Pg 10 + Postgis 2.4 database with table of more than 400 000 records (points with additional properties), with Node.JS tile ...
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
2answers
2k views

How can I grey all outside a country border in Mapbox GL JS?

I have klokantech docker container for openmaptiles. Now I want take the KML of the country border and grey all outside the country.
2
votes
1answer
460 views

Turf Envelope returns 5 array coordinates for rectangle polygon

I'm trying to understand why turf.envelope() returns 5 coordinate arrays. I'd expect to see only 4. Is this normal/expected behavior? I ask because I'm currently trying to debug an issue I'm having ...
1
vote
1answer
443 views

Mapbox GL JS compressed GeoJson files?

I am currently using Mapbox GL JS and pull multiple GeoJson files from the style.json file. Each file in about 10MB and takes too long to load. Is there a way to compress the files and uncompressed ...
3
votes
2answers
1k views

geojson to mapbox vector tile in nodejs

I'm looking for a way to transform geoJson (obtained from a query to potsgis) to mapbox vector format, serverside in nodejs, without using mapnik (I dont have access to the server and therefore cannot ...
1
vote
0answers
134 views

Mapbox-gl offline openmaptile font not shown

I'be downloaded a mbtile file related to rtl countries and used it as an offline source for Mapbox-gl server. All stuff are shown correctly except labels that have rtl characters. Even ltr characters ...
2
votes
1answer
1k views

Building an interactive web map that displays table data in a static portion of the page separate from the map?

I am trying to build an interactive web map to display the results of my master's thesis. Basically, it is a shapefile of line segments that have each been assigned to 1 out of 8 categories. The ...
3
votes
1answer
804 views

Self hosting vector tiles

I'm building a web application, which involves (currently) a REST backend and a frontend SPA. The backend is hosting massive geo-enabled data, and the frontend is displaying it on a mapbox map. I'm ...
1
vote
2answers
268 views

MapBox GL JS popups for the 0.18.0 version?

I've this sample code using MapBox GL JS in which I load a GeoJSON point layer and I define the popup structure when the user clicks on point to show information details ... <html> <head>...
1
vote
1answer
1k views

How to access map-box fill-extrusion layers to apply hover effect/popups

I am looking for a way to create a hover effect on a fill-extrusion layers I have replicated the demo at: https://www.mapbox.com/mapbox-gl-js/example/hover-styles/ [this is on flat shapes] The I ...
1
vote
1answer
743 views

MapBox get div element of Marker

Apologies for cross-posting - I have also asked this on StackOverflow... I am initially pushing MapBox Marker objects to an array via: var el = document.createElement('div' + index); el.className = '...
1
vote
1answer
1k views

Combining popup info from overlapping polygons in Mapbox GL JS

I've tried several solutions, but I'm having trouble populating a popup with information from overlapping polygons. When there are polygons that overlap, I want to drill down and pull the names from ...
1
vote
0answers
39 views

Geocoder / Fly Map Problem

I'm a little stumped with this issue that I'm having.. I have a large zip code map (the whole U.S.) with a Geocoder. When I do a search for a particular zip code, and press enter or select it, the map ...
2
votes
0answers
606 views

Mapbox GL checkbox menu

I am trying to toggle layers and legends using a checkbox menu. I'm able to toggle the bathroom and sq ft legends, but I'm not sure how to identify the layer layout in order to toggle it. Here is my ...
0
votes
1answer
891 views

how to pass coordinates to a variable from a geojson source in mapbox gl

I tried with this code but it wont load the coordinates.the source is fine because it appears in the map when i added it.. map.addSource("villa-route-source",{ type: "geojson", data: "https://api....
3
votes
0answers
223 views

Supercluster and vector tiles

I am trying to take a set of points, use supercluster to create an index, and query that index for vector tiles. Things mostly work as expected, but when the tiles are loaded into Mapbox GL JS they ...
1
vote
0answers
397 views

Mapbox gl : How to perform a filter in a polygon?

I want to make a filter on the geometry of my layer source vector. var polygone = ..... var filter = polygone.reduce(function (memo, coord) { memo.push(coord); return memo; }, ['in', '$...
1
vote
0answers
175 views

Mapbox GL JS and GeoJson Files [closed]

Currently, I am creating GeoJson files using QGIS and render them in Mapbox GL JS. I create 10 GeoJson files for each map. I am wondering what is the best practice to render the files in Mapbox GL JS. ...
1
vote
0answers
297 views

mapbox gl- Toggle highlighting of specific feature of a layer in map style

I tried it with "Setpaintproperty" and "data driven functions" but I dont know the exact syntax.. map.on('mousemove', function(e) { var states = map.queryRenderedFeatures(e.point, { ...
5
votes
1answer
5k views

Removing events map.on(“click”…) from mapbox gl?

I am removed the layers with map.removeLayer("clusters"); but got this error evented.js:111 The layer 'clusters' does not exist in the map's style and cannot be queried for features. as I have ...
2
votes
2answers
475 views

Mapbox-GL-JS styles that use Mapzen's vector tiles

Are there any complete, public, styles in Mapbox-GL/JS format that use Mapzen's vector tiles? The only one I can find is Mapzen's own effort but it doesn't look like much effort has gone into it, it's ...
2
votes
0answers
418 views

Vector rendering issue using Mapbox-gl & GeoServer vector tiles (pbf)

I am rendering a vector line in the browser using mapbox-gl. The layer is being served using GeoServer as a pbf vector tile. The rendering issue is happening at most zoom levels and it is happening ...
0
votes
1answer
233 views

mapbox studio large shapefile dataset

I have a very large shapefile with 130 columns. I'd like to extract this into 130 layers in mapbox studio. To do this I have split into three files and uploaded them as tilesets. But as a tileset I ...
2
votes
1answer
74 views

Using mapbox to implement lighting effects?

I use mapbox.gl.js + postgrepsql+mapnik+ mapbox vector tile; this is my map: but I want this, The point of overlap is brighter:
4
votes
0answers
718 views

mapbox styling of vector tiles with many features in openlayers 4

I am trying to process a vector tile source in OpenLayers using the VectorTile layer and source in OpenLayers 4.1. The backend is serving pbf (mvt-based) tiles from an mbtiles source. The tiles have ...
0
votes
1answer
4k views

How to center a MapBox GL JS map at the point coordinates from a point edited with MapBox-GL-Draw plugin

I'm using MapBox GL JS and the mapbox-gl-draw plugin in a simple MapBox map .... here you're the code ... <html> <head> <meta charset='utf-8' /> <title></title> ...
0
votes
2answers
3k views

turf js union with array of features

I am using Mapbox GL JS and querying a source on a common ID. var tempId= 55; var relatedFeatures=map.querySourceFeatures('featureSource', { sourceLayer: "sourceLayerId", filter: ['in', "...
1
vote
1answer
2k views

Adding marker to MapBox GL JS map?

I'm trying to add a marker to a MapBox GL JS map ... Here you are my code <html> <head> <meta charset="utf-8"> <title>Test MapBox</title> <!-- *** ...
3
votes
4answers
4k views

Mapbox GL JS - “Source Loaded” event

I'm adding a vector tile source to my Mapbox GL js map like this: this.map.on('load', () => { this.map.addSource('userSource', { type: 'vector', url: 'mapbox://&...
0
votes
2answers
3k views

Mapbox GL geocoder autocomplete

I am trying to to create multiple input autocomplete search fields that function same as the demo at https://www.mapbox.com/mapbox-gl-js/example/mapbox-gl-geocoder/ . However, I do not want the ...
6
votes
3answers
2k views

Mapbox open source possible?

New to this, but played with Mapbox. My interest lies in creating really good looking slippy maps, I am a web developer so I am interested in both the creation and interacting with the data using a ...
3
votes
2answers
4k views

Mapbox Vector Tiles from Geoserver 2.11 in Mapbox GL JS

I am running Geoserver 2.11.0, have installed the vector tiles extension and enabled the application/x-protobuf,type=mapbox-vector tile format. Requesting vector tiles from my server using OL3 works ...
1
vote
1answer
1k views

Mapbox GL Js: what is the sourceID?

The documentation for Map.querySourceFeatures says it takes a parameter for sourceID - the ID of the vector tile or GeoJSON source. In their example, they add a source manually: map.addSource('...
0
votes
1answer
302 views

MapboxGL JS fill-extrusion outline

I checked the API doc, there seems to be no fill-extrusion-outline property exist. Basically is to change the outline color of the 3D extrusion. Is there a way to do that?
1
vote
1answer
498 views

MapboxGL Mapbox streets v7 street layer name

See this example: https://www.mapbox.com/mapbox-gl-js/example/color-switcher/ It styles the water layer and building layer with different colors. I was wondering is there a layer for the "streets" ...