Questions tagged [ipyleaflet]

44 questions
4
votes
1 answer

shiny for Python using add_layer for Popus from ipyleaflet

I want to use m.add_layer for Popus from ipyleaflet in shiny for python (as given here). However, it is not working as expected. My minimum working example is given below: from shiny import App, render, ui from shinywidgets import output_widget,…
MYaseen208
  • 22,666
  • 37
  • 165
  • 309
3
votes
1 answer

How to plot data over OpenStreetMap (Python)

Thank you in advance for all your answers. I am trying to plot a dataframe over an interactive map (OpenStreetMap), and what I get is what is in the picture, but I would like the map outlines to be on top of my data and not the data to be like a…
userpython
  • 33
  • 5
3
votes
1 answer

ipyleaflet on_click event in for loop calls function on each iteration

I've been plotting markers on a map, each with its own location and sample id. I'm trying to add a click_event on each marker so that each marker will print out its sample Id upon being clicked. My main issue is with the on_click event, which seems…
2
votes
0 answers

How can I save a list of ipyleaflet markers to a file and load them later on?

I'd like to save a list of ipyleaflet markers so I can load them into another ipyleaflet map later on. I have customized the markers using a MarkerCustom class in order to incorporate another attribute (duration), which works fine. Later on I also…
2
votes
1 answer

ipyleaflet map not rendering in jupyter notebook on install

Running the following inside the notebook: !pip install ipyleaflet !jupyter nbextension enable --py --sys-prefix ipyleaflet Successfully registers ipyleaflet extension: Enabling notebook extension jupyter-leaflet/extension... - Validating:…
KarloSpacapan
  • 173
  • 2
  • 16
2
votes
0 answers

How can i use ipyleaflet instead of folium in PyQt5?

I am working on a project for uni where im trying to get GPS data from a microcontroller and show the position using the pyqt5 web widget. First i used folium but i had to rerender the map everytime to move the marker which is a roundabout way of…
Dubaja
  • 21
  • 5
2
votes
1 answer

How can I use multiple basemaps with IPyLeaflet?

In leaflet.js it is possible to have multiple basemaps that show up in radio boxes at the top of LayerControl: With IPyLeaflet I can do map.add_layer(tile_layer), but that is not the same as the leaflet example as the layer does not show up as a…
Billy Hudson
  • 126
  • 11
2
votes
1 answer

how to remove shadow from a WidgetControl?

Using the following code from ipyleaflet documentation I get a nice display with 2 extra custom widgets. These widgets have a small dark shadow that I would like to remove. from ipyleaflet import Map, basemaps, WidgetControl from ipywidgets import…
Pierrick Rambaud
  • 1,726
  • 1
  • 20
  • 47
2
votes
0 answers

How to generate a heat map of rental in jupyter notebook using ipyleaflet?

I am working on a dataset containing the rents of buildings in Paris by neighborhood and also the gps coordinates. I would like to make a heat map of the rents using the geographical coordinates of my dataset. image of the dataframe Any idea how to…
1
vote
0 answers

iPyLeaflet map in Jupyter Notebook only lets me draw one shape and then breaks

In a Jupyter notebook, I'm trying to make a simple widget using iPyLeaflet that lets me draw a polygon on a map and gives me the coordinates of the corners of the polygon. For some reason, after I initialize my map, I can draw one polygon just fine.…
Jake
  • 99
  • 7
1
vote
1 answer

How to update a pyshiny text input with title from clicked marker in ipyleaflet map

I'd like to update a text input in a pyshiny app each time a marker is clicked in an ipyleaflet map widget using the marker's title value. I have been using the marker.on_click() callback to get the title (station_id in this case) from the clicked…
wardj
  • 13
  • 2
1
vote
1 answer

ipyleaflet layer not scaled/positioned correctly

I'm trying to overlay an esri bathymetry map on my south polar stereographic map using the 'url' function in ipyleaflet. Doing this results with {z}/{y}/{x} in the url inserts the layer, but at a smaller size in the right-hand corner of the basemap.…
VikingMK
  • 13
  • 3
1
vote
1 answer

How to remove a layer with ipyleaflet

Hya all, I am plotting aircraft positions contained in a DataFrame df, on a leaflet map using Python. An icon is created with an airplane symbol. So I add all markers to the map, using: for i in range(0, len(df)): ac = Marker(name =…
Job Brüggen
  • 173
  • 10
1
vote
1 answer

Ipyleaflet will not add layer with the use of geopandas

I am trying to load in a shapefile with the use of geopandas. I have read the file in, but when I go to add the layer to the ipyleaflet map, an error comes up that says 'GeoDataFrame' object has no attribute 'model_id'. I have tried many files and…
coues
  • 31
  • 2
1
vote
0 answers

IpyLeaflet not displaying on Jupyter notebook

I am using some documentation code from Ipyleaflet from ipyleaflet import Map, basemaps, basemap_to_tiles m = Map( basemap=basemap_to_tiles(basemaps.NASAGIBS.ModisTerraTrueColorCR, "2017-04-08"), center=(52.204793, 360.121558), …
1
2 3