leaflet-rails 0.4.0.alpha1

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,366 @@
1
+ /* required styles */
2
+
3
+ .leaflet-map-pane,
4
+ .leaflet-tile,
5
+ .leaflet-marker-icon,
6
+ .leaflet-marker-shadow,
7
+ .leaflet-tile-pane,
8
+ .leaflet-overlay-pane,
9
+ .leaflet-shadow-pane,
10
+ .leaflet-marker-pane,
11
+ .leaflet-popup-pane,
12
+ .leaflet-overlay-pane svg,
13
+ .leaflet-zoom-box,
14
+ .leaflet-image-layer { /* TODO optimize classes */
15
+ position: absolute;
16
+ }
17
+ .leaflet-container {
18
+ overflow: hidden;
19
+ }
20
+ .leaflet-tile-pane,
21
+ .leaflet-container,
22
+ .leaflet-corner,
23
+ .leaflet-popup {
24
+ /* TODO make this configurable */
25
+ -webkit-transform: translate3d(0,0,0);
26
+ }
27
+ .leaflet-tile,
28
+ .leaflet-marker-icon,
29
+ .leaflet-marker-shadow {
30
+ -moz-user-select: none;
31
+ -webkit-user-select: none;
32
+ user-select: none;
33
+ }
34
+ .leaflet-marker-icon,
35
+ .leaflet-marker-shadow {
36
+ display: block;
37
+ }
38
+ .leaflet-clickable {
39
+ cursor: pointer;
40
+ }
41
+ .leaflet-dragging {
42
+ cursor: move;
43
+ }
44
+ .leaflet-dragging .leaflet-clickable {
45
+ cursor: move;
46
+ }
47
+ .leaflet-container img {
48
+ max-width: none !important;
49
+ }
50
+ .leaflet-div-icon {
51
+ background: #fff;
52
+ border: 1px solid #666;
53
+ }
54
+ .leaflet-editing-icon {
55
+ border-radius: 2px;
56
+ }
57
+
58
+ .leaflet-tile-pane { z-index: 2; }
59
+
60
+ .leaflet-objects-pane { z-index: 3; }
61
+ .leaflet-overlay-pane { z-index: 4; }
62
+ .leaflet-shadow-pane { z-index: 5; }
63
+ .leaflet-marker-pane { z-index: 6; }
64
+ .leaflet-popup-pane { z-index: 7; }
65
+
66
+ .leaflet-zoom-box {
67
+ width: 0;
68
+ height: 0;
69
+ }
70
+
71
+ .leaflet-tile {
72
+ visibility: hidden;
73
+ }
74
+ .leaflet-tile-loaded {
75
+ visibility: inherit;
76
+ }
77
+
78
+ a.leaflet-active {
79
+ outline: 2px solid orange;
80
+ }
81
+
82
+
83
+ /* Leaflet controls */
84
+
85
+ .leaflet-control {
86
+ position: relative;
87
+ z-index: 7;
88
+ }
89
+ .leaflet-top,
90
+ .leaflet-bottom {
91
+ position: absolute;
92
+ }
93
+ .leaflet-top {
94
+ top: 0;
95
+ }
96
+ .leaflet-right {
97
+ right: 0;
98
+ }
99
+ .leaflet-bottom {
100
+ bottom: 0;
101
+ }
102
+ .leaflet-left {
103
+ left: 0;
104
+ }
105
+ .leaflet-control {
106
+ float: left;
107
+ clear: both;
108
+ }
109
+ .leaflet-right .leaflet-control {
110
+ float: right;
111
+ }
112
+ .leaflet-top .leaflet-control {
113
+ margin-top: 10px;
114
+ }
115
+ .leaflet-bottom .leaflet-control {
116
+ margin-bottom: 10px;
117
+ }
118
+ .leaflet-left .leaflet-control {
119
+ margin-left: 10px;
120
+ }
121
+ .leaflet-right .leaflet-control {
122
+ margin-right: 10px;
123
+ }
124
+
125
+ .leaflet-control-zoom {
126
+ -moz-border-radius: 7px;
127
+ -webkit-border-radius: 7px;
128
+ border-radius: 7px;
129
+ }
130
+ .leaflet-control-zoom {
131
+ padding: 5px;
132
+ background: rgba(0, 0, 0, 0.25);
133
+ }
134
+ .leaflet-control-zoom a {
135
+ background-color: rgba(255, 255, 255, 0.75);
136
+ }
137
+ .leaflet-control-zoom a, .leaflet-control-layers a {
138
+ background-position: 50% 50%;
139
+ background-repeat: no-repeat;
140
+ display: block;
141
+ }
142
+ .leaflet-control-zoom a {
143
+ -moz-border-radius: 4px;
144
+ -webkit-border-radius: 4px;
145
+ border-radius: 4px;
146
+ width: 19px;
147
+ height: 19px;
148
+ }
149
+ .leaflet-control-zoom a:hover {
150
+ background-color: #fff;
151
+ }
152
+ .leaflet-touch .leaflet-control-zoom a {
153
+ width: 27px;
154
+ height: 27px;
155
+ }
156
+ .leaflet-control-zoom-in {
157
+ background-image: url(images/zoom-in.png);
158
+ margin-bottom: 5px;
159
+ }
160
+ .leaflet-control-zoom-out {
161
+ background-image: url(images/zoom-out.png);
162
+ }
163
+
164
+ .leaflet-control-layers {
165
+ box-shadow: 0 1px 7px #999;
166
+ background: #f8f8f9;
167
+ -moz-border-radius: 8px;
168
+ -webkit-border-radius: 8px;
169
+ border-radius: 8px;
170
+ }
171
+ .leaflet-control-layers a {
172
+ background-image: url(images/layers.png);
173
+ width: 36px;
174
+ height: 36px;
175
+ }
176
+ .leaflet-touch .leaflet-control-layers a {
177
+ width: 44px;
178
+ height: 44px;
179
+ }
180
+ .leaflet-control-layers .leaflet-control-layers-list,
181
+ .leaflet-control-layers-expanded .leaflet-control-layers-toggle {
182
+ display: none;
183
+ }
184
+ .leaflet-control-layers-expanded .leaflet-control-layers-list {
185
+ display: block;
186
+ position: relative;
187
+ }
188
+ .leaflet-control-layers-expanded {
189
+ padding: 6px 10px 6px 6px;
190
+ font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
191
+ color: #333;
192
+ background: #fff;
193
+ }
194
+ .leaflet-control-layers input {
195
+ margin-top: 2px;
196
+ position: relative;
197
+ top: 1px;
198
+ }
199
+ .leaflet-control-layers label {
200
+ display: block;
201
+ }
202
+ .leaflet-control-layers-separator {
203
+ height: 0;
204
+ border-top: 1px solid #ddd;
205
+ margin: 5px -10px 5px -6px;
206
+ }
207
+
208
+ .leaflet-container .leaflet-control-attribution {
209
+ background-color: rgba(255, 255, 255, 0.7);
210
+ box-shadow: 0 0 5px #bbb;
211
+ margin: 0;
212
+ }
213
+
214
+ .leaflet-control-attribution,
215
+ .leaflet-control-scale-line {
216
+ padding: 0 5px;
217
+ color: #333;
218
+ }
219
+
220
+ .leaflet-container .leaflet-control-attribution,
221
+ .leaflet-container .leaflet-control-scale {
222
+ font: 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
223
+ }
224
+
225
+ .leaflet-left .leaflet-control-scale {
226
+ margin-left: 5px;
227
+ }
228
+ .leaflet-bottom .leaflet-control-scale {
229
+ margin-bottom: 5px;
230
+ }
231
+
232
+ .leaflet-control-scale-line {
233
+ border: 2px solid #777;
234
+ border-top: none;
235
+ color: black;
236
+ line-height: 1;
237
+ font-size: 10px;
238
+ padding-bottom: 2px;
239
+ text-shadow: 1px 1px 1px #fff;
240
+ background-color: rgba(255, 255, 255, 0.5);
241
+ }
242
+ .leaflet-control-scale-line:nth-child(2) {
243
+ border-top: 2px solid #777;
244
+ padding-top: 1px;
245
+ border-bottom: none;
246
+ margin-top: -2px;
247
+ }
248
+
249
+ .leaflet-touch .leaflet-control-attribution, .leaflet-touch .leaflet-control-layers {
250
+ box-shadow: none;
251
+ }
252
+ .leaflet-touch .leaflet-control-layers {
253
+ border: 5px solid #bbb;
254
+ }
255
+
256
+
257
+ /* Fade animations */
258
+
259
+ .leaflet-fade-anim .leaflet-tile, .leaflet-fade-anim .leaflet-popup {
260
+ opacity: 0;
261
+
262
+ -webkit-transition: opacity 0.2s linear;
263
+ -moz-transition: opacity 0.2s linear;
264
+ -o-transition: opacity 0.2s linear;
265
+ transition: opacity 0.2s linear;
266
+ }
267
+ .leaflet-fade-anim .leaflet-tile-loaded, .leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
268
+ opacity: 1;
269
+ }
270
+
271
+ .leaflet-zoom-anim .leaflet-tile, .leaflet-pan-anim .leaflet-tile {
272
+ -webkit-transition: none;
273
+ -moz-transition: none;
274
+ -o-transition: none;
275
+ transition: none;
276
+ }
277
+
278
+ .leaflet-zoom-anim .leaflet-objects-pane {
279
+ visibility: hidden;
280
+ }
281
+
282
+
283
+ /* Popup layout */
284
+
285
+ .leaflet-popup {
286
+ position: absolute;
287
+ text-align: center;
288
+ }
289
+ .leaflet-popup-content-wrapper {
290
+ padding: 1px;
291
+ text-align: left;
292
+ }
293
+ .leaflet-popup-content {
294
+ margin: 14px 20px;
295
+ }
296
+ .leaflet-popup-tip-container {
297
+ margin: 0 auto;
298
+ width: 40px;
299
+ height: 16px;
300
+ position: relative;
301
+ overflow: hidden;
302
+ }
303
+ .leaflet-popup-tip {
304
+ width: 15px;
305
+ height: 15px;
306
+ padding: 1px;
307
+
308
+ margin: -8px auto 0;
309
+
310
+ -moz-transform: rotate(45deg);
311
+ -webkit-transform: rotate(45deg);
312
+ -ms-transform: rotate(45deg);
313
+ -o-transform: rotate(45deg);
314
+ transform: rotate(45deg);
315
+ }
316
+ .leaflet-popup-close-button {
317
+ position: absolute;
318
+ top: 8px;
319
+ right: 8px;
320
+
321
+ width: 10px;
322
+ height: 10px;
323
+
324
+ overflow: hidden;
325
+ }
326
+ .leaflet-popup-content p {
327
+ margin: 18px 0;
328
+ }
329
+ .leaflet-popup-scrolled {
330
+ overflow: auto;
331
+ border-bottom: 1px solid #ddd;
332
+ border-top: 1px solid #ddd;
333
+ }
334
+
335
+
336
+ /* Visual appearance */
337
+
338
+ .leaflet-container {
339
+ background: #ddd;
340
+ }
341
+ .leaflet-container a {
342
+ color: #0078A8;
343
+ }
344
+ .leaflet-zoom-box {
345
+ border: 2px dotted #05f;
346
+ background: white;
347
+ opacity: 0.5;
348
+ }
349
+ .leaflet-popup-content-wrapper, .leaflet-popup-tip {
350
+ background: white;
351
+
352
+ box-shadow: 0 3px 10px #888;
353
+ -moz-box-shadow: 0 3px 10px #888;
354
+ -webkit-box-shadow: 0 3px 14px #999;
355
+ }
356
+ .leaflet-popup-content-wrapper {
357
+ -moz-border-radius: 20px;
358
+ -webkit-border-radius: 20px;
359
+ border-radius: 20px;
360
+ }
361
+ .leaflet-popup-content {
362
+ font: 12px/1.4 "Helvetica Neue", Arial, Helvetica, sans-serif;
363
+ }
364
+ .leaflet-popup-close-button {
365
+ background: white url(images/popup-close.png);
366
+ }
@@ -0,0 +1,48 @@
1
+ .leaflet-tile {
2
+ filter: inherit;
3
+ }
4
+
5
+ .leaflet-vml-shape {
6
+ width: 1px;
7
+ height: 1px;
8
+ }
9
+ .lvml {
10
+ behavior: url(#default#VML);
11
+ display: inline-block;
12
+ position: absolute;
13
+ }
14
+
15
+ .leaflet-control {
16
+ display: inline;
17
+ }
18
+
19
+ .leaflet-popup-tip {
20
+ width: 21px;
21
+ _width: 27px;
22
+ margin: 0 auto;
23
+ _margin-top: -3px;
24
+
25
+ filter: progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678);
26
+ -ms-filter: "progid:DXImageTransform.Microsoft.Matrix(M11=0.70710678, M12=0.70710678, M21=-0.70710678, M22=0.70710678)";
27
+ }
28
+ .leaflet-popup-tip-container {
29
+ margin-top: -1px;
30
+ }
31
+ .leaflet-popup-content-wrapper, .leaflet-popup-tip {
32
+ border: 1px solid #bbb;
33
+ }
34
+
35
+ .leaflet-control-zoom {
36
+ filter: progid:DXImageTransform.Microsoft.gradient(startColorStr='#3F000000',EndColorStr='#3F000000');
37
+ }
38
+ .leaflet-control-zoom a {
39
+ background-color: #eee;
40
+ }
41
+ .leaflet-control-zoom a:hover {
42
+ background-color: #fff;
43
+ }
44
+ .leaflet-control-layers-toggle {
45
+ }
46
+ .leaflet-control-attribution, .leaflet-control-layers {
47
+ background: white;
48
+ }
metadata ADDED
@@ -0,0 +1,63 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: leaflet-rails
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.4.0.alpha1
5
+ prerelease: 6
6
+ platform: ruby
7
+ authors:
8
+ - Akshay Joshi
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2012-03-03 00:00:00.000000000Z
13
+ dependencies: []
14
+ description: This gem provides the leaflet.js map display library for your Rails 3
15
+ application.
16
+ email:
17
+ - joshi.a@gmail.com
18
+ executables: []
19
+ extensions: []
20
+ extra_rdoc_files: []
21
+ files:
22
+ - .gitignore
23
+ - CHANGELOG.md
24
+ - Gemfile
25
+ - README.md
26
+ - Rakefile
27
+ - leaflet-rails.gemspec
28
+ - lib/leaflet-rails.rb
29
+ - lib/leaflet-rails/version.rb
30
+ - vendor/assets/images/layers.png
31
+ - vendor/assets/images/marker-shadow.png
32
+ - vendor/assets/images/marker.png
33
+ - vendor/assets/images/popup-close.png
34
+ - vendor/assets/images/zoom-in.png
35
+ - vendor/assets/images/zoom-out.png
36
+ - vendor/assets/javascripts/leaflet.js
37
+ - vendor/assets/stylesheets/leaflet.css
38
+ - vendor/assets/stylesheets/leaflet.ie.css
39
+ homepage: ''
40
+ licenses: []
41
+ post_install_message:
42
+ rdoc_options: []
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ none: false
47
+ requirements:
48
+ - - ! '>='
49
+ - !ruby/object:Gem::Version
50
+ version: '0'
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ none: false
53
+ requirements:
54
+ - - ! '>'
55
+ - !ruby/object:Gem::Version
56
+ version: 1.3.1
57
+ requirements: []
58
+ rubyforge_project: leaflet-rails
59
+ rubygems_version: 1.8.10
60
+ signing_key:
61
+ specification_version: 3
62
+ summary: Use leaflet.js with Rails 3.
63
+ test_files: []