forked from cfra/eventmap
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathREADME
More file actions
38 lines (29 loc) · 1.63 KB
/
README
File metadata and controls
38 lines (29 loc) · 1.63 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
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.