All notable changes to this project will be documented in this file.
egui
updated to 0.30.0.
- Tile download optimized by no longer queueing older requests.
- Interpolation of higher zoom levels is now improved, trying many different levels instead of just one.
- Add option for changing the zoom speed
- Add options for double click to zoom in and out
- Add option to zoom without holding ctrl on native and web
- Fixed zoom not following cursor if the map wasn't moved.
- Fixed spurious "Error from IO runtime" at shutdown.
- Do not set a user agent in wasm build by default.
- Fixed not taking into account the mouse pointer position when scrolling.
- Implement panning with touchpad and/or scroll-wheel.
- Fixed crash when zoom is maxed far out.
- Add
Project::scale_pixel_per_meter()
to provide the local meter-to-pixel scale. - Map can be zoomed in farther than what is supported by the tile provider. The max. zoom level
for which tile images are available can be configured via
TileSource::max_zoom()
.
HttpTiles
will now attempt to use already downloaded tiles with a lower zoom level as placeholders.Tiles::at()
now returns a newTextureWithUv
instead ofTexture
. This change is relevant only forTiles
implementers and provides the ability to use part of the texture as a tile.- Zoom is now represented as
f64
instead off32
which makes it consistent with other types. Plugin::run()
has a new signature. Refer todemo/src/plugins.rs
for usage.
egui
updated to 0.29.1.
egui
updated to 0.28.
- New functions in
MapMemory
for getting and setting the zoom level:zoom
andset_zoom
. - In-memory cache is now limited to 256 tiles. Previously it grew indefinitely.
TilesManager
trait is now calledTiles
andTiles
struct is now calledHttpTiles
.
egui
updated to 0.27.
- New
HttpOptions::user_agent
field. Note that in case of providers like OSM, it is highly advised to set it accordingly to the application's name. https://operations.osmfoundation.org/policies/tiles/
- Fix weird quirks while dragging by small amounts.
- Plugins: Fixed problem of handle clicks after update to egui 0.26
- Map can be zoomed to decimal zoom levels with gestures or scrolling.
egui
updated to 0.26.
- 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.