Questions tagged [folium]

A Python library for producing maps with Leaflet.js

Filter by
Sorted by
Tagged with
-1
votes
0answers
13 views

How make grid on map in Folium?

I need make grid 500 x 500 meters in Folium. I tried change this code: https://www.jpytr.com/post/analysinggeographicdatawithfolium/ My code bellow: def get_geojson_grid(lower_left, upper_left, ...
0
votes
0answers
8 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
33 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
16 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
18 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
39 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
47 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
14 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
17 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 ...
0
votes
0answers
68 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
15 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
27 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
18 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
17 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
38 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
49 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
21 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
102 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
0answers
286 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
306 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
540 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
78 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
128 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. ...
3
votes
1answer
332 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
846 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
84 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 ...
0
votes
0answers
72 views

How can I include HTML Audio in a Folium Marker popup?

I need to insert a audio HTML format, so when the people click in the marker, the popup will be a audio to listen. Is it possible?
3
votes
1answer
853 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
610 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
0answers
96 views

Updating folium changed the outlook of Popup box

Recently I updated folium and noticed some changes to the popup box. With the new update the popup box seem to have shrinked and the text is coming in separate lines, which should have appear in the ...
0
votes
0answers
19 views

Is there a way to use arbitrary, non “plugin” libraries inside Folium / JupyterLab?

It appears Folium supports certain plugins through folium.plugins Is it possible to use an arbitrary third-party library in Folium / JupyterLab? I want to use sidebar-v2. I know I can generate a map ...
0
votes
1answer
461 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
2k 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
56 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
370 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
845 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 ...
2
votes
1answer
3k 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
1k 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
328 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
2k 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
193 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
48 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
317 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
423 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
2k 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
47 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 ...
2
votes
1answer
2k views

Turn Layer off by default in Leaflet LayerControl

In the following python code I have three data layers while I need to show only two of them by default as the program executes. So the Places and District layer should be checked as the map is opened ...
1
vote
1answer
355 views

Dealing with NA-Values when plotting rasters with folium in python

I have some tiffs that I'd like to plot interactively in python using folium (or any other package, but I don't know of any). My problem is, that I have many na-values in the raster. At the moment I ...
0
votes
3answers
1k views

Google Earth Engine with Folium and Sentinel-1 Plotting

I'm attempting to plot Google Earth Engine Sentinel-1 SAR data in a Jupyter notebook with Python and Folium. To do this I'm trying to combine two pieces of documentation: EE Python Install -> Map ...
2
votes
1answer
417 views

Integrate sidebar with Python generated Leaflet map?

I have this map: link It was generated through Python code, not via JS directly. I want to add the Leaflet sidebar plugin within it, but it doesn't seem to work. As you can see in the github repo ...