Ok. What I did is to replicate the local pascal app.
The file is 'renderer.js':
// This file is required by the index.html file and will
// be executed in the renderer process for that window.
// All of the Node.js APIs are available in this process.
const qxMapUrl = 'https://macpgmr.github.io/iApps/qxmap/index.html'
var locations = [
{
name: 'Ouray',
lat: 38.02,
lon: -107.67,
display: '7,792 feet'
},
{
name: 'Silverton',
lat: 37.81,
lon: -107.66,
display: '9,308 feet'
},
{
name: 'Telluride',
lat: 37.94,
lon: -107.81,
display: '8,750 feet'
}
]
document.location.href = `${qxMapUrl}?locations=${JSON.stringify(locations)}`
That's all to it. But of course we can download that website and run it directly within electron.
This script can be executed for example in chrome console and will work the same as in electron.
These are the steps to get it working under Windows with Electron: (Sorry I only have Windows)
1) Download Electron here (41.1 MB)
https://github.com/electron/electron/releases/download/v1.6.2/electron-v1.6.2-win32-ia32.zip2) Uncompress it, then in the folder 'resources' create a folder 'app' and put everything from this repository:
https://github.com/electron/electron-quick-start3) So you have electron_folder/resources/app/renderer.js, in that file paste the code that's up in this post.
4) So you have electron_folder/resources/app/package.json, in that file change this line "name": "electron-quick-start" to read "name": "qxmap" (this is where in Local app data is stored the cache and everything else a browser stores).
Optional:
5) Rename the executable and with a resource editor change the icon / name / version info from the .exe. I use Resource Hacker.
Under mac there's another way to change the icon, under Linux the icon can't be changed.