-
Notifications
You must be signed in to change notification settings - Fork 823
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Former-commit-id: 9f8d8dc Former-commit-id: ee023d731667979da361b72faba7f94c90ded15d
- Loading branch information
Showing
42 changed files
with
1,939 additions
and
2 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
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 |
---|---|---|
@@ -1 +1 @@ | ||
078076acf36baf240c68f0cb3ae916aa1683d9d7 | ||
30e82d874c2de6e2217e4d82f2e2bb787ab09c63 |
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,16 @@ | ||
(function(exports) { | ||
"use strict"; | ||
|
||
function initMap() { | ||
new google.maps.Map(document.getElementById("map"), { | ||
mapId: "8e0a97af9386fef", | ||
center: { | ||
lat: 48.85, | ||
lng: 2.35 | ||
}, | ||
zoom: 12 | ||
}); | ||
} | ||
|
||
exports.initMap = initMap; | ||
})((this.window = this.window || {})); |
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,40 @@ | ||
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script> | ||
<script | ||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCb1xprYSpXd0q_yDsJ1W2UGhfl9_YGKU0&callback=initMap&libraries=&v=beta&map_ids=8e0a97af9386fef" | ||
defer | ||
></script> | ||
<style type="text/css"> | ||
/* Always set the map height explicitly to define the size of the div | ||
* element that contains the map. */ | ||
#map { | ||
height: 100%; | ||
} | ||
|
||
/* Optional: Makes the sample page fill the window. */ | ||
html, | ||
body { | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
<script> | ||
(function(exports) { | ||
"use strict"; | ||
|
||
function initMap() { | ||
new google.maps.Map(document.getElementById("map"), { | ||
mapId: "8e0a97af9386fef", | ||
center: { | ||
lat: 48.85, | ||
lng: 2.35 | ||
}, | ||
zoom: 12 | ||
}); | ||
} | ||
|
||
exports.initMap = initMap; | ||
})((this.window = this.window || {})); | ||
</script> | ||
|
||
<div id="map"></div> |
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,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Using a Map Id</title> | ||
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script> | ||
<script | ||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCb1xprYSpXd0q_yDsJ1W2UGhfl9_YGKU0&callback=initMap&libraries=&v=beta&map_ids=8e0a97af9386fef" | ||
defer | ||
></script> | ||
<style type="text/css"> | ||
/* Always set the map height explicitly to define the size of the div | ||
* element that contains the map. */ | ||
#map { | ||
height: 100%; | ||
} | ||
|
||
/* Optional: Makes the sample page fill the window. */ | ||
html, | ||
body { | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
<script> | ||
(function(exports) { | ||
"use strict"; | ||
|
||
function initMap() { | ||
new google.maps.Map(document.getElementById("map"), { | ||
mapId: "8e0a97af9386fef", | ||
center: { | ||
lat: 48.85, | ||
lng: 2.35 | ||
}, | ||
zoom: 12 | ||
}); | ||
} | ||
|
||
exports.initMap = initMap; | ||
})((this.window = this.window || {})); | ||
</script> | ||
</head> | ||
<body> | ||
<div id="map"></div> | ||
</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,47 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Using a Map Id</title> | ||
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script> | ||
<script | ||
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap&libraries=&v=beta&map_ids=8e0a97af9386fef" | ||
defer | ||
></script> | ||
<style type="text/css"> | ||
/* Always set the map height explicitly to define the size of the div | ||
* element that contains the map. */ | ||
#map { | ||
height: 100%; | ||
} | ||
|
||
/* Optional: Makes the sample page fill the window. */ | ||
html, | ||
body { | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
</style> | ||
<script> | ||
(function(exports) { | ||
"use strict"; | ||
|
||
function initMap() { | ||
new google.maps.Map(document.getElementById("map"), { | ||
mapId: "8e0a97af9386fef", | ||
center: { | ||
lat: 48.85, | ||
lng: 2.35 | ||
}, | ||
zoom: 12 | ||
}); | ||
} | ||
|
||
exports.initMap = initMap; | ||
})((this.window = this.window || {})); | ||
</script> | ||
</head> | ||
<body> | ||
<div id="map"></div> | ||
</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,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Using a Map Id</title> | ||
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script> | ||
<script | ||
src="https://maps.googleapis.com/maps/api/js?key=&callback=initMap&libraries=&v=beta&map_ids=8e0a97af9386fef" | ||
defer | ||
></script> | ||
<!-- jsFiddle will insert css and js --> | ||
</head> | ||
<body> | ||
<div id="map"></div> | ||
</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,22 @@ | ||
<!-- [START maps_map_id_style] --> | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Using a Map Id</title> | ||
<script src="https://polyfill.io/v3/polyfill.min.js?features=default"></script> | ||
<!-- [START maps_map_id_style_html_head_api] --> | ||
<script | ||
src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&callback=initMap&libraries=&v=beta&map_ids=8e0a97af9386fef" | ||
defer | ||
></script> | ||
<!-- [END maps_map_id_style_htmll_head_api] --> | ||
<link rel="stylesheet" type="text/css" href="./style.css" /> | ||
<script src="./app.js"></script> | ||
</head> | ||
<body> | ||
<!-- [START maps_map_id_style_html] --> | ||
<div id="map"></div> | ||
<!-- [END maps_map_id_style_html] --> | ||
</body> | ||
</html> | ||
<!-- [END maps_map_id_style] --> |
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,16 @@ | ||
/* [START maps_map_id_style] */ | ||
/* Always set the map height explicitly to define the size of the div | ||
* element that contains the map. */ | ||
#map { | ||
height: 100%; | ||
} | ||
|
||
/* Optional: Makes the sample page fill the window. */ | ||
html, | ||
body { | ||
height: 100%; | ||
margin: 0; | ||
padding: 0; | ||
} | ||
|
||
/* [END maps_map_id_style] */ |
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,71 @@ | ||
(function(exports) { | ||
"use strict"; | ||
|
||
// eslint-disable no-undef | ||
|
||
// Initialize and add the map | ||
|
||
function initMap() { | ||
let markers = []; | ||
let collisionBehavior = google.maps.CollisionBehavior.REQUIRED; | ||
exports.map = new google.maps.Map(document.getElementById("map"), { | ||
mapId: "3a3b33f0edd6ed2a", | ||
center: { | ||
lat: 47.609414458375674, | ||
lng: -122.33897030353548 | ||
}, | ||
zoom: 17 | ||
}); | ||
const menuList = document.querySelector(".mdc-list"); // Add the behaviors to the select options | ||
|
||
for (let [key, value] of Object.entries(google.maps.CollisionBehavior)) { | ||
const item = document.createElement("LI"); | ||
item.classList.add("mdc-list-item"); | ||
item.setAttribute("data-value", key); | ||
const itemText = document.createElement("SPAN"); | ||
itemText.classList.add("mdc-list-item__text"); | ||
itemText.innerText = value; | ||
item.appendChild(itemText); | ||
menuList.appendChild(item); | ||
} | ||
|
||
exports.select = new mdc.select.MDCSelect( | ||
document.querySelector(".mdc-select") | ||
); | ||
exports.select.listen("MDCSelect:change", () => { | ||
collisionBehavior = exports.select.value; | ||
markers.forEach(function(marker) { | ||
marker.set("collisionBehavior", collisionBehavior); | ||
}); | ||
}); | ||
exports.select.value = collisionBehavior; // Create some markers on the map | ||
|
||
markers = [ | ||
[-122.3402, 47.6093], | ||
[-122.3402, 47.6094], | ||
[-122.3403, 47.6094], | ||
[-122.3384, 47.6098], | ||
[-122.3389, 47.6095], | ||
[-122.3396, 47.6095], | ||
[-122.3379, 47.6097], | ||
[-122.3378, 47.6097], | ||
[-122.3396, 47.6091], | ||
[-122.3383, 47.6089], | ||
[-122.3379, 47.6093], | ||
[-122.3381, 47.6095], | ||
[-122.3378, 47.6095] | ||
].map( | ||
([lng, lat]) => | ||
new google.maps.Marker({ | ||
position: new google.maps.LatLng({ | ||
lat, | ||
lng | ||
}), | ||
map: exports.map, | ||
collisionBehavior: collisionBehavior | ||
}) | ||
); | ||
} | ||
|
||
exports.initMap = initMap; | ||
})((this.window = this.window || {})); |
Oops, something went wrong.