mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
23 lines
783 B
Rust
23 lines
783 B
Rust
use maplibre::{
|
|
io::{apc::SchedulerAsyncProcedureCall, transferables::DefaultTransferables},
|
|
platform::{http_client::ReqwestHttpClient, scheduler::TokioScheduler},
|
|
MapBuilder,
|
|
};
|
|
use maplibre_winit::winit::{WinitEnvironment, WinitMapWindowConfig};
|
|
|
|
pub async fn run_headed() {
|
|
let client = ReqwestHttpClient::new(None);
|
|
MapBuilder::<WinitEnvironment<_, _, _, SchedulerAsyncProcedureCall<_, _>>>::new()
|
|
.with_map_window_config(WinitMapWindowConfig::new("maplibre".to_string()))
|
|
.with_http_client(client.clone())
|
|
.with_apc(SchedulerAsyncProcedureCall::new(
|
|
client,
|
|
TokioScheduler::new(),
|
|
))
|
|
.with_scheduler(TokioScheduler::new())
|
|
.build()
|
|
.initialize()
|
|
.await
|
|
.run()
|
|
}
|