Skip to content

Commit

Permalink
docs: rework Plugins page into a tabular format (#1889)
Browse files Browse the repository at this point in the history
* separate markdown usages of textpath and antpath plugins

* remodel plugins page into a table
  • Loading branch information
achieveordie authored Mar 4, 2024
1 parent 0950a52 commit a00c3c3
Show file tree
Hide file tree
Showing 3 changed files with 113 additions and 19 deletions.
74 changes: 72 additions & 2 deletions docs/user_guide/plugins.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ Plugins
-------

.. toctree::
:maxdepth: 1
:hidden:

plugins/antpath
plugins/boat_marker
plugins/beautify_icon
plugins/draw
Expand All @@ -22,7 +23,7 @@ Plugins
plugins/mouse_position
plugins/pattern
plugins/polyline_offset
plugins/polyline_textpath_and_antpath
plugins/polyline_textpath
plugins/realtime
plugins/scroll_zoom_toggler
plugins/search
Expand All @@ -34,3 +35,72 @@ Plugins
plugins/timestamped_geojson
plugins/vector_tiles
plugins/WmsTimeDimension

.. list-table::
:widths: 25 75
:header-rows: 1

* - Plugin
- Description
* - :doc:`Ant Path <plugins/antpath>`
- A flux animation (like walking of ants) along a polyline.
* - :doc:`Boat Marker <plugins/boat_marker>`
- A boat marker using HTML canvas for displaying yachts and sailboats with heading and optional wind information.
* - :doc:`Beautify Icon <plugins/beautify_icon>`
- Lightweight plugin that adds colorful iconic markers without image and gives full control of style to end user (i.e. Unlimited colors and CSS styling).
* - :doc:`Draw <plugins/draw>`
- Enables drawing features like polylines, polygons, rectangles, circles and markers through a very nice user-friendly interface with icons and hints.
* - :doc:`Dual Map <plugins/dual_map>`
- Synchronized view of two maps in the same window.
* - :doc:`FeatureGroup Subgroup <plugins/featuregroup_subgroup>`
- Create Feature Groups that add their child layers into a parent group.
* - :doc:`Float Image <plugins/float_image>`
- Add a floating image in the HTML canvas on top of the map.
* - :doc:`Fullscreen <plugins/fullscreen>`
- A fullscreen button control for modern browsers, using HTML Fullscreen API.
* - :doc:`Geocoder <plugins/geocoder>`
- A clean and extensible control for both geocoding and reverse geocoding using different geocoding providers.
* - :doc:`Grouped Layer Control <plugins/grouped_layer_control>`
- Create layer control with support for grouping overlays together.
* - :doc:`Heatmap <plugins/heatmap>`
- A tiny, simple and fast heatmap plugin.
* - :doc:`Heatmap with Time <plugins/heatmap_with_time>`
- Create a time-aware heatmap.
* - :doc:`Locate Control <plugins/locate_control>`
- Geolocate a user over an encrypted connection.
* - :doc:`Marker Cluster <plugins/marker_cluster>`
- Beautiful, sophisticated, high performance marker clustering solution with smooth animations.
* - :doc:`Measure Control <plugins/measure_control>`
- Coordinate, linear, and area measure control.
* - :doc:`Mini Map <plugins/mini_map>`
- A small minimap showing the map at a different scale to aid navigation.
* - :doc:`Mouse Position <plugins/mouse_position>`
- A control that displays geographic coordinates of the mouse pointer, as it is moved over the map.
* - :doc:`Pattern <plugins/pattern>`
- Add support for pattern fills on Paths.
* - :doc:`Polyline Offset <plugins/polyline_offset>`
- Shift relative pixel offset, without actually changing the actual latitude longitude values.
* - :doc:`Polyline Textpath <plugins/polyline_textpath>`
- Write text along polylines.
* - :doc:`Realtime <plugins/realtime>`
- Put realtime data (like live tracking, GPS information) on a map.
* - :doc:`Scroll Zoom Toggler <plugins/scroll_zoom_toggler>`
- Enable/Disable zooming via a button.
* - :doc:`Search <plugins/search>`
- A control for search Markers/Features location by custom property in LayerGroup/GeoJSON.
* - :doc:`Semi Circle <plugins/semi_circle>`
- Add a marker in the shape of a semicircle, similar to the Circle class.
* - :doc:`Side by Side Layers <plugins/side_by_side_layers>`
- A control to add a split screen to compare two map overlays.
* - :doc:`Tag Filter Button <plugins/tag_filter_button>`
- Creates a Tag Filter Button to filter elements based on different criteria.
* - :doc:`Terminator <plugins/terminator>`
- Overlay day and night regions on a map.
* - :doc:`Timeslider Choropleth <plugins/timeslider_choropleth>`
- Create a choropleth with a timeslider for timestamped data.
* - :doc:`Timestamped GeoJSON <plugins/timestamped_geojson>`
- Add time-aware GeoJSON into the map.
* - :doc:`Vector Tiles using VectorGridProtobuf <plugins/vector_tiles>`
- Display gridded vector data (GeoJSON or TopoJSON sliced with geojson-vt, or protobuf vector tiles).
* - :doc:`WMS Time Dimension <plugins/WmsTimeDimension>`
- Create a time-aware WmsTileLayer.
41 changes: 41 additions & 0 deletions docs/user_guide/plugins/antpath.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
```{code-cell} ipython3
---
nbsphinx: hidden
---
import folium
import folium.plugins
```


## Antpath

```{code-cell} ipython3
m = folium.Map()
wind_locations = [
[59.35560, -31.992190],
[55.178870, -42.89062],
[47.754100, -43.94531],
[38.272690, -37.96875],
[27.059130, -41.13281],
[16.299050, -36.56250],
[8.4071700, -30.23437],
[1.0546300, -22.50000],
[-8.754790, -18.28125],
[-21.61658, -20.03906],
[-31.35364, -24.25781],
[-39.90974, -30.93750],
[-43.83453, -41.13281],
[-47.75410, -49.92187],
[-50.95843, -54.14062],
[-55.97380, -56.60156],
]
folium.plugins.AntPath(
locations=wind_locations, reverse="True", dash_array=[20, 30]
).add_to(m)
m.fit_bounds(m.get_bounds())
m
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,6 @@ import folium
import folium.plugins
```

# PolylineTextPath and AntPath


## PolyLineTextPath

```{code-cell} ipython3
Expand Down Expand Up @@ -92,17 +89,3 @@ folium.plugins.PolyLineTextPath(line_to_hanoi, "To Hanoi", offset=-5).add_to(m)
m
```

## Antpath

```{code-cell} ipython3
m = folium.Map()
folium.plugins.AntPath(
locations=wind_locations, reverse="True", dash_array=[20, 30]
).add_to(m)
m.fit_bounds(m.get_bounds())
m
```

0 comments on commit a00c3c3

Please sign in to comment.