crates.io

Slippy maps widget for egui.

Quick start

Walkers has three main objects. Tiles downloads images from a tile map provider such as OpenStreetMap and stores them in a cache, MapMemory keeps track of the widget's state and Map is the widget itself.

```rust use walkers::{Tiles, Map, MapMemory, Position, openstreetmap}; use egui::{Context, CentralPanel}; use eframe::{App, Frame};

struct MyApp { tiles: Tiles, map_memory: MapMemory, }

impl MyApp { fn new(eguictx: Context) -> Self { Self { tiles: Tiles::new(openstreetmap, eguictx), map_memory: MapMemory::default(), } } }

impl App for MyApp { fn update(&mut self, ctx: &Context, frame: &mut Frame) { CentralPanel::default().show(ctx, |ui| { ui.add(Map::new( Some(&mut self.tiles), &mut self.mapmemory, Position::new(17.03664, 51.09916) )); }); } } ```

Limitations

There are couple of limitations when using this library. Some of them will might probably be lifted at some point. Please raise an issue if you are particularly affected by some and I will try to prioritize.

Other suggestions are welcomed as well.

Screenshot