Questions tagged [leaflet]

An Open-Source JavaScript Library for Mobile-Friendly Interactive Maps

Filter by
Sorted by
Tagged with
0 votes
2 answers
39 views

How to offset labels in Leaflet using field-based rotation & offset?

I have a small dataset displayed as points in Leaflet. Each point has 3 arrows (right, left, head) coming out of it and they are rotated based on 3 separate fields (rhead, lhead, head). i want the ...
massivedaikon's user avatar
0 votes
1 answer
34 views

SVG arrows not behaving like the other arrows in Leaflet

I have a Leaflet web map displaying 13 points and 3 arrows diverging from each point (4 layers total). The map was exported from QGIS via QGIS2Web. I'm using placeRotatedSymbol() to place the arrow ...
massivedaikon's user avatar
1 vote
2 answers
35 views

Error when using CRS 32718 in Leaflet

I'm trying to specify the CRS 32718 with Proj4Leaflet to a Leaflet map but I'm getting an error: "ERROR TypeError: coordinates must be finite numbers" My code is following: var crs = new ...
Javier Aguilar's user avatar
0 votes
0 answers
29 views

Viewports for nested iframes when used on a mobile device [closed]

I have a parent page with a number of tabs. Two tab divs contain Leaflet maps in iframes; both are fullscreen but map one has HTML buttons overlaid on the map, map two just uses Leaflet elements. A ...
perplexed's user avatar
0 votes
1 answer
39 views

Offset & anchor field-based arrow SVGs in Leaflet

I have a leaflet web map displaying 13 points and 3 arrows diverging from each point (4 layers total). The map was exported from QGIS via QGIS2Web. all layers (including points) have exactly the same ...
massivedaikon's user avatar
1 vote
1 answer
47 views

Converting geography x, y values from vector tiles data to lat long in Leaflet

I am using the following map for India (https://data.maptiler.com/downloads/tileset/osm/asia/india/) and serving it via a server to send pbf files. The map shape is rendering correctly, and I want to ...
KARTIK TIWARI's user avatar
0 votes
0 answers
23 views

Convert default coordinate system React-Leaflet

I'm trying to make a request from the NASA satellite, but when I use 3857 it doesn't show the region I want, and in 4326 it does. That's the problem, when I use 4326 it moves on the map and I can't ...
Felipe L's user avatar
0 votes
0 answers
47 views

How can a request be started with Leaflet Routing Machine with one waypoint?

If a round trip is compiled with the Leaflet Routing Machine and lrm-openroutservice, this is not fired as the Leaflet Routing Machine requires a start and an end point => two waypoint. ...
Severin's user avatar
1 vote
1 answer
33 views

Make Leaflet geocoder search marker open popup containing GeoJSON data

The following JSFiddle uses Leaflet and leaflet geocoder control search plugin. Code below HTML: <div id="map"></div> CSS: #map { height: 100%; position: ...
Discover's user avatar
2 votes
1 answer
62 views

River network WMS layer not showing in Leaflet map

I am trying to display a map of European river network on a Leaflet map, using as data source the EUHydro layer published by CLMS (here is the webpage, and the WMS GetCapabilities document). Here is ...
tvoirand's user avatar
  • 296
0 votes
1 answer
46 views

leaflet-simple-map-screenshoter cannot load custom tiles because of CORS error

If I try to make screenshots with my custom tiles, I am getting CORS errors. If I use mapbox or openstreet map tiles, I don't have any issues. I don't get any errors if custom tiles are used in ...
Matt's user avatar
  • 95
-1 votes
1 answer
49 views

Seeking Leaflet printing library that is flexible (not browser print)

I'm a junior developer and I've been tasked with updating the leaflet part of the website. Do you know a good printing library where I could just export the map shown on the screen and manipulate it a ...
François Poulin's user avatar
1 vote
1 answer
92 views

Offsetting rotated arrow SVG markers in Leaflet (exported with QGIS2Web)

I have a map exported from QGIS (3.34 Prizren) as leaflet via QGIS2Web plugin. The map has 3 layers (identical data) but 2 are displayed as arrow SVG markers and 1 is displayed as points. Left arrows ...
massivedaikon's user avatar
1 vote
0 answers
64 views

gdal2tiles-leaflet producing bad tiles

I am using gdal2tiles-leaflet in an attempt to generate a tileset for a map renderer I'm working on, however, the resulting tileset appears to be completely misaligned and won't render properly in ...
stix's user avatar
  • 111
1 vote
0 answers
57 views

Rendering Performance CloudOptimizedGeotiff Band calculation

Displaying this 4 band 16int COGTIFF file size approx 4GB in leaflet via https://cms.geo.admin.ch/Topo/umweltbeobachtung/satromocogviewer.html?url=https://data.geo.admin.ch/ch.swisstopo.swisseo_s2-...
scriptDaddy's user avatar
2 votes
1 answer
83 views

How do I modify S57 data converted using ogr2ogr so that it correctly exports on qgis2web?

I have some unencrypted ENC charts with file extension .000 (S57 data). Using the process and S52 styles at https://www.sigterritoires.fr/index.php/affichage-des-cartes-marines-s57-dans-qgis/ I have ...
James Davies's user avatar
2 votes
2 answers
145 views

Customizing layer control with CSS classes in Folium Leaflet?

I am working with creating a folium map within streamlit. I like the ControlLayer() functionality that folium provides, but I would like to be able to customize it a bit more. I found this comment ...
Binx's user avatar
  • 1,350
1 vote
1 answer
38 views

Map moves every time a marker is added in ipyleaflet

I am trying to create a map that is updated continuously with received data and I have a problem. the map moves every time a new marker is added and it is making it useless as it should be zoomed to ...
Shane roar's user avatar
1 vote
1 answer
76 views

Showing there are multiple features with the same point location using Leaflet while maintaining ability to filter data

I have a dataset of training sessions provided at various sites in Greater Manchester. The training sessions have different names, but in many cases, the sites may be the same. Here is a short example ...
Chris Pope's user avatar
3 votes
1 answer
82 views

Leaflet offset of tiled layer WMTS layer

Adding in Leaflet a WMTS layer with the 'L.tileLayer' to a COG Tiff results in an offset. Both services are in the same EPSG:2056 system This code <html> <head> !-- Version 2.0 --> &...
scriptDaddy's user avatar
1 vote
0 answers
53 views

Leaflet maplibre gl use custom CRS

I need to use CRS 2056 with leaflet and maplibre leaflet-maplibre-gl.js to display vector tiles. Using this code <html> <head> !-- Version 3.0 --> <!-- full stretch --> &...
scriptDaddy's user avatar
1 vote
1 answer
62 views

Leaflet and maplibre remove a layer from a vector tiles style set

Using maplibre-gl-leaflet I want to load an existing vector tiles styles from style.json and remove its background raster layer with the id "swissimage" and then add a raster dataset URL ...
scriptDaddy's user avatar
0 votes
0 answers
34 views

Geocoder search with autocomplete GeoJSON properties data in Leaflet Map

I'm using L.Control.geocoder to search my map by address and coordinates, but I wanted to do an autocomplete search using data from the GeoJSON properties.Nemesis file. Is it possible to add this ...
Cesar Fonseca's user avatar
-2 votes
1 answer
104 views

How to use AJAX request to filter WFS data?

I want to create a mash-up that shows sites in Italy on a basemap. With the AJAX call I want to include the number of earthquakes within a certain distance to each site. I want to use the AJAX call ...
Alm's user avatar
  • 83
1 vote
1 answer
54 views

Gamma correction of Sentinel-2 imagery using Leaflet

Image Stripes after applying a Gamma correction after normalization with this Sentinel2, 4 Band DN using Leaflet (Complete Code) with this code: <body> <div id="map"></div&...
scriptDaddy's user avatar
1 vote
1 answer
103 views

COG TIFF multiband in Leaflet

I am attempting to display a 4-band Sentinel image where the RGB bands are the first 3 bands, each represented as uint16. Reason: Currently viewers like COGEO tinyurl.com/3jy9jjcy do stretch each COG ...
scriptDaddy's user avatar
1 vote
0 answers
47 views

Converting Leaflet polygon to GeoJSON?

I have the following piece of code of my Leaflet application (Typescript): getPolygonMarker(): GeoJSON { let itemShape: any = [ wktToGeoJSON(item['contour'],) ]; const p = new ...
smartmouse's user avatar
3 votes
1 answer
96 views

AJAX calls for leaflet

I want to create a mash-up showing sites on a basemap as I did in the first part of my code. With the AJAX call I want to include earthquakes so that the pop-up of each site shows its name However, I ...
Alm's user avatar
  • 83
1 vote
1 answer
123 views

Are lines drawn on most web maps wrong? [closed]

Lets imagine a shortest path (on the surface of earth ellipsoid) between CA, US and Greenland. Also lets add a point on the middle of that path. If we now draw the path as a line on a map using ...
ristiisa's user avatar
1 vote
2 answers
73 views

Leaflet - Customer Tile Cache Scheme Review, Munich

I am interested in user-specific tiling schemes and serverless display with Leaflet. I have come across problems that I cannot solve on my own. There are older requests in the forum for the display of ...
Christian Naujoks's user avatar
0 votes
0 answers
40 views

How to set iconAnchor at the center of markers icon?

The following is how I can center the markers icon with given size. L.marker(center, { icon: L.icon({ iconUrl: `<my-custom-icon.png>`, iconSize: [17,36], iconAnchor: [...
smartmouse's user avatar
2 votes
1 answer
158 views

Find correct URL for WMTS Time layer for Leaflet

So I have this WMTS-Layer (the GetCapabilities Request): https://wmts.marine.copernicus.eu/teroWmts/GLOBAL_MULTIYEAR_WAV_001_032/cmems_mod_glo_wav_my_0.2_PT3H-i_202112?request=GetCapabilities& ...
Lenn's user avatar
  • 1,273
1 vote
2 answers
91 views

Leaflet custom layers: how to make them to be combined by user?

I have created a Leaftlet map in an Angular project, using an extended version of tileLayer WMS class: export class ExtendedWMS extends TileLayer.WMS { constructor(baseUrl: string, options: ...
smartmouse's user avatar
0 votes
1 answer
82 views

Display vector tiles (PBF) in Leaflet after exporting from QGIS

Loading a vector tiles in leaflet with leaflet.vectorgrid I'm getting Error: unknown command 4 core code that fails: var pbf_testSlope = new L.vectorGrid.protobuf('https://myx.ch/test/...
Beni's user avatar
  • 358
0 votes
1 answer
59 views

Install Leaflet plugins in Python based environment for web GIS building purpose

I am in the middle progress of building a webgis that utilize python Flask as backend and Leaflet to build the maps. I can still manage until the step where I implemented the vanilla Leaflet and just ...
duns's user avatar
  • 13
0 votes
0 answers
74 views

Integrating ERDDAP with Leaflet

I have deployed a ERDDAP server on a AWS machine, which has multiple datasets, each of which contains multiple NetCDF files. I'm trying to develop a JavaScript interface, using Leaflet, so that I can ...
Hugo Gómez's user avatar
1 vote
1 answer
51 views

Get events fired for all objects in a protobuf layer when clicked on in Leaflet.VectorGrid?

I am using Leaflet.VectorGrid to display a Vector Tiles layer that is loaded from pbf tiles from a tile server. <html> <head> <title>Vector Map</title> <body> <...
user3147507's user avatar
0 votes
1 answer
81 views

R Leaflet map: set minimum radius size

I have an R Leaflet map showing cicles to mark the locations of industrial facilities. Some of these facilities have been assigned a risk score in the data ("RSEI_Score"), and others not (...
Brian Holmes's user avatar
1 vote
1 answer
36 views

Extracting line coordinates with Leaflet and VectorGrid

I'm using a map display in Leaflet and polylines using Leaflet.VectorGrid. By clicking on a line I want to export the coordinates of this line. var layerGroup12 = L.vectorGrid.slicer( pistes,{ ...
Manard82's user avatar
  • 187
1 vote
1 answer
53 views

Popup event for specific GeoJSON layer in Leaflet

Consider the following Leaflet map construction, which utilizes tiles from OSM and plots two GeoJSON files. The first GeoJSON file is derived from a multipolygon shapefile and the second GeoJSON file ...
TornadoEric's user avatar
1 vote
1 answer
79 views

Multi-layer control filters with more than one feature.properties option selected

I´m using the groupedlayers with empty "dummy" layer groups that are only used to enable or disable filters for the GeoJSON layer when selected/unselected in the layers control. Layers ...
Cesar Fonseca's user avatar
0 votes
0 answers
39 views

Get getFeatureId from a VectorGrid.Protobuf layer on click event

The vector Tile come from geoserver. I want to get the id when I click it and use it to send WFST to geoserver (WFST requires fid). var vectorTileOptions = { ...
andy's user avatar
  • 1
2 votes
1 answer
71 views

Recolour all pixels of a specific colour in an image overlay in Leaflet

I have an image approximately 8000x4000 pixels which I want to plot using leaflet. This image is broken up into blobs of unique colour, each representing a region. Here is an example of part of the ...
Joshua Kidd's user avatar
0 votes
0 answers
36 views

Using OSMBuildings in Vue.js with Leaflet

I am currently working on building a GIS system using Leaflet in Vue.js and am attempting to integrate OSMBuildings to incorporate 3D models. However, it seems that OSMBuildings does not have a ...
andy's user avatar
  • 1
1 vote
2 answers
92 views

Fetch GeoJSON once and display on different styles on Leaflet map?

I want to add a province layer to Leaflet map, which fetched from 4 php for different UTM zones. The corresponding sql table has promotion and population and density columns. I want to fetch the ...
Solmaz's user avatar
  • 149
2 votes
1 answer
131 views

Leaflet in R mangling terra RGB rasters

I'm working with an RGB raster in leaflet (some Landsat data). I'm stretching and sampling it down so that it's small enough. The following works great. # stretch and then resample like ...
jebyrnes's user avatar
  • 473
0 votes
1 answer
61 views

Link images in QGIS map for qgis2web Leaflet export published on GitHub?

When I open the index.html file (from the qgis2web export) with my browser (locally) all my images are properly displayed. However, after uploading my web map files to github and publishing it with ...
elsek's user avatar
  • 3
1 vote
1 answer
242 views

Side-by-side Leaflet map - How to add an array of layers to show on one side?

I want to create a side-by-side leaflet map and I use the resources available on github (https://github.com/digidem/leaflet-side-by-side). I have downloaded the code locally and I have created a map ...
Ilias Machairas's user avatar
1 vote
1 answer
119 views

Increasing size of chart inside pop-up window - Leaflet - d3.js?

I have created a chart inside a pop-up window for a marker on leaflet javascript. I am new to html, css, and javascript. I have also used d3js for the plot. The problem is that I cannot increase the ...
Ilias Machairas's user avatar
0 votes
0 answers
130 views

Speed up loading large GeoJSON layers to Leaflet map?

I have some GeoJSON data layers which I fetch their features from phpMyAdmin to display on a Leaflet map. But loading the features takes almost 10 seconds to be loaded. Have you any solution to speed ...
Solmaz's user avatar
  • 149

1
2 3 4 5
84