mouse_position
mouse_position
Mouse-position readout in a non-WGS84 projected CRS (e.g. RD EPSG:28992).
Classes:
-
MousePositionProjected–Show the cursor coordinates transformed to a projected CRS.
mouse_position.MousePositionProjected
MousePositionProjected(
crs: str,
position: str = "bottomleft",
separator: str = " | ",
empty_string: str = "Unavailable",
)
Bases: JSCSSMixin, MacroElement
Show the cursor coordinates transformed to a projected CRS.
Folium's bundled :class:folium.plugins.MousePosition only displays
WGS84 lat/lon — its per-axis lat_formatter/lng_formatter cannot
do a 2D projection. This control loads proj4js on the page, registers
the target CRS, and writes the transformed X | Y pair into a div on
every mousemove.
Parameters:
-
crs(str) –Target CRS, e.g.
"EPSG:28992"for Dutch RD New. Anything :func:pyproj.CRS.from_user_inputaccepts. -
position(str, default:'bottomleft') –Leaflet control position (
"bottomleft","topright", ...).
Source code in mapyta/mouse_position.py
84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 | |