mirror of
https://github.com/maplibre/maplibre-rs.git
synced 2025-12-08 19:05:57 +00:00
Adjust example
This commit is contained in:
parent
53903c5fbc
commit
a1ef55a0fe
@ -10,9 +10,9 @@ use crate::render::state::State;
|
|||||||
pub async fn setup(window: winit::window::Window, event_loop: EventLoop<()>, cache: Cache) {
|
pub async fn setup(window: winit::window::Window, event_loop: EventLoop<()>, cache: Cache) {
|
||||||
info!("== mapr ==");
|
info!("== mapr ==");
|
||||||
|
|
||||||
for x in 0..2 {
|
for x in 0..6 {
|
||||||
for y in 0..2 {
|
for y in 0..6 {
|
||||||
cache.fetch((2179 + x, 1421 + y, 12).into())
|
cache.fetch((2178 + x, 1421 + y, 12).into())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -386,7 +386,7 @@ impl State {
|
|||||||
}
|
}
|
||||||
|
|
||||||
pub fn upload_tile_geometry(&mut self, cache: &Cache) {
|
pub fn upload_tile_geometry(&mut self, cache: &Cache) {
|
||||||
const OFFSET_X: u32 = 2179;
|
const OFFSET_X: u32 = 2178;
|
||||||
const OFFSET_Y: u32 = 1421;
|
const OFFSET_Y: u32 = 1421;
|
||||||
|
|
||||||
let upload = cache.pop_all();
|
let upload = cache.pop_all();
|
||||||
|
|||||||
@ -1,3 +1,4 @@
|
|||||||
|
use lyon::lyon_tessellation::LineJoin;
|
||||||
use lyon::tessellation;
|
use lyon::tessellation;
|
||||||
use lyon::tessellation::geometry_builder::MaxIndex;
|
use lyon::tessellation::geometry_builder::MaxIndex;
|
||||||
use lyon::tessellation::{
|
use lyon::tessellation::{
|
||||||
@ -97,7 +98,7 @@ impl<
|
|||||||
tesselator
|
tesselator
|
||||||
.tessellate_path(
|
.tessellate_path(
|
||||||
&tile_path,
|
&tile_path,
|
||||||
&StrokeOptions::tolerance(DEFAULT_TOLERANCE),
|
&StrokeOptions::default(),
|
||||||
&mut BuffersBuilder::new(buffer, WithId(prim_id)),
|
&mut BuffersBuilder::new(buffer, WithId(prim_id)),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
@ -119,7 +120,7 @@ impl<
|
|||||||
tesselator
|
tesselator
|
||||||
.tessellate_path(
|
.tessellate_path(
|
||||||
&tile_path,
|
&tile_path,
|
||||||
&FillOptions::tolerance(DEFAULT_TOLERANCE),
|
&FillOptions::default(),
|
||||||
&mut BuffersBuilder::new(buffer, WithId(prim_id)),
|
&mut BuffersBuilder::new(buffer, WithId(prim_id)),
|
||||||
)
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user