Questions tagged [maplibre-gl]

Questions about MapLibre GL, a community-governed collection of open source mapping libraries.

web site: https://maplibre.org/

About:

MapLibre is a community-governed collection of open source mapping libraries. Which believes in building and maintaining freely licensed libraries that enable developers worldwide to build vital tools using maps.

Motivated by the 2020 transition to proprietary licensing for Mapbox GL JS, the initial libraries are forks of the Mapbox GL ecosystem—for the web and mobile platforms.

Goal is to continue building on the foundation of Mapbox’s original open-source code under the BSD license without tracking end-users.

81 questions
0
votes
0 answers

deck.gl styles certain parts of map not others

I'm encountering a weird bug with my deck.gl map. The polygons all load, but some of them get colored in appropriately, while others don't. When I zoom into these uncolored areas, some more color appears, but when I zoom back out it goes away…
Arijit Sen
  • 26
  • 1
0
votes
0 answers

"WebGL: context lost." error in MapLibre GL JS with Tauri

I get these following errors when trying to run MapLibre GL JS in my Tauri App: [Error] WebGL: context lost. getContext (anonymous function) (maplibre-gl.js:9404) (anonymous function) (maplibre-gl.js:9405) (anonymous function)…
Kerem Nayman
  • 137
  • 1
  • 8
0
votes
0 answers

Merge an existing layer with data-CSV in MapLibre-GL

I work with Svelte, MapLibre and MapTiler. I want to build a fast choropleth-map of Germany. Problem is: I want to create a map with every german municipality, that's more than 11,000. For performance reasons I dont want to send a topoJSON to the…
piet23
  • 61
  • 3
0
votes
0 answers

_maplibreGl.default.Compare is not a constructor

I'm getting _maplibreGl.default.Compare is not a constructor error always when I try to compare two maps. part of code: var beforeMap = L.maplibreGL({ container: "before", style: "https://demotiles.maplibre.org/style.json", …
0
votes
0 answers

Change Map Language in Flutter App (flutter-maplibre-gl)

I'm quite new to Flutter / Dart and previously generated Apps using Cordova (JS). Now I'm trying to build an app with Flutter and the flutter-maplibre-gl package. I already got my map inside the app with the default MapLibre world map. Now I'm…
Hollul
  • 319
  • 4
  • 16
0
votes
1 answer

Jerky canvas animation on Mapbox map

I'm trying to animate canvas marker along the route on Mapbox map (mapbox-gl). But canvas animation looks really jerky, especially when animation is slow. Here is the example https://codepen.io/vps-dev/pen/MWzqpRx Canvas image creation: const…
0
votes
0 answers

Preventing the map labels to overlap when adding custom markers with labels in React Map GL

I'm using react-map-gl with maplibre-gl to render a map on a React application. I'm simply trying to add a custom marker with a label next to it. The problem is that they overlap with the actual map labels and symbols (see picture): The marker is…
0
votes
0 answers

How to add a marker while exporting a maplibre map while exporting to pdf

The marker is visible on the map but while exporting to pdf the marker is not getting exported. My code looks like: map.addLayer({ id: 'mapLine', type: 'circle', source: { type: 'geojson', …
vin165
  • 1
0
votes
0 answers

Any one have working with Maplibre offline maps ? If Yes then any one know how maptiles are expired?

Any option available in Android/iOS to check the expiration date of the maptiles and manually update the tiles ?I checked in SDK but it manage automatically. Any option available to update the tiles manually ? I checked in SDK but it manage…
0
votes
2 answers

Marker and GeoJSON not displaying over Maplibre map with bing maps tiles

I've created a react component to render a Maplibre map with with satellite raster tiles from Bing Maps as described here. The map renders correctly but markers and GeoJSON, are NOT displayed. I suspect it has to do with the oversimplified style…
0
votes
2 answers

No labels on my map using MapLibre GL JS (serving tiles locally)

I'm serving my own tiles using protomaps/go-pmtiles , and the tiles are getting displayed. But I'm getting no labels on the map. What I'm I doing wrong? UPDATE: I got my data from geofabrik.de, rendered them using tilemaker to .mbtiles, served them…
someone
  • 63
  • 1
  • 4
0
votes
1 answer

Single text label for a MultiLineString in MapLibre GL JS

I'm trying to display text labels for MultiLineString features in a geoJSON file using MapLibre GL JS. I'm using the symbol-placement: point option so I can see the labels on different zoom levels and not just when I get really close as it would…
Bejuco
  • 133
  • 12
0
votes
0 answers

Downloading a as a PNG gets renamed to .txt in iOS, works on everything else. What gives?

I have this code in a project: // Create a new canvas based on the Map canvas const canvas: HTMLCanvasElement = document.createElement("canvas"); canvas.width = mapRef.current?.getCanvas().width; canvas.height =…
0
votes
0 answers

MapboxGL JS / Maplibre GL - Use image from sprite in HTML tag

For my web map I have a sprite including multiple icons. I built a legend based on HTML div-elements and I would like to include some of the icons from the sprite in a simple img-tag like this: My sprite is accessible…
Robbert
  • 109
  • 5
0
votes
0 answers

flutter-maplibre-gl not show icons of POI with provided correct style.json

I am working on the map and hosting map on my own server. In addition, I also working to create my own style.json using maputnik and some manual works, and customize the icon with "sprite" as well. Moreover, I have the web app map running perfectly…