All notable changes to this project will be documented in this file.
- Tiles are now downloaded in parallel.
Plugin::draw()
is now calledPlugin::run()
and no longer hasgesture_handled
argument, in preference toegui::Response::changed()
.- New
Projector::unproject()
function converts screen coordinates to a geographical position. - New
Projector::new()
allowsProjector
to be used outside plugins.
egui
updated to 0.25.
mod providers
is now calledmod sources
, to resembletrait TileSource
.- HTTP cache can be now enabled on native platforms (in WASM, is it handled by the browser).
TileManager
trait and demonstration of locally generated tiles.- Zoom and drag gestures can now be disabled.
- Add
gesture_handled
toPlugin::draw()
to let plugins know if the gesture was handled by the map.
egui
updated to 0.24. This change requires Rust 1.72 or greater.
- Fixed occasional panic when changing tile providers.
- Fixed grabbing mouse events from outside the widget.
Position
can be now converted intogeo_types::Point
.
Position
is no longer a typedef ofgeo_types::Point
. There is also a new, more explicit way of constructing it -from_lat_lon
, andfrom_lon_lat
.- If center position is detached, zooming using mouse wheel will now keep location under pointer fixed.
- In
Images
plugin,scale
andangle
functions are now part ofImage
. - Allow structs implementing
Provider
to use larger tile sizes. - Add optional logos to
Attribution
struct. - Add
Mapbox
provider. Plugin::draw
now has aResponse
parameter, allowing plugins to be interactive.
egui
updated to 0.23.
Zoom
type is no longer public, whileInvalidZoom
becomes public.MapMemory::center_mode
is no longer public,- New
MapMemory::follow_my_position
function. - Fix occasional disappearing of the map when dragging rapidly.
- Brought back the ability to center the map at exact position (
MapMemory::center_at
) after making some types private.
Images
plugin, for putting images at geographical location.Projector
andMapMemory
are nowClone
.MapMemory::zoom
is no longerpub
. UseMapMemory::zoom_in/out
instead.MapMemory::center_mode::detached()
is no longerpub
. UseMapMemory::detached()
instead.- Fixed weird drag behavior in higher zoom levels.
- Tile sources are now defined via
TileSource
trait, instead ofFn
. - New
Plugin
trait andMap::with_plugin
function, which replacesMap::with_drawer
. - Example plugin
extras::Places
, which draws markers on the map.
- Previous example was split into
demo
library, anddemo_*
integrations. - Support for WASM.
- New
Center
variant -Inertia
. It means that the map is moving due to inertia and soon will stop withCenter
switching toExact
. To keep things easy,Center
now has new methoddetached
, will returns a position the map is currently at, orNone
if it just followsmy_position
. openstreetmap
is now inwalkers::providers
module.osm
example is now calledmyapp
and it shows a small windows with an orthophotomap layer from https://geoportal.gov.pl.
- New method:
Map::with_drawer
, which provides a simpler API for drawing custom stuff.
MapCenterMode
is now calledCenter
.Zoom
can no longer be dereferenced tou8
. To obtain a previous value, useZoom::round()
.- Also,
Zoom
is no longerPartialEq
, norEq
.
- Zooming using CTRL + mouse wheel or pinch gesture.
- Fixed panic when dragging out of the map's boundaries.
Tiles::new()
has now two parameters. First, calledsource
, being a function transformingTileId
into an URL of a tile provider. This means that it's now possible to specify other servers.openstreeetmap
is a builtin function returning OSM's URL.MapMemory
no longer hasosm
member. Instead,Map::new
'stiles
parameter is nowOption
.
- Optimized how GUI and IO thread talk to each other.
- Handle tile download errors (HTTP statuses, garbage content, etc.) more gracefully. Application
will remain alive (no
unwrap
orexpect
), but downloads of the failed tiles won't be repeated.
TileId::position_on_world_bitmap
is now calledproject
and it returnsPixels
.PositionExt::project_with_zoom
is now calledproject
and it returnsPixels
.Tiles::new()
has now a single parameter -egui_ctx
. It can be obtained from egui'sCreationContext
(see the example).
- Fixed calculation of the amount by which map should be scrolled during the screen drag.
- Map did not get repainted when a tile got downloaded in the background, unless some mouse movement was made.
- Tokio runtime is now managed by the
MapMemory
so constructing it by hand is no longer necessary. - Example updated with drawing custom shapes on the map.