Start work on share page
This commit is contained in:
parent
bf1c20ba77
commit
0471e66edc
@ -19,10 +19,8 @@
|
||||
}
|
||||
|
||||
if (locationChecked) {
|
||||
console.log('Starting location');
|
||||
map.locate({ setView: true, watch: true, enableHighAccuracy: true });
|
||||
} else {
|
||||
console.log('Stopping location');
|
||||
map.stopLocate();
|
||||
}
|
||||
};
|
||||
|
@ -137,7 +137,6 @@
|
||||
selectedCoordinateType = coordinateTypes[addr.srcCoordsType] || selectedCoordinateType;
|
||||
coordinateInputValue = addr.srcCoordsRepr || coordinateInputValue;
|
||||
} else {
|
||||
console.log('Getting it in the format of', selectedCoordinateType);
|
||||
coordinateInputValue = addr.get_coords_repr_as(
|
||||
coordinateTypes.indexOf(selectedCoordinateType)
|
||||
);
|
||||
|
@ -1,5 +1,24 @@
|
||||
<script>
|
||||
import { onMount, onDestroy } from 'svelte';
|
||||
|
||||
export let xpin;
|
||||
|
||||
onMount(() => {
|
||||
console.log('Got xpin: ', xpin);
|
||||
});
|
||||
</script>
|
||||
|
||||
Hi there
|
||||
<p>DD</p>
|
||||
<p>{xpin.allCoordinates.dd}</p>
|
||||
|
||||
<p>DMS</p>
|
||||
<p>{xpin.allCoordinates.dms}</p>
|
||||
|
||||
<p>DMM</p>
|
||||
<p>{xpin.allCoordinates.dmm}</p>
|
||||
|
||||
<p>UTM</p>
|
||||
<p>{xpin.allCoordinates.utm}</p>
|
||||
|
||||
<p>PLUS</p>
|
||||
<p>{xpin.allCoordinates.plus}</p>
|
||||
|
@ -42,6 +42,7 @@ impl From<spatial_coordinate_systems::CoordinateType> for CoordinateType {
|
||||
}
|
||||
|
||||
#[wasm_bindgen(getter_with_clone)]
|
||||
#[derive(Debug)]
|
||||
pub struct EncodedAddress {
|
||||
pub address: String,
|
||||
/// The coordinates used to encode this address
|
||||
@ -171,12 +172,12 @@ impl TryFrom<&'_ Address<'_>> for EncodedAddress {
|
||||
}
|
||||
}
|
||||
|
||||
// #[cfg(test)]
|
||||
// mod tests {
|
||||
// use super::*;
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use super::*;
|
||||
|
||||
// #[test]
|
||||
// fn test_general() {
|
||||
// super::from_address("6532 BROADCAST TINY apple")
|
||||
// }
|
||||
// }
|
||||
#[test]
|
||||
fn test_general() {
|
||||
// panic!("{:#?}", EncodedAddress::from_lat_lon(50.0, 20.0));
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user