mirror of
https://github.com/a-b-street/abstreet.git
synced 2024-11-28 03:35:51 +03:00
make neighborhood editor work with synthetic maps, so i stop thinking the plugin is broken
This commit is contained in:
parent
0aece4944d
commit
b7dfa3effc
@ -52,6 +52,15 @@ impl Pt2D {
|
||||
}
|
||||
|
||||
pub fn to_gps(&self, b: &GPSBounds) -> Option<LonLat> {
|
||||
if b.represents_world_space {
|
||||
let pt = LonLat::new(self.x, self.y);
|
||||
if b.contains(pt) {
|
||||
return Some(pt);
|
||||
} else {
|
||||
return None;
|
||||
}
|
||||
}
|
||||
|
||||
let (width, height) = {
|
||||
let pt = b.get_max_world_pt();
|
||||
(pt.x, pt.y)
|
||||
|
Loading…
Reference in New Issue
Block a user