UNPKG

awaken-direct-democracy

Version:

This is the functional skeleton / working mock up of a disruptive app to increase voter turnout and participation driven at the start by just one person - Tom Atkinson in New Zealand - after watching in horror the signing of the TPPA in Auckland February

46 lines (35 loc) 1.05 kB
import { Component } from '@angular/core'; import { ConferenceData } from '../../providers/conference-data'; declare var google: any; @Component({ selector: 'page-map', templateUrl: 'map.html' }) export class MapPage { constructor(public confData: ConferenceData) {} ionViewDidLoad() { this.confData.getMap().then(mapData => { let mapEle = document.getElementById('map'); let map = new google.maps.Map(mapEle, { center: mapData.find(d => d.center), zoom: 16 }); mapData.forEach(markerData => { let infoWindow = new google.maps.InfoWindow({ content: `<h5>${markerData.name}</h5>` }); let marker = new google.maps.Marker({ position: markerData, map: map, title: markerData.name }); marker.addListener('click', () => { infoWindow.open(map, marker); }); }); google.maps.event.addListenerOnce(map, 'idle', () => { mapEle.classList.add('show-map'); }); }); } }