This file contains hidden or 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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
This file contains hidden or 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
<html> | |
<head> | |
<title>TA Artist Map</title> | |
<link rel="stylesheet" type="text/css" href="style.css"> | |
<head> | |
<body> | |
<div id="map" class="map"></div> | |
<script src="map.js"></script> | |
<script async defer |
This file contains hidden or 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
function initMap (){ | |
const map = new google.maps.Map(document.querySelector('#map'), { | |
zoom: 14, | |
center: { | |
// TA | |
lat: 32.0705, // N-S | |
lng: 34.7691 // W-E | |
}, |
This file contains hidden or 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
map.data.addListener('click', event => { | |
let name = event.feature.getProperty('name'); | |
let desc = event.feature.getProperty('desc'); | |
let position = event.feature.getGeometry().get(); | |
let content = ` | |
<img style="float:left; width:10px; margin-top:30px"> | |
<div style="margin-left:120px; margin-bottom:20px;"> | |
<h2>${name}</h2> | |
<p>${desc}</p> |
OlderNewer