Fix js errors
This commit is contained in:
parent
ab5c0842a0
commit
d31a73faca
@ -28,7 +28,7 @@
|
||||
try {
|
||||
latlng = e.latlng;
|
||||
addr = getxpin(wasm.call.EncodedAddress.from_lat_lon(latlng.lat, latlng.lng));
|
||||
console.log(latlng, addr);
|
||||
addrInputValue = addr.address;
|
||||
popup
|
||||
.setLatLng({
|
||||
lat: addr.latLon[0],
|
||||
@ -69,15 +69,18 @@
|
||||
}
|
||||
});
|
||||
|
||||
let outputValue = '';
|
||||
let outputValue = ' ';
|
||||
const input = () => {
|
||||
try {
|
||||
if (browser) {
|
||||
addr = getxpin(wasm.call.EncodedAddress.from_address(addr));
|
||||
let latlng = new leaflet.LatLng(outputValue[0], outputValue[1]);
|
||||
addr = getxpin(wasm.call.EncodedAddress.from_address(addrInputValue));
|
||||
console.log("New addr", addr);
|
||||
let latlng = new leaflet.LatLng(addr.latLon[0], addr.latLon[1]);
|
||||
map.panTo(latlng, 20);
|
||||
leaflet.popup().setLatLng(latlng).setContent(`${outputValue}<br>hi`).openOn(map);
|
||||
leaflet.popup().setLatLng(latlng).setContent(`${addr.address}`).openOn(map);
|
||||
map.setView(latlng);
|
||||
|
||||
outputValue = " ";
|
||||
}
|
||||
} catch (e) {
|
||||
console.error(e);
|
||||
|
Loading…
Reference in New Issue
Block a user