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