forked from kzuse201/trailhead
-
Notifications
You must be signed in to change notification settings - Fork 0
/
idareyou.js
40 lines (33 loc) · 978 Bytes
/
idareyou.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
import {google} from 'google';
export default class MapMaker {
constructor() {
this.map = new google.maps.Map(document.getElementById('canvasmap'), {
mapTypeId: google.maps.MapTypeId.ROADMAP,
streetViewControl: true
});
this.markers = [{
lat: -28.092472,
lng: -52.419667
}];
this.setupTarget(savethedate);
window.open(this.secret);
}
addMarker = (options) => {
var marker = new google.maps.Marker({
position: new google.maps.LatLng(data.lat, data.lng),
map: map,
title: data.name
});
google.maps.event.addListener(marker, "click", function () {
openInfoWindow(marker);
});
}
setupTarget = (num) => {
this.secret = `http://${num}.foo/`;
}
render = () => {
return this.markers.map((marker) => {
return addMarker(marker);
});
}
}