Questions tagged [leaflet]

Leaflet is an open-source JavaScript library used to generate mobile-friendly interactive maps.

Filter by
Sorted by
Tagged with
1 vote
0 answers
17 views

Filter and display dropdown based on data from API call

I have two functions: one fetch the API and get back the data (async function) the other use this data to filter and display information (dropdown function) The problem is the drop down function is ...
user avatar
  • 111
2 votes
0 answers
312 views

Create a map where countries can be selected using react-leaflet

I've only just started learning javascript and decided to try and make a simple app where individual countries can be selected, highlighting them, and the name appearing in the top corner. The code ...
user avatar
  • 63
0 votes
2 answers
68 views

Optimizing large WP Query [closed]

I have WP Query like this: ...
user avatar
  • 3
2 votes
2 answers
165 views

Speed up javascript code to convert csv to geojson

I'm using a script that converts a CSV file into GeoJSON in order to display it on a map. You can see it for yourself here. The CSV has about four thousand rows. It's quite slow. I'm wondering what is ...
user avatar
  • 121
4 votes
1 answer
30 views

Simple marker rendering

I am trying to render in a leaflet map that should render a single marker. I am building the JavaScript as follows. build the map an even listener for when the user opens the page where the map is ...
user avatar
1 vote
1 answer
73 views

Leaflet map distance from the onclick marker

Here is the part of working code: ...
user avatar
  • 259
2 votes
1 answer
64 views

Setting zoom for layer disappearance in Leaflet

I have got 2 working codes, where one is a bit longer and another a bit shorter. Is it some way to bind all these layers as a one group? The first one is: ...
user avatar
  • 259
2 votes
1 answer
317 views

Loading KML files into leaflet Javascript map

This is working code for input KML files into leaflet map ...
user avatar
  • 259
4 votes
2 answers
133 views

Toggling visibility of layers on an interactive map

I am creating an interactive quad(heat) map of USGS Quadrangles wherein each quad has 12 different attribute fields CSV attached to the JSON using papa.parse. ...
user avatar