-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
73 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
<html> | ||
|
||
<head> | ||
|
||
<link rel="stylesheet" href="https://unpkg.com/[email protected]/dist/leaflet.css" integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" | ||
crossorigin="" /> | ||
|
||
<!-- Make sure you put this AFTER Leaflet's CSS --> | ||
<script src="https://unpkg.com/[email protected]/dist/leaflet.js" integrity="sha512-QVftwZFqvtRNi0ZyCtsznlKSWOStnDORoefr1enyq5mVL4tmKB3S/EnC3rRJcxCPavG10IcrVGSmPh6Qw5lwrg==" | ||
crossorigin=""></script> | ||
|
||
<style> | ||
body { | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
#mainMap { | ||
height: 100%; | ||
z-index: 5; | ||
} | ||
|
||
.options { | ||
z-index: 10; | ||
position: fixed; | ||
top: 35px; | ||
left: 65px; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<div> | ||
|
||
<div class="options"> | ||
<span> | ||
Select GBFS Data | ||
</span> | ||
<select> | ||
<option value="volvo">Volvo</option> | ||
<option value="saab">Saab</option> | ||
<option value="mercedes">Mercedes</option> | ||
<option value="audi">Audi</option> | ||
</select> | ||
</div> | ||
|
||
<div id="mainMap"></div> | ||
|
||
</div> | ||
|
||
<script src="/index.js"></script> | ||
|
||
</body> | ||
|
||
|
||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
|
||
var mainMap = L.map('mainMap').setView([32.0795, 34.7812], 14); | ||
|
||
var tiles = L.tileLayer('https://api.tiles.mapbox.com/v4/{id}/{z}/{x}/{y}.png?access_token={accessToken}', { | ||
id: 'mapbox.streets', | ||
accessToken: 'pk.eyJ1IjoiaWRvY28iLCJhIjoiY2ptM2JnbW5lMGN6czN2bW14NXUzMGZ2YyJ9.xIvjUlL3cPhak8p0ucOnxg' | ||
}).addTo(mainMap); | ||
|
||
async function foo() { | ||
|
||
// read our JSON | ||
let response = await fetch('https://mds.bird.co/gbfs/tel-aviv/free_bikes'); | ||
let user = await response.json(); | ||
|
||
} | ||
|
||
foo(); |