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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
|
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>everything shingled</title>
<meta name="viewport" content="width=device-width, minimum-scale=1, maximum-scale=1">
<meta name="description" content="A demo of everything using a shingled service">
<meta name="author" content="Ryan Westphal">
<link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/themes/blitzer/jquery-ui.css" />
<link rel="stylesheet" type="text/css" href="css/style.css" />
<style type="text/css">
h2 { display: inline-block; }
@media only screen and (min-width: 800px)
{
h2 { display: inline-block; min-width: 8em; }
}
h3 { display: inline-block; margin-left: 2em; }
#map
{
position: fixed;
left: 0;
top: 0;
right: 0;
bottom: 0;
}
/* a label CSS example: all text for labels on the hydro service will be blue! */
#massgis_hydrography
{
color: blue;
}
.modes { margin: .5em 0; }
#drawStyle label span { display: inline-block; font-weight: bold; text-align: right; width: 7em; }
#drawStyle input { width: 6em; }
.scrollOption-container, .scrollOptions, .clickTargets, .toggleTargets { display: inline-block; }
</style>
</head>
<body>
<div>
<div id="map">
</div>
<div class="info mobile-shrink">
<div class="links not-mobile">
<a href="../" class="docLink">< docs</a>
<a href="http://jsfiddle.net/ryanttb/69mFE/embedded/" class="fiddleLink"><img src="img/jsfiddle.png" alt="" /> jsFiddle ></a>
</div>
<h1 class="not-mobile">shingled</h1>
<p class="not-mobile">The everything demo, shingled edition!</p>
<section class="not-mobile">
<h2>info</h2> <button id="toggle-info" type="button" title="click to view some map info">show / hide</button>
<table id="mapInfo" style="display: none;">
<tr><th>bbox</th><td data-option="bbox"></td></tr>
<tr><th>center</th><td data-option="center"></td></tr>
<tr><th>zoom</th><td data-option="zoom"></td></tr>
</table>
</section>
<form>
<section>
<h2>basics</h2>
<input type="checkbox" id="togglePannable" name="togglePannable" value="togglePannable" checked="checked" /><label for="togglePannable">pannable</label>
<div class="scrollOption-container not-mobile">
<h3>scroll</h3>
<div class="scrollOptions">
<input type="radio" id="scrollOptionDefault" name="scrollOption" value="default" checked="checked" /><label for="scrollOptionDefault">default / scroll</label>
<input type="radio" id="scrollOptionOff" name="scrollOption" value="off" /><label for="scrollOptionOff">off</label>
</div>
</div>
</section>
<section>
<h2>mode</h2> <button id="change-mode" type="button" title="click to change the mode">pan</button>
<div id="modeOptions" style="display: none;">
<div class="modes">
<input type="radio" id="static" name="mode" value="static" /><label for="static">static</label>
<input type="radio" id="pan" name="mode" value="pan" checked="checked" /><label for="pan">pan</label>
<input type="radio" id="zoom" name="mode" value="zoom" /><label for="zoom">zoom</label>
</div>
<div class="modes">
<input type="radio" id="drawPoint" name="mode" value="drawPoint" /><label for="drawPoint">drawPoint</label>
<input type="radio" id="drawLineString" name="mode" value="drawLineString" /><label for="drawLineString">drawLineString</label>
<input type="radio" id="drawPolygon" name="mode" value="drawPolygon" /><label for="drawPolygon">drawPolygon</label>
</div>
<div class="modes">
<!--
jQuery Geo supports custom modes by letting you set the mode option to
any string you want. You can set a cursor for your custom mode using the
cursors option. When on a custom mode, you will get the geomapclick event.
-->
<input type="radio" id="remove" name="mode" value="remove" /><label for="remove">remove</label>
</div>
<div class="modes">
<input type="radio" id="measureLength" name="mode" value="measureLength" /><label for="measureLength">measureLength</label>
<input type="radio" id="measureArea" name="mode" value="measureArea" /><label for="measureArea">measureArea</label>
</div>
</div>
</section>
<section id="shapeLabels" style="display: none;">
<label>
<h2>label</h2>
<input type="text" name="shapeLabel" />
</label>
</section>
<div class="not-mobile">
<section id="drawStyle" style="display: none;">
<h2>style</h2>
<div>
<label><span>color</span> <input type="color" name="color" value="#7f0000" /></label>
<label><span>opacity</span> <input type="text" name="opacity" value="1.0" /></label>
</div>
<div>
<label><span>fill</span> <input type="color" name="fill" value="" /></label>
<label><span>fillOpacity</span> <input type="text" name="fillOpacity" value=".2" /></label>
</div>
<div>
<label><span>stroke</span> <input type="color" name="stroke" value="" /></label>
<label><span>strokeOpacity</span> <input type="text" name="strokeOpacity" value="1" /></label>
</div>
<div>
<label><span>strokeWidth</span> <input type="number" name="strokeWidth" value="2" /></label>
</div>
<div>
<label><span>width</span> <input type="number" name="width" value="8" /></label>
<label><span>height</span> <input type="number" name="height" value="8" /></label>
</div>
<div>
<label><span>borderRadius</span> <input type="number" name="borderRadius" value="8" /></label>
</div>
</section>
</div>
<section id="clickTarget" style="display: none;">
<h2>target</h2>
<div class="clickTargets">
<input type="radio" id="clickTargetWidget" name="clickTarget" value="widget" checked="checked" /><label for="clickTargetWidget">widget</label>
<input type="radio" id="clickTargetBasemapService" name="clickTarget" value="massgis_basemap" /><label for="clickTargetBasemapService">basemap</label>
<input type="radio" id="clickTargetHydroService" name="clickTarget" value="massgis_hydrography" /><label for="clickTargetHydroService">hydro</label>
</div>
</section>
<section id="serviceToggle">
<h2>toggle</h2>
<div class="toggleTargets">
<input type="checkbox" id="toggleTargetBasemapService" name="toggleTarget" value="massgis_basemap" checked="checked" /><label for="toggleTargetBasemapService">basemap</label>
<input type="checkbox" id="toggleTargetHydroService" name="toggleTarget" value="massgis_hydrography" checked="checked" /><label for="toggleTargetHydroService">hydro</label>
</div>
<section>
<section id="zoomButtons">
<h2>zoom</h2>
<button id="zoomOut" type="button">out</button>
<button id="zoomIn" type="button">in</button>
</section>
</form>
</div>
</div>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.16/jquery-ui.min.js"></script>
<script src="http://code.jquerygeo.com/jquery.geo-1.0a4.min.js"></script>
<script src="js/all-shingled.js"></script>
<script>
var _gaq = [['_setAccount', 'UA-26084853-1'], ['_trackPageview']];
(function (d, t) {
var g = d.createElement(t), s = d.getElementsByTagName(t)[0]; g.async = 1;
g.src = ('https:' == location.protocol ? '//ssl' : '//www') + '.google-analytics.com/ga.js';
s.parentNode.insertBefore(g, s);
} (document, 'script'));
</script>
</body>
</html>
|