Skip to content

Commit

Permalink
full screen map
Browse files Browse the repository at this point in the history
  • Loading branch information
idoco committed Jan 29, 2019
1 parent 6a842e3 commit af16150
Show file tree
Hide file tree
Showing 2 changed files with 73 additions and 0 deletions.
56 changes: 56 additions & 0 deletions index.html
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>
17 changes: 17 additions & 0 deletions index.js
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();

0 comments on commit af16150

Please sign in to comment.