diff --git a/public/img/josm_logo.svg b/public/img/josm_logo.svg
new file mode 100644
index 0000000..b3eedc2
--- /dev/null
+++ b/public/img/josm_logo.svg
@@ -0,0 +1,208 @@
+
+
diff --git a/public/img/josm_logo_100.png b/public/img/josm_logo_100.png
deleted file mode 100644
index 1744d40..0000000
Binary files a/public/img/josm_logo_100.png and /dev/null differ
diff --git a/public/img/mapwithai.svg b/public/img/mapwithai.svg
new file mode 100644
index 0000000..7c3be80
--- /dev/null
+++ b/public/img/mapwithai.svg
@@ -0,0 +1,104 @@
+
+
diff --git a/public/index.html b/public/index.html
index d8ba9c6..1ce86fe 100644
--- a/public/index.html
+++ b/public/index.html
@@ -1,12 +1,20 @@
+
+
+
MapWithAI-plugin for JOSM
-
+
+
+
diff --git a/public/json/sources.json b/public/json/sources.json
new file mode 100644
index 0000000..fb9c378
--- /dev/null
+++ b/public/json/sources.json
@@ -0,0 +1,11 @@
+{
+ "MapWithAI": {
+ "url": "https://www.facebook.com/maps/ml_roads?conflate_with_osm=true&theme=ml_road_vector&collaborator=josm&token=ASb3N5o9HbX8QWn8G_NtHIRQaYv3nuG2r7_f3vnGld3KhZNCxg57IsaQyssIaEw5rfRNsPpMwg4TsnrSJtIJms5m&hash=ASawRla3rBcwEjY4HIY&bbox={bbox}",
+ "provides": ["highway", "building"],
+ "parameters": [{"parameter": "result_type=road_building_vector_xml", "description": "buildings", "enabled": true}],
+ "countries": ["PR", "HN", "PY", "HR", "HT", "HU", "ID", "AF", "IN", "AG", "ZA", "AI", "AL", "AO", "AR", "ZM", "RO", "ZW", "BA", "BB", "RS", "BD", "JM", "BF", "BG", "RW", "BI", "BJ", "BL", "BN", "BO", "BR", "BS", "SD", "BT", "SG", "BW", "BZ", "SL", "KE", "SN", "SO", "KH", "CA", "SR", "SS", "CD", "ST", "CF", "KN", "SV", "CG", "SX", "CI", "SZ", "CL", "CM", "NL-BQ2", "NL-BQ3", "CO", "KY", "CR", "TC", "TD", "CU", "TG", "LA", "LC", "TL", "TN", "TR", "LK", "TT", "DJ", "LR", "TZ", "LS", "DM", "DO", "LY", "UG", "MA", "DZ", "MD", "ME", "MF", "MG", "EC", "MK", "US", "ML", "MM", "EG", "EH", "MQ", "UY", "MR", "MS", "MW", "MX", "MY", "ER", "MZ", "VC", "ET", "VE", "VG", "NA", "NE", "VN", "NG", "NI", "NP", "FK", "GA", "GD", "GF", "GH", "GM", "GN", "GP", "GQ", "GR", "GT", "GW", "PA", "GY", "PE", "PH", "PK"],
+ "license": "ODBL",
+ "osm_compatible": "yes",
+ "permission_url": "https://github.com/facebookmicrosites/Open-Mapping-At-Facebook/wiki/FAQ"
+ }
+}
diff --git a/public/scripts/sources.js b/public/scripts/sources.js
new file mode 100644
index 0000000..4b9bb51
--- /dev/null
+++ b/public/scripts/sources.js
@@ -0,0 +1,53 @@
+function addCommaSpace(text) {
+ var spacedText = "";
+ for (i of text) {
+ spacedText += i;
+ if (i == ",") {
+ spacedText += " ";
+ }
+ }
+ return spacedText;
+}
+function createTable(sources) {
+ var div = document.getElementsByClassName("mapwithaisourcetable")[0];
+ var table = document.createElement("table");
+ var tablebody = document.createElement("tbody");
+ var tablehead = document.createElement("thead");
+ var tableheadrow = document.createElement("tr");
+ for (header of ["Source", "URL", "Parameters", "Countries", "License", "OSM Usable"]) {
+ var th = document.createElement("th");
+ th.textContent = header;
+ tableheadrow.appendChild(th);
+ }
+ tablehead.appendChild(tableheadrow);
+
+ for (source in sources) {
+ var row = document.createElement("tr");
+ var sourcetd = document.createElement("td");
+ sourcetd.textContent = source;
+ row.appendChild(sourcetd);
+ for (columnName of ["url", "parameters", "countries", "license", "osm_compatible"]) {
+ var column = document.createElement("td");
+ column.textContent = sources[source][columnName];
+ if (column.textContent == "[object Object]") {
+ column.textContent = JSON.stringify(sources[source][columnName]);
+ }
+ column.textContent = addCommaSpace(column.textContent);
+ row.appendChild(column);
+ }
+ tablebody.appendChild(row);
+ }
+
+ table.appendChild(tablehead);
+ table.appendChild(tablebody);
+ div.appendChild(table);
+ console.log(sources);
+}
+
+function init() {
+ fetch("json/sources.json")
+ .then(response => response.json())
+ .then(json => createTable(json));
+}
+
+init();
diff --git a/public/style/default.css b/public/style/default.css
index 0ceb327..eb30cad 100644
--- a/public/style/default.css
+++ b/public/style/default.css
@@ -23,7 +23,7 @@ h1 {
h2 {
font-size:1.5em;
}
-.container {
+.container, .mapwithaisourcetable {
text-align: center;
}
ul {
@@ -42,9 +42,32 @@ ul li {
box-shadow: 0 0 0 #36af6d;
transition:.25s ease box-shadow, .5s ease border-color, .5s ease color, 1.5s ease background;
}
+
a:hover {
color:#fff;
border-color: #36af6d;
box-shadow: 0 0 8px #36af6d;
- background: rgba(54,175,109,.2)
+ background: rgba(54,175,109,.2);
+}
+
+h1 a:visited {
+ color: lightgrey;
+}
+
+.container h1 a {
+ border: none;
+}
+
+table {
+ width: 75%;
+ border: 1px solid black;
+ border-collapse: collapse;
+ overflow-x: auto;
+ word-wrap: break-word;
+ margin-left: auto;
+ margin-right: auto;
+}
+
+td {
+ max-width: 200px;
}