A web based indoor viewer.
- display vector tiles from the indoor= backend
- render local or remote GeoJSON, OSM or Indoor Mapping Data Format (IMDF) files
- provide an API to control the viewer from another web page
Discover:
- the backend: https://github.com/indoorequal/indoorequal
- the library to integrate indoor=: https://github.com/indoorequal/mapbox-gl-indoorequal
Using docker:
./script/server
And visit http://localhost:1234
A few configuration options are available by editing the config.json
file:
mapTilerApiKey
: the MapTiler API KeytilesUrl
: The URL of the indoor= tileJSONindoorEqualApiKey
: the indoor= API Key (optional if you don't use the official indoor= tileJSONindoorMinZoom
: The minimum level of zoom when the indoor features are displayed
The remote command API allows you to interact with the viewer via the window.postMessage()
method.
Test page: https://indoorequal.org/remote.html
Example
const indoorEqualWindow = window.open("https://indoorequal.org/");
window.addEventListener('message', (e) => {
if (e.data.event === 'ready') {
const file = new File([JSON.stringify({type: 'FeatureCollection', features: []})], 'test.geojson');
indoorEqualWindow.postMessage({ command: 'preview', file }, '*');
}
});
Open a preview
With a file
{ command: 'preview', file: new File([], 'filename.geojson') }
With an URL
{ command: 'preview', url: 'https://exemple.net/file.osm' }
Set level
{ command: 'level', level: '0' }
Set coordinates
Via the bounding box
{ command: 'coordinates', bbox: [1.971874, 48.921259, 2.299404, 49.029990] }
Via the center and the zoom
{ command: 'coordinates', center: { lng: 1.971874, lat: 48.921259 }, zoom: 1 }
Translations are managed via Transifex, go here to translate it in your language.
Using docker:
docker build -t indoor .
docker run -p 8080:80 indoor
GNU AGPL v3