Decrese dependency on jquery

This commit is contained in:
Pieter Vander Vennet 2021-07-03 22:24:12 +02:00
parent e3f2c56d3e
commit d0997480c0
8 changed files with 43 additions and 60 deletions

View file

@ -4,6 +4,7 @@ import ImageAttributionSource from "./ImageAttributionSource";
import BaseUIElement from "../../UI/BaseUIElement";
import {UIEventSource} from "../UIEventSource";
import Svg from "../../Svg";
import {Utils} from "../../Utils";
export class Mapillary extends ImageAttributionSource {
@ -43,7 +44,7 @@ export class Mapillary extends ImageAttributionSource {
const key = Mapillary.ExtractKeyFromURL(url)
const metadataURL = `https://a.mapillary.com/v3/images/${key}?client_id=TXhLaWthQ1d4RUg0czVxaTVoRjFJZzowNDczNjUzNmIyNTQyYzI2`
const source = new UIEventSource<LicenseInfo>(undefined)
$.getJSON(metadataURL, function (data) {
Utils.downloadJson(metadataURL).then(data => {
const license = new LicenseInfo();
license.artist = data.properties?.username;
license.licenseShortName = "CC BY-SA 4.0";