forked from electron/minimal-repro
-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Description
https://github.com/mapzen/electron-quick-start/wiki/How-to-Electron-Workshop#lets-add-a-map
The template and this step results in there being town onloads, so the map does not display. Just needs a few text tweaks to give the context of where to paste the code without ending up with duplication.
https://github.com/mapzen/electron-quick-start/blob/master/index_renderer.js#L4
- Add a global map variable just above the page loading handler function and a call to initMap() inside the loading handler.
const api_key = 'mapzen-xxxxxxx';
let map; // <--- global map variable
// handle window loading event
document.getElementById('body').onload = function () {
console.log('good news: index window is loading!');
initMap(); // <--- initialize your map
};
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels