This is an Electron application developed to generate GeoJSON annotation data for use in the LIMMMA platform.
- Node.js (v18 or higher recommended)
- npm (comes with Node.js)
-
Clone the repository:
git clone <repository-url> cd offLIMMMA
-
Install dependencies:
npm install
Run the application in development mode with hot-reloading:
npm run devBuild and run the production version:
npm startYou can specify an initial map view using a bounding box parameter with support for different coordinate systems:
# Format: --bbox=minX,minY,maxX,maxY[,zoom] --epsg=EPSG_CODE
# Using WGS84 (default, longitude/latitude):
npm start -- --bbox=106.8,-6.2,106.9,-6.1,12
# Using a different EPSG code (e.g., UTM Zone 48N):
npm start -- --bbox=500000,6900000,600000,7000000 --epsg=32648
# With the packaged Windows executable:
OffLIMMMA\ 1.0.0.exe --bbox=106.8,-6.2,106.9,-6.1,12 --epsg=4326
# Or from command line/PowerShell:
.\release\OffLIMMMA\ 1.0.0.exe --bbox=106.8,-6.2,106.9,-6.1,12The bounding box parameters:
minX: Minimum X coordinate (west/east depending on projection)minY: Minimum Y coordinate (south/north depending on projection)maxX: Maximum X coordinatemaxY: Maximum Y coordinatezoom: Optional zoom level (if omitted, the map will auto-fit to the bounding box)--epsg: EPSG code for the coordinate system (default: 4326 for WGS84)
Common EPSG codes:
4326: WGS84 (longitude/latitude) - default3857: Web Mercator (used internally by the map)32648: UTM Zone 48N (and other UTM zones)- Many other coordinate systems supported by OpenLayers
Create standalone executables for distribution:
# Windows
npm run package:win
# macOS (requires macOS)
npm run package:mac
# Linux
npm run package:linux
# Current platform
npm run packageBuilt packages will be available in the release/ directory.
If you're on Windows or Linux and need to build macOS packages, you can use Docker:
Using PowerShell (Windows):
.\scripts\docker-build-mac.ps1Using Bash (Linux/WSL/Git Bash):
chmod +x scripts/docker-build-mac.sh
./scripts/docker-build-mac.shUsing Docker Compose:
docker-compose run --rm builder npm run package:mac:zipUsing Docker directly:
# Build the Docker image
docker build -t offlimmma-builder .
# Build macOS package (as ZIP, since DMG requires macOS tools)
docker run --rm -v "$(pwd)/release:/app/release" -v "$(pwd)/.cache:/app/.cache" offlimmma-builder npm run package:mac:zipNote: Building macOS packages on non-macOS systems has some limitations:
- Code signing will be skipped (already configured with
forceCodeSigning: false) - The package will be built as a ZIP file instead of DMG (DMG requires macOS-specific tools)
- Users can extract the ZIP and run the
.appbundle directly - Some advanced macOS features may not be available
The built ZIP file will be available in the release/ directory. To convert it to a DMG on macOS, you can use the hdiutil command or rebuild using npm run package:mac on a Mac.
You can bake a default bounding box into the packaged executable:
# Windows with default bounding box
npm run package:win:bbox -- --bbox=106.8,-6.2,106.9,-6.1,12 --epsg=4326
# macOS with default bounding box (requires macOS)
npm run package:mac:bbox -- --bbox=106.8,-6.2,106.9,-6.1,12
# macOS with default bounding box via Docker (Windows/Linux) - builds as ZIP
docker run --rm -v "$(pwd)/release:/app/release" -v "$(pwd)/.cache:/app/.cache" offlimmma-builder npm run package:mac:zip -- --bbox=106.8,-6.2,106.9,-6.1,12
# Linux with default bounding box
npm run package:linux:bbox -- --bbox=106.8,-6.2,106.9,-6.1,12 --epsg=4326Note: The -- is required to pass arguments to the script. Without it, npm will try to interpret them as npm config options.
When the packaged executable runs, it will automatically load to the specified bounding box. Users can still override this by passing --bbox arguments when launching the executable.
MIT