forked from MapComplete/MapComplete
Add a little hand, inviting the user to drag location inputs
This commit is contained in:
parent
bbee0bce5d
commit
6dcc710cc2
4 changed files with 101 additions and 71 deletions
26
test.ts
26
test.ts
|
@ -1,16 +1,12 @@
|
|||
const client_token = "MLY|4441509239301885|b40ad2d3ea105435bd40c7e76993ae85"
|
||||
import LocationInput from "./UI/Input/LocationInput";
|
||||
import Loc from "./Models/Loc";
|
||||
import {UIEventSource} from "./Logic/UIEventSource";
|
||||
|
||||
const image_id = '196804715753265';
|
||||
const api_url = 'https://graph.mapillary.com/' + image_id + '?fields=thumb_1024_url&&access_token=' + client_token;
|
||||
fetch(api_url,
|
||||
{
|
||||
headers: {'Authorization': 'OAuth ' + client_token}
|
||||
}
|
||||
).then(response => {
|
||||
return response.json()
|
||||
}).then(
|
||||
json => {
|
||||
const thumbnail_url = json["thumb_1024"]
|
||||
console.log(thumbnail_url)
|
||||
}
|
||||
)
|
||||
new LocationInput({
|
||||
centerLocation: new UIEventSource<Loc>({
|
||||
lat: 51.1110,
|
||||
lon: 3.3701,
|
||||
zoom : 14
|
||||
})
|
||||
}).SetStyle("height: 500px")
|
||||
.AttachTo("maindiv");
|
Loading…
Add table
Add a link
Reference in a new issue