-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.php
96 lines (96 loc) · 5.62 KB
/
index.php
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<?php
$url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-KBLX9LP');</script>
<!-- End Google Tag Manager -->
<meta charset="utf-8">
<title>The Arrogance of Space Mapping Tool #ArroganceOfSpace</title>
<meta name="description" content="Useful tool to show how much space is taken in our cities by cars. Load an image and easily mark type of space for any city. Inspired by Copehagenize.">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="shortcut icon" href="favicon.png"/>
<script type="text/javascript" src="https://code.jquery.com/jquery.min.js"></script>
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/pure-min.css" integrity="sha384-oAOxQR6DkCoMliIh8yFnu25d7Eq/PHS21PClpwjOTeU2jRSq11vu66rf90/cZr47" crossorigin="anonymous">
<link rel="stylesheet" href="https://unpkg.com/[email protected]/build/grids-responsive-min.css" crossorigin="anonymous">
<link href="arrogance.css" rel="stylesheet">
<meta property="og:title" content="The Arrogance of Space Mapping Tool #ArroganceOfSpace">
<meta property="og:description" content="Useful tool to show how much space is taken in our cities by cars. Load an image and easily mark type of space for any city.">
<meta property="og:image" content="<?php echo $url; ?>arrogance.png">
<meta property="og:url" content="<?php echo $url; ?>">
<meta property="og:type" content="website">
<meta name="twitter:title" content="The Arrogance of Space Mapping Tool #ArroganceOfSpace">
<meta name="twitter:description" content="Useful tool to show how much space is taken in our cities by cars. Load an image and easily mark type of space for any city.">
<meta name="twitter:image" content="<?php echo $url; ?>arrogance.png">
<meta name="twitter:card" content="summary_large_image">
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KBLX9LP"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<div class="pure-g">
<div class="pure-u-1 pure-u-lg-1-5">
<div class="l-box">
<h1>The Arrogance of Space Mapping Tool</h1>
<small>Upload an aerial or satellite photo from your city - an intersection or neighbourhood - and start mapping how much space is allocated to cars, pedestrians and bikes.</small>
</div>
<div class="l-box">
<form action="#" class="pure-form">
<fieldset>
<legend>Select:</legend>
<label for="gridimage">
Image: <input type="file" id="gridimage">
</label><br>
<small>Choose an image.</small><br>
<small id="imagedetails"></small><br>
<label for="gridblocksize">
Block size: <input type="text" id="gridblocksize">
</label><br>
<small>Choose a grid block size. Smaller = more work.</small><br>
<label for="eraseropacity">
Opacity: <input type="range" min="0.1" max="0.8" value="0.5" step="0.1" id="eraseropacity">
</label>
</fieldset>
</form>
</div>
<div class="l-box">
<div id="tools"></div>
<small>
<ul>
<li>Select a color tool.</li>
<li>Click and drag to draw the color onto the map.</li>
<li>Right click to add a marker (e.g. cyclist/ped counts.)</li>
<li>Scroll or use your mouse wheel to cycle through colors.</li>
<li>Press backspace to remove a marker.</li>
</ul>
</small>
</div>
<div class="l-box">
<a id="save" class="pure-button pure-button-primary" download="arrogance.png" href="#">Save image</a> <a id="savegrid" class="pure-button pure-button-warning" download="arrogance-grid.png" href="#">Save colors only</a>
</div>
<div class="l-box">
<a id="reset" class="pure-button pure-button-secondary" href="#">Reset canvas</a>
</div>
<div class="l-box">
<small><a href="https://medium.com/@colville_andersen/the-arrogance-of-space-93a7419b0278">Concept</a> by <a href="https://colville-andersen.com/">Mikael Colville-Andersen</a>, Copenhagenize.</small><br>
<small>This tool developed by <a href="https://www.ambience.sk/about/">Daniel Duris</a> for the <a href="https://cyklokoalicia.sk/en/">Cycling Coalition</a>. See <a href="https://github.com/nekromoff/arrogance-of-space">code on Github</a>. #ArroganceOfSpace</small>
</div>
</div>
<div class="pure-u-1 pure-u-lg-4-5" id="editor">
<div id="container">
<canvas id="canvas" width="900" height="900"></canvas>
</div>
</div>
</div>
<div id="modal">Please wait...</div>
<canvas id="virtual"></canvas>
<script type="text/javascript" language="javascript" src="arrogance.js?counts"></script>
</body>
</html>