Questions tagged [folium]

A Python library for producing maps with Leaflet.js

Filter by
Sorted by
Tagged with
0
votes
0answers
30 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 ...
1
vote
1answer
40 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?). ...
3
votes
0answers
37 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 ...
0
votes
0answers
26 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 ...
1
vote
1answer
451 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 &...
0
votes
1answer
48 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 ...
0
votes
0answers
255 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 ...
0
votes
1answer
317 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=...
0
votes
0answers
33 views

Add ArcGIS MapServer in a Folium Map

WMS can be added to Folium Maps. Similarly, is there a way to add ArcGIS MapServer in Folium Map as a layer? For example, I want to add this server to the Folium map https://ags02.sec.usace.army.mil/...
0
votes
1answer
50 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 &...
0
votes
0answers
37 views

Create a folium map with a pop up window appearing when clicking a shapefile feature

I'm trying to create a folium map that will have the following features: A layer will be created from a shapefile including multiple polygon features. When clicking on a single feature a pop up ...
1
vote
1answer
45 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 ...
2
votes
1answer
729 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 ...
0
votes
0answers
212 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 ...
0
votes
0answers
45 views

Folium plugin to reset map to its original zoom level

Is there a folium plugin that adds a button to the map which on click reset/refresh the map back to its original position? When a user pan to a different position, he can click the reset button, ...
0
votes
1answer
79 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 ...
1
vote
0answers
981 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 ...
1
vote
0answers
21 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 ...
0
votes
0answers
217 views

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

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 ...
1
vote
1answer
307 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 ...
0
votes
0answers
73 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 ...
0
votes
1answer
197 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 ...
0
votes
0answers
92 views

How to toggle Folium background map

I would like to hide/display the map when clicking somewhere. Does Folium have any parameters for that? folium.Map(location=[48.86088, 2.33765], zoom_start=8)
0
votes
0answers
47 views

How to integrate and plot both heatmap and quivers/arrows for different timestamps using folium?

I want to plot wind velocity heatmap and wind direction quivers together for different timestamps on top of a map using folium. I could not find any plugin for this integrated operation. Can you ...
0
votes
1answer
577 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....
2
votes
1answer
558 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:...
0
votes
1answer
563 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 ...
1
vote
1answer
1k 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 ...
0
votes
0answers
197 views

Adding Folium GeoJsonPopup to a function

I have created a a function to create a Folium map that has colors scales based on the value, I am trying to add a option so that when I view/click and that region I could get a popup with the value ...
0
votes
0answers
171 views

Overlay a Raster on an Interactive Map in Python

I would like to know how I can overlay any raster created from a satellite product over an interactive map. This raster can be a single layer raster like a classification map or a RGB as shown below. ...
4
votes
1answer
563 views

Adding graticules to Folium map [closed]

Are there any chances to add grid on Folium map? Something like on this picture.
2
votes
1answer
2k 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....
1
vote
0answers
127 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 ...
3
votes
1answer
2k 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 ...
1
vote
1answer
943 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 ...
0
votes
1answer
681 views

Different Leaflet / Folium markers for different zoom levels?

I'd like to use, say, a circle or map pin when zoomed out, and for this to change to a polygon / shapefile when zoomed in (specifying the zoom level at which the change occurs). Can Leaflet do this?
2
votes
1answer
3k views

`folium.GeoJson` displays all polygons in GeoDataframe but not individual ones

folium.GeoJson displays all the counties of New York State: import geopandas as gpd gdf = gpd.read_file("Counties_Shoreline.shp") m = folium.Map(location=[43.062776, -75.420884], tiles="...
0
votes
1answer
58 views

geemap doesn't display attributions

Is it normal that geemap doesn't display attributions in my notebook? Is there a way to add them? I'm running : import geemap m = geemap.Map(center=[40,-100], zoom=4) m.add_basemap('CartoDB.Positron')...
2
votes
0answers
500 views

Folium, make legend disappear when switching layer (LayerControl)

I created some legends in a map using Folium and Python using the html example by InLaw(1) in this answer. From that answer, I also manage to get this legend using a MacroElement from Branca (2), ...
0
votes
1answer
1k views

Coordinate System Mismatch In Folium

I'm trying to get familiar with Folium library in Python. I wanted to make a web-map of Turkey. Framework uses EPSG:3857 Web Mercator CRS as default. I tried to use approximate coordinates at the ...
3
votes
1answer
5k views

What are Folium style_function parameters

I'm trying to do a uniform style for each polygon, but I want to know further about what I can do with Python library Folium Style_function. What can I put in the style variable? Where are the ...
1
vote
0answers
2k views

Specifying legend location in folium

I have a few choropleth maps in one Leaflet map using folium. However, in my output, my legends all congregate underneath one another and on one side where it blocks the 'control zoom' icon. Is there ...
0
votes
1answer
491 views

Collection asset not found

I am using this code BANDS=['B1', 'B2', 'B3','B4', 'B5', 'B6', 'B7'] area = ee.FeatureCollection('ft:1GxT2Q22KIGDjLFY1J11IX8lTAQPIoNyvBsG2fX0') collection = ee.ImageCollection('LANDSAT/LC08/C01/T1_SR'...
1
vote
1answer
3k views

How can I overlay text on a map, without a marker or textbox, using Folium?

I want to place text anywhere, as though it were part of a tile, no text box around it, and "shown on opening" (ie, show=True). I don't see any text overlays in the documentation: https://python-...
1
vote
1answer
262 views

How do you create a "donut hole" / cut-out-effect using folium?

I've tried adjusting parameters and changing the order in which these circles are added. I can't get the interior circle, or "hole", to remain transparent. The outer circle always predominates. m = ...
0
votes
0answers
55 views

Using Folium to visulize PCA image raise "Error expected type string, actual type long,actual value 1

This is how I get the PCs at the specified scale and in the specified region: # Get the Principal Components (PCs) pcImage = getPrincipalComponents(centered, scale, region) #this return PCA image #...
0
votes
0answers
419 views

Specifying shapefiles for clusters and subclusters using Folium's MarkerCluster

For example, I'd like to zoom from country, to states, to counties. I don't see this option in the docs: class folium.plugins.MarkerCluster(locations=None, popups=None, icons=None, name=None, ...
1
vote
1answer
539 views

Visualising layer properties of a GeoJSON polygon layer in Leaflet

In a Leaflet GeoJSON polygon layer, I want a popup information box, showing attributes of each of the polygon properties. So the final output should show the Country Name, Area, Population etc ...
1
vote
1answer
3k views

Adding circle polygon to folium map (using OGR and Python) creates an oval - why?

I am new to OGR and Folium but learning fast. In short, I have an issue which I think might be a projection problem. Basically, I have three circles plotted in folium that work fine. Then I have a ...
0
votes
0answers
49 views

What factors need to be considered to decide the radius of a bubble map or is there a generic formula?

I recently started with GIS and I am learning as I go about implementing things. Take the case of JHU Dashboard or the first world map in this NYT article or the maps in this Guardian article, what I ...