anon-iclr-submission/benchname-bug-localization huggingface dataset:
Repository: python-visualization/folium
Issue: Image order

When adding images to teh HTML canvas, like the one used in the `ScrollZoomToggler` plugin, sometimes the map has a higher `z-index` and the image is hidden behind the map. It would be nice to either pass a `z-index` or hard-code a high value to ensure the image is on top of the map.


Changed files:
tests/plugins/test_scroll_zoom_toggler.py, folium/plugins/scroll_zoom_toggler.py

diff --git a/folium/plugins/scroll_zoom_toggler.py b/folium/plugins/scroll_zoom_toggler.py
index e104277..1390e63 100644
--- a/folium/plugins/scroll_zoom_toggler.py
+++ b/folium/plugins/scroll_zoom_toggler.py
@@ -35,9 +35,11 @@ class ScrollZoomToggler(MacroElement):
             {% endmacro %}
 
             {% macro html(this,kwargs) %}
-                <img id="{{this.get_name()}}" alt="scroll"
-                   src="https://cdnjs.cloudflare.com/ajax/libs/ionicons/1.5.2/png/512/arrow-move.png"
-                   onclick="{{this._parent.get_name()}}.toggleScroll()"></img>
+            <img id="{{this.get_name()}}" alt="scroll"
+                 src="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/png/512/arrow-move.png"
+                 style="z-index: 999999"       
+                 onclick="{{this._parent.get_name()}}.toggleScroll()">
+            </img>
             {% endmacro %}
 
             {% macro script(this,kwargs) %}
diff --git a/tests/plugins/test_scroll_zoom_toggler.py b/tests/plugins/test_scroll_zoom_toggler.py
index 77feb68..438399d 100644
--- a/tests/plugins/test_scroll_zoom_toggler.py
+++ b/tests/plugins/test_scroll_zoom_toggler.py
@@ -21,7 +21,8 @@ def test_scroll_zoom_toggler():
     # Verify that the div has been created.
     tmpl = Template("""
         <img id="{{this.get_name()}}" alt="scroll"
-        src="https://cdnjs.cloudflare.com/ajax/libs/ionicons/1.5.2/png/512/arrow-move.png"
+        src="https://cdnjs.cloudflare.com/ajax/libs/ionicons/2.0.1/png/512/arrow-move.png"
+        style="z-index: 999999"
         onclick="{{this._parent.get_name()}}.toggleScroll()"></img>
     """)
     assert ''.join(tmpl.render(this=szt).split()) in ''.join(out.split())
Repository: python-visualization/folium
Issue: Leaflet.boatmarker is broken in v0.3.0

The reason is probably the move to `leaflet 1.0`.

Changed files:
folium/plugins/boat_marker.py, tests/plugins/test_boat_marker.py

diff --git a/folium/plugins/boat_marker.py b/folium/plugins/boat_marker.py
index d6e8856..faed487 100644
--- a/folium/plugins/boat_marker.py
+++ b/folium/plugins/boat_marker.py
@@ -65,5 +65,5 @@ class BoatMarker(Marker):
                                             'if it is not in a Figure.')
 
         figure.header.add_child(
-            JavascriptLink('https://thomasbrueggemann.github.io/leaflet.boatmarker/js/leaflet.boatmarker.min.js'),  # noqa
+            JavascriptLink('https://unpkg.com/leaflet.boatmarker/leaflet.boatmarker.min.js'),  # noqa
             name='markerclusterjs')
diff --git a/tests/plugins/test_boat_marker.py b/tests/plugins/test_boat_marker.py
index b684278..97a5ad5 100644
--- a/tests/plugins/test_boat_marker.py
+++ b/tests/plugins/test_boat_marker.py
@@ -34,7 +34,7 @@ def test_boat_marker():
     out = m._parent.render()
 
     # We verify that the script import is present.
-    script = '<script src="https://thomasbrueggemann.github.io/leaflet.boatmarker/js/leaflet.boatmarker.min.js"></script>'  # noqa
+    script = '<script src="https://unpkg.com/leaflet.boatmarker/leaflet.boatmarker.min.js"></script>'  # noqa
     assert script in out
 
     # We verify that the script part is correct.
Repository: python-visualization/folium
Issue: ClickForLatLng() is not implemented even if PR #1530

**Describe the bug**
The `folium.ClickForLatLng()` functionality seem to be missing.

**`AttributeError: module 'folium' has no attribute 'ClickForLatLng'. Did you mean: 'ClickForMarker'?`**


**To Reproduce**

```python
# ...
m = folium.Map(MC, zoom_start=15, max_zoom=21, control_scale=True, tiles='cartodb positron')
folium.ClickForLatLng().add_to(m)
```

**Expected behavior**
expect it to copy to clipboard

**Environment (please complete the following information):**
```powershell
# python.exe -c "import folium; print(folium.__version__)"
0.12.1.post1
# python.exe -c "import branca; print(branca.__version__)"
0.5.0
# python.exe -c "import sys; print(sys.version_info)"
sys.version_info(major=3, minor=10, micro=3, releaselevel='final', serial=0)
```

**Other**

Should be working from PR #1530.



Changed files:
folium/__init__.py

diff --git a/folium/__init__.py b/folium/__init__.py
index acd6cc0..f416ef9 100644
--- a/folium/__init__.py
+++ b/folium/__init__.py
@@ -17,6 +17,7 @@ from branca.element import (
 from folium.features import (
     Choropleth,
     ClickForMarker,
+    ClickForLatLng,
     ColorLine,
     CustomIcon,
     DivIcon,
@@ -75,6 +76,7 @@ if sys.version_info < (3, 0):
 __all__ = [
     'Choropleth',
     'ClickForMarker',
+    'ClickForLatLng',
     'ColorLine',
     'ColorMap',
     'CssLink',
Repository: python-visualization/folium
Issue: FeatureGroup name argument ignored?

Hello everyone,

I am trying to set a `FeatureGroup` name for a set of `PolyLine`s, but the name I give to the `FeatureGroup` isn't sticking in the map layer control menu.  Instead, a `macro_element_...` is returned.

I've set up an [example Jupyter Notebook](http://nbviewer.jupyter.org/github/brwst/folium/blob/master/FeatureGroup_name.ipynb). (in the style of pull request #242) showing this behavior.  Should this be expected?


Changed files:
folium/map.py

diff --git a/folium/map.py b/folium/map.py
index f0decad..60e300f 100644
--- a/folium/map.py
+++ b/folium/map.py
@@ -328,7 +328,7 @@ class FeatureGroup(Layer):
         LayerControls) or a base layer (ticked with a radio button).
     """
     def __init__(self, name=None, overlay=True, control=True):
-        super(FeatureGroup, self).__init__(overlay=overlay, control=control)
+        super(FeatureGroup, self).__init__(overlay=overlay, control=control, name=name)
         self._name = 'FeatureGroup'
 
         self.tile_name = name if name is not None else self.get_name()
Repository: python-visualization/folium
Issue: FeatureGroup name argument ignored?

Hello everyone,

I am trying to set a `FeatureGroup` name for a set of `PolyLine`s, but the name I give to the `FeatureGroup` isn't sticking in the map layer control menu.  Instead, a `macro_element_...` is returned.

I've set up an [example Jupyter Notebook](http://nbviewer.jupyter.org/github/brwst/folium/blob/master/FeatureGroup_name.ipynb). (in the style of pull request #242) showing this behavior.  Should this be expected?


Changed files:
folium/map.py

diff --git a/folium/map.py b/folium/map.py
index d783109..e84711d 100644
--- a/folium/map.py
+++ b/folium/map.py
@@ -331,7 +331,7 @@ class FeatureGroup(Layer):
         LayerControls) or a base layer (ticked with a radio button).
     """
     def __init__(self, name=None, overlay=True, control=True):
-        super(FeatureGroup, self).__init__(overlay=overlay, control=control)
+        super(FeatureGroup, self).__init__(overlay=overlay, control=control, name=name)
         self._name = 'FeatureGroup'
 
         self.tile_name = name if name is not None else self.get_name()
Repository: python-visualization/folium
Issue: folium popup width control and icon color

Hello, trying to make a fixed width for all popups in my data map.

Tried using iframes but the nothing changed when I used different values for width and height.

popuptext = '<some html coding>'
  iframe = folium.IFrame(popuptext, width=700, height=1000)
  popup = folium.Popup(iframe)
folium.Marker(geo_location, popup = popuptext , icon=folium.Icon(color='black')).add_to(marker_cluster)

Any simple way to set the width for a popup in folium?
    

Changed files:
folium/map.py

diff --git a/folium/map.py b/folium/map.py
index 72d8871..891bf68 100644
--- a/folium/map.py
+++ b/folium/map.py
@@ -220,7 +220,7 @@ class Icon(MacroElement):
             warnings.warn('color argument of Icon should be one of: {}.'
                           .format(self.color_options), stacklevel=2)
         self.options = parse_options(
-            color=color,
+            marker_color=color,
             icon_color=icon_color,
             icon=icon,
             prefix=prefix,