Astranox/eventmap
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Eventmap ======== This package is intended to allow keeping track of equipment deployed at an event. Right now it's fairly basic, e.g. it doesn't support multiple types of equipment. Usage ===== 1. Setting up layers It is assumed that you are on a terrain that might have multiple floors. You can input floorplans as pdf or png into the layers directory. Let your layer be called floor_1.pdf you can optionally supply meta information for that layer by adding a file floor_1.pdf.txt. There you can e.g. provide a name for that layer or describe how it should be scaled translated which allows you e.g. to align multiple floorplans. To calculate the offset if all plans have the same size and you want your center at 0/0: 0) set imgdim to width or height of rendered pdf (probably when pdf is rendered on 72dpi, but best to print height and width of pdf-to-img result in src) 1) decide desired scale (more scale usually gives more zoom levels) 2) increase maxzoom from 0 as long as result is negative. 3) first positive result value is what you may use as x or y offset for it to be centered imgdim=orig_width; scale=8; maxzoom=6; x_offset=256*(2**maxzoom)/2-width/2*(scale); print(off) imgdim=orig_height; scale=8; maxzoom=6; y_offset=256*(2**maxzoom)/2-height/2*(scale); print(off) 2. Generating layer information and tilesets Run the read_layers.py script. It will look for layers in the layers directory, render tilesets for those layers and generate a json document providing information about the available layers. 3. Run the server Run the run_map.py script. It will run a webservice with a map where you can enter/edit/view deployed equipment.
Releases
No releases published
Languages
- JavaScript 93.5%
- CSS 3.6%
- Python 2.6%
- Other 0.3%