Started working on user map

This commit is contained in:
2018-04-16 23:01:34 +02:00
parent b5a3ec2f86
commit b3473be89a
6 changed files with 59 additions and 0 deletions

35
scripts/Actions/Map.ts Normal file
View File

@ -0,0 +1,35 @@
// import AnimeNotifier from "../AnimeNotifier"
// // User map
// export function showUserMap(arn: AnimeNotifier, button: HTMLElement) {
// let script = document.createElement("script")
// script.src = "https://www.gstatic.com/charts/loader.js"
// script.onload = () => {
// let google = window["google"]
// google.charts.load("current", {
// "packages": ["geochart"],
// "mapsApiKey": ""
// })
// google.charts.setOnLoadCallback(drawUserMap)
// }
// document.head.appendChild(script)
// }
// function drawUserMap() {
// let data = window["google"].visualization.arrayToDataTable([
// ["Country", "Popularity"],
// ["Germany", 200],
// ["United States", 300],
// ["Brazil", 400],
// ["Canada", 500],
// ["France", 600],
// ["RU", 700]
// ])
// let options = {}
// let element = document.getElementById("user-map")
// let chart = new window["google"].visualization.GeoChart(element)
// console.log(element, data)
// chart.draw(data, options)
// }