Questions tagged [folium]

A Python library for producing maps with Leaflet.js

Filter by
Sorted by
Tagged with
1 vote
1 answer
10 views

How to rename the default base map tile on Folium?

I'm creating a map in the Folium library of Python. I'm also adding an additional terrain base map tile by using the following code: import folium m=folium.Map(location=[39.084916577250254,-94....
user avatar
  • 375
0 votes
0 answers
21 views

polygon segments length as labels on folium maps

I have done this on QGIS, as shown in the screenshot, but I need the same on folium python, I have used this answer getting length of segments of polygon to generate the same but missing the part of ...
user avatar
1 vote
1 answer
33 views

Getting positional argument error

I have dataset of Covid-19 total death, cases and country name I want to add all details in map using folium model but I'm stuck. ## General Libraries for data analysis import pandas as pd import ...
user avatar
0 votes
1 answer
41 views

Folium map rendering grey squares on data loaded from geopandas frame

I have a geodata frame loaded in from census data that shows the Dutch population density per 500 by 500 meter square. I am trying to load this data into an interactive map with folium and my geodata ...
user avatar
1 vote
0 answers
55 views

Draw vector tiles on folium map [closed]

How can I have some vector tiles drawn on a folium map in Python? Or any other alternative to folium. Context: I did some filtering based on some positions of map features I fetched from Mapillary and ...
user avatar
  • 11
1 vote
1 answer
83 views

Column color based when plotting a GeoDataFrame with 'explore' method

I'd like to color the cities that belong to one hemisphere or another with the color specified at 'Color' column. All the cities of each hemisphere (each category) have the same value for that column. ...
user avatar
0 votes
0 answers
97 views

Saving map in folder for further use

I want to use my map for further offline calculations. I used the below code referred from ' https://gis.stackexchange.com/questions/313382/click-event-on-maps-with-folium-and-information-retrieval/...
user avatar
  • 1
0 votes
1 answer
320 views

Folium and heatmap is not opening in pycharm

I'm using PyCharm version 3.7. When I tried to open simple folium map I'm not getting any output. I tried something like this import folium import pandas as pd import csv dataframe=pd.read_csv("...
user avatar
1 vote
1 answer
175 views

Google Earth Engine Python Folium Map Inspector

I'm calculating the Enhanced Vegetation Index (EVI) of Sentinel-2 data on Google Earth Engine's Python API, specifically in a Jupyter Notebook. I'd like to check that the calculations are producing ...
user avatar
  • 127
1 vote
1 answer
487 views

Folium plot GeoJSON polygon with fill color based on custom values

I have polygons with lat/long values associated with identifiers in a GeoDataFrame as shown below. Consider an example with two identifiers A and B, polygon A has three points and B has four points, ...
user avatar
  • 93
0 votes
0 answers
246 views

Dynamically scale line weight in Folium (polyline or antpath)

I draw lines and ant path in folium and I need to scale width of line for example 12 km width line but I can't use simple weight because it has dynamic width that changed when zoom in or out loc = [[...
user avatar
  • 1
0 votes
0 answers
70 views

Python Folium, marker does not draw on map

I have a dataframe which is shown as follow: df X Y latitude longitude fatalCount 199 1503534.0 5139947.0 -43.88726825747297 171.799068750087 1.0 302 1764742.0 5904564.0 -36....
user avatar
1 vote
1 answer
185 views

Identifying coordinate system from dataset (without using GIS software)

I've got a CSV file which I downloaded from a Waka Kotahi open data website. The file has got X,Y coordinates of locations. I am using that file in Python to generate markers in Folium. I don't have ...
user avatar
1 vote
1 answer
80 views

Creating map of New Zealand with coordinates in Folium

I want to create a map of New Zealand in Folium Python. I want to show the map of New Zealand. Later on I will add the markers on the map. I started coding as follow: nz_map = folium.Map(location=(lat,...
user avatar
1 vote
2 answers
207 views

Extracting points from a (FIRMS)Google Earth Engine layer in Python

My goal is to extract data from FIRMS to further analyze it in a tabular data format. How can I extract those orange marks that indicate fire? Can I output them as a CSV or a pandas dataframe? I would ...
user avatar
1 vote
0 answers
113 views

Displaying polygon big data on a map with Python (Folium)

I want to plot around 90.000 polygon data (~250MB GeoJSON file) on Python. I tried to plot it with Folium, but it's really computationally heavy (CPU load and out of memory problem). I also tried to ...
user avatar
0 votes
1 answer
113 views

Page becomes unresponsive

I created a html file using leaflet to add markers to leaflet map using csv data. For parsing csv data I used papaparse. I did the same thing with python folium too and saved the output to a file ...
user avatar
1 vote
0 answers
127 views

Remove default OpenStreetMap tile layer in Leaflet - Folium?

I have multiple maps in my Folium map (map1 and map2) however, I see OpenStreetMap as the default option. I want to remove the OSM option altogether and keep just my two custom layers. If I set tiles ...
user avatar
0 votes
1 answer
40 views

Google Earth Engine_Python code error (Post-2)

I am confused by this error. I had written it on Anaconda and I am trying to run the script on GEE. I started and closed the second parentheses but the error persists. Rectify my error as I am new to ...
user avatar
0 votes
0 answers
177 views

Export Folium map as KML/KMZ

I have a Folium map with several elements such as circles, markers and polylines for routes as shown below: I have a requirement where this map can be exported as KML/KMZ file for the user. I am not ...
user avatar
1 vote
0 answers
213 views

Folium map not updating when adding Tooltip attribute in PyQt GUI

I am trying to create a geospatial Python GUI app using PyQT5, Geopandas, OSMnX, and Folium. I am converting the app into an .EXE file using pyinstaller. The app looks something like this: I am using ...
user avatar
1 vote
0 answers
52 views

Get coordinates from Folium's feature LocateControl() in Python

I have this problem. I have this to get the information from the mobile phone from folium.plugins import LocateControl m = folium.Map() # With default settings LocateControl().Add_to(m) m and I need ...
user avatar
0 votes
0 answers
59 views

Pause the folium timestampedgeojson plugin using a PyQt button

We can play the timestampedgeojson plugin over the folium map using a PyQt button but how can we pause the folium timestampedgeojson plugin using a PyQt button in PyQt GUI and without using the plugin ...
user avatar
  • 1
1 vote
1 answer
271 views

Making Loop for reading multiple Rasters in python+folium

I am a newbie in programming and wanted to ask if someone could help me with example of loading/reading multiple rasters using for loop (or maybe another alternatives to deal with multiple files?). ...
user avatar
  • 13
5 votes
0 answers
489 views

Controlling the visibility of a FeatureGroup in Folium with an HTML checkbox

I'm working on a project in Django where I want to show layers on a map by checking or unchecking boxes which I created using bootstrap. I am aware it is possible to use LayerControl to get these ...
user avatar
0 votes
0 answers
61 views

Folium Custom Map (tileset) not showing

I am aware that there is quite a few other questions and answers for this particular problem, but I have gone through and tried all of the various ways people have said to get custom maps loading in ...
user avatar
  • 1
1 vote
1 answer
5k views

How to fully customise LayerControl() in Folium?

I currently have a Folium map with this LayerControl component. Would it be possible to fully customise the layer control panel? For example, I would like it to not show the map style button saying &...
user avatar
1 vote
1 answer
224 views

map GeoPandas dataframe with folium no results

I am trying to display on a folium map a set of polygons from a geodataframe. The code returns no errors but the polygons do not appear. I have checked the projections ('epsg:3857') and the ...
user avatar
  • 85
0 votes
0 answers
988 views

Icons that do not resize in Folium

My understanding is that Folium still does not have capability to create labels for polygons. Tooltips do not work for my use-case since I can have hundreds of small polygons and I don't want users to ...
user avatar
0 votes
3 answers
1k views

Fixing this error "NoneType object is not subscriptable"

Since days and days, I could not figure out this issue. I got this error 'NoneType' object is not subscriptable. lib/python3.8/site-packages/folium/features.py The problem is at this point: layer=...
user avatar
  • 195
0 votes
1 answer
119 views

I want to hide WMS layer in Leaflet

I want to hide WMS layer in Leaflet. But in a condition, display again. I tried removelayer. But once It is removed, it can not add again. here is the relevant code (generated with folium): if (zoom &...
user avatar
  • 327
1 vote
1 answer
317 views

Issue in displaying Folium Map inside a function call using Python

I am using the following code to display folium map: import folium map_hooray = folium.Map(location=[51.5074, 0.1278], zoom_start = 11) map_hooray Using the above code the map gets displayed ...
user avatar
  • 556
3 votes
1 answer
3k views

Folium draw polygons with distinct colours

I have trouble with my assignment. I have to draw over 100 polygons from the xml file and every of them has to have other color. I don't know how to accomplish it. First I tried to draw polygons in ...
user avatar
0 votes
0 answers
708 views

Plotting Landsat Image on Folium Maps

By using the following code I am trying to plot Landsat 8 RGB image onto the folium maps. Following is the code: import rasterio as rio import folium from pyproj import Transformer ## LC08 RGB Image ...
user avatar
  • 556
1 vote
1 answer
704 views

Reset map zoom based on added layers in Folium

I have a folium map object that I am displaying in a notebook and adding layers to it and displaying again. So I want to update the zoom level of a map each time I add a layer based on the extent of ...
user avatar
  • 1,385
1 vote
0 answers
3k views

Modify GeoJSON tooltip format when using Folium to produce a map

I am producing a map using Folium. I wish to show some data using tooltips when hovering over a country. I can do this using the folium.features.GeoJsonTooltip() function and have the following result ...
user avatar
  • 111
1 vote
0 answers
48 views

Submit a form in Folium HTML Popup

In my flask application I have a folium map displayed inside an iframe. I defined a folium html popup with a form. How can I route the form? Here is my popup html code: """<!DOCTYPE ...
user avatar
0 votes
1 answer
980 views

How to identify correct key_on parameter from JSON file for Folium Choropleth

I'm trying to make a Folium Choropleth map. But I'm stuck for long time on completing it. My map shows boundaries correctly, even shows legend correctly but the map is not filled with choropleth ...
user avatar
1 vote
1 answer
1k views

Not getting different colors on Folium package

I am trying to plot some points on the map, where the points are marked based on geo-coordinates and each point belongs to a category. I am trying to set the color of the categories from the color ...
user avatar
2 votes
1 answer
263 views

Finding nearest points based on distance and the user location and display on a Folium or Leaflet map?

I want to display the nearest services points using the distance function on the Folium map. I need to pass the user location from the form and find the nearest services based on the current location. ...
user avatar
0 votes
1 answer
1k views

How can I share folium map on the web?

I have created a folium map with markers and popups in jupyter notebook and saved it as map.html I am looking for a way to share this map with others or host on the web, such that the markers and ...
user avatar
0 votes
1 answer
2k views

Inserting an URL link in marker's popup in Folium

I want to insert a live url link into my marker's popup in Python Folium but I don't know what class and code I need to use. my code is a simple one: folium.Marker(location[i], popup="www....
user avatar
2 votes
1 answer
1k views

Folium and timestamped GeoJSON issue , not reading the data correctly

I am having issues with Folium and using TimestampedGeoJson. I have the following dataframe structure below. I am trying to display this data with Folium and a time slider to be used on the date field:...
user avatar
  • 21
0 votes
1 answer
1k views

How to add data slider bar control to Folium maps

I am making a choropleth map in Folium which displays data for certain age brackets. I would like to add a double ended slider letting users select the bottom and top of the age range to view. The ...
user avatar
  • 113
1 vote
1 answer
3k views

How to change circle opacity in Folium?

I made my first choropleth map using Folium which worked quite well! However I would like to change the opacity of my circles to be a bit more opaque. How does one do this? There does not seem to be ...
user avatar
  • 113
5 votes
1 answer
1k views

Adding graticules to Folium map [closed]

Are there any chances to add grid on Folium map? Something like on this picture.
user avatar
2 votes
1 answer
4k views

Mapping multiple polygons on Folium

I have a list of of coordinates that have areas mapped out on a map Zone zone_name users distinct_users geometry 1 A 635 51 POLYGON ((13.05584728590942 77....
user avatar
  • 83
1 vote
0 answers
263 views

Adding a table to a web map made in Folium [closed]

I have made a nice Folium map however, the amount of data is small, but increasing. Right now it is grabbing a wildfire perimeter GeoJSON from NIFC and then getting points from my organization and ...
user avatar
  • 61
3 votes
1 answer
4k views

Get coordinates from Folium's feature LatLngPopup in Python

I am looking for a way to get coordinates from a marker/popup in Folium. I want to use the coordinates for further calculations. I know, that Folium is more for visualizing data and maps than getting ...
user avatar
1 vote
1 answer
2k views

How to get a Folium layer to display on top while not stopping lower layers highlight functionality

I'm trying to create a Folium map where the top layer is a boundary plot (fill_opacity: 0) of coarser structure to the Choropleth on the bottom level. I'd like the coarser level with no highlight ...
user avatar