-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbrowse.html
135 lines (119 loc) · 3.82 KB
/
browse.html
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
<!DOCTYPE html>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<link href='https://api.mapbox.com/mapbox-gl-js/v1.11.0/mapbox-gl.css' rel='stylesheet' />
<link href='https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.26.0/codemirror.min.css' rel='stylesheet' />
<link href='https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/theme/monokai.min.css' rel='stylesheet' />
<link rel="stylesheet" href="https://jqueryui.com/jquery-wp-content/themes/jqueryui.com/style.css">
<link rel="stylesheet" href="https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
<!-- <link href='https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/addon/scroll/simplescrollbars.min.css' rel='stylesheet' /> -->
<link rel='stylesheet' type='text/css' href='./index.css'>
<script src="https://npmcdn.com/@turf/turf/turf.min.js"></script>
<script src='https://api.mapbox.com/mapbox-gl-js/v1.11.0/mapbox-gl.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.26.0/codemirror.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/keymap/sublime.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/mode/sql/sql.min.js'></script>
<script src='https://cdnjs.cloudflare.com/ajax/libs/codemirror/5.33.0/addon/scroll/simplescrollbars.min.js'></script>
<script src="https://code.jquery.com/jquery-1.12.4.js"></script>
<script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
<script></script>
<style>
.ui-tabs {
height: 100% !important;
width: 90% !important;
}
.ui-tabs .ui-tabs-panel {
height: 90% !important;
width: 100% !important;
padding: 0px 5px 0px 0px !important;
}
.ui-tabs .ui-tabs-nav {
padding: unset !important;
}
.ui-tabs-widget-content {
min-height: 90% !important;
width: 100% !important;
border: 1px !important;
border-color: #333 !important;
}
.ui-widget-content {
background: hsl(185, 2%, 10%) !important;
color: lightgrey !important;
border: unset !important;
margin-right: 15px !important;
}
.ui-widget-header {
background: hsl(185, 2%, 10%) !important;
border: unset !important;
}
.propTab td{
border: unset;
padding: 0;
}
.propTab small{
color: #5e5353 !important;
}
.propTab strong{
color: black !important;
}
#terminate {
display:null
}
</style>
</head>
<body>
<div id='app'>
<header>
<p id='title'>
<a href='https://github.com/jvail/spatiasql.js'>spatiasql.js</a>
- query sample db or choose a file
(<a href='https://www.gaia-gis.it/fossil/libspatialite/index'>SpatiaLite</a>
or
<a href='http://www.geopackage.org/#sampledata'>GeoPackage</a>).</p>
</header>
<div id='main'>
<div id='control'>
<div id='panel'>
<button id='listtables'>elenco tabelle</button>
<button id='run'>esegui query</button>
<button style="display: none;" id='terminate'>termina query</button>
<input id='file' type='file'/>
<span id='error'></span>
<span id='numrows'></span>
<span id='time'></span>
</div>
<div id='editor'>
<textarea id='code' name='code'>
/*
You can draw a geometry on the map by including 'geojson' in a column name.
click on "run query" to see sample result
*/
SELECT comune,AsGeoJSON(geom) AS geojson
FROM comuni
</textarea>
</div>
</div>
<div id="tabs">
<ul>
<li><a id="m_tab" href="#map_panel">MAPPA</a></li>
<li><a id="t_tab" href="#table_panel">TABELLA</a></li>
</ul>
<div id="map_panel">
<div id='map'></div>
</div>
<div id="table_panel">
<div id='tbl'></div>
</div>
</div>
</div>
</div>
<script>
$( function() {
$( "#tabs" ).tabs();
} );
</script>
<script src='./index.js'></script>
</body>
</html>