Skip to content

A web based indoor viewer that display vector tiles as well as GeoJSON, OSM and IMDF files

License

Notifications You must be signed in to change notification settings

indoorequal/indoorequal.org

Folders and files

NameName
Last commit message
Last commit date

Latest commit

a880185 · Jun 5, 2024
May 21, 2024
May 11, 2024
Nov 5, 2020
Jun 3, 2024
Jun 3, 2024
Jun 5, 2024
May 22, 2024
May 21, 2024
Mar 15, 2020
May 14, 2023
May 21, 2024
May 11, 2024
May 21, 2024
Aug 12, 2019
May 14, 2024
Feb 19, 2022
Nov 4, 2020
May 14, 2024
Feb 26, 2020
Jun 5, 2024
Jan 6, 2022
Apr 19, 2024
Jun 5, 2024

Repository files navigation

indoorequal.org

A web based indoor viewer.

Discover:

Development

Using docker:

./script/server

And visit http://localhost:1234

Configuration

A few configuration options are available by editing the config.json file:

  • mapTilerApiKey: the MapTiler API Key
  • tilesUrl: The URL of the indoor= tileJSON
  • indoorEqualApiKey: the indoor= API Key (optional if you don't use the official indoor= tileJSON
  • indoorMinZoom: The minimum level of zoom when the indoor features are displayed

Remote Command API

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

Message: { command: 'preview', file: new File([], 'filename.geojson') }

With an URL

Message: { command: 'preview', url: 'https://exemple.net/file.osm' }

Set level

Message: { command: 'level', level: '0' }

Set coordinates

Via the bounding box

Message: { command: 'coordinates', bbox: [1.971874, 48.921259, 2.299404, 49.029990] }

Via the center and the zoom

Message: { command: 'coordinates', center: { lng: 1.971874, lat: 48.921259 }, zoom: 1 }

Get levels

Message: { command: 'levels' }

Response: { event: 'levels', levels: ['0', '1', '2']}

Translation

Translations are managed via Transifex, go here to translate it in your language.

Deploy

Using docker:

docker build -t indoor .
docker run -p 8080:80 indoor

License

GNU AGPL v3