leaflet-rails 0.4.5 → 0.5.0.beta1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -12,60 +12,55 @@
12
12
  .leaflet-overlay-pane svg,
13
13
  .leaflet-zoom-box,
14
14
  .leaflet-image-layer,
15
- .leaflet-layer { /* TODO optimize classes */
15
+ .leaflet-layer {
16
16
  position: absolute;
17
+ left: 0;
18
+ top: 0;
17
19
  }
18
20
  .leaflet-container {
19
21
  overflow: hidden;
20
- outline: 0;
22
+ -ms-touch-action: none;
21
23
  }
22
24
  .leaflet-tile,
23
25
  .leaflet-marker-icon,
24
26
  .leaflet-marker-shadow {
25
- -moz-user-select: none;
26
27
  -webkit-user-select: none;
27
- user-select: none;
28
+ -moz-user-select: none;
29
+ user-select: none;
28
30
  }
29
31
  .leaflet-marker-icon,
30
32
  .leaflet-marker-shadow {
31
33
  display: block;
32
34
  }
33
- .leaflet-clickable {
34
- cursor: pointer;
35
- }
36
- .leaflet-dragging, .leaflet-dragging .leaflet-clickable {
37
- cursor: move;
38
- }
35
+ /* map is broken in FF if you have max-width: 100% on tiles */
39
36
  .leaflet-container img {
40
- /* map is broken in FF if you have max-width: 100% on tiles */
41
37
  max-width: none !important;
42
38
  }
39
+ /* stupid Android 2 doesn't understand "max-width: none" properly */
43
40
  .leaflet-container img.leaflet-image-layer {
44
- /* stupid Android 2 doesn't understand "max-width: none" properly */
45
- max-width: 15000px !important;
46
- }
47
-
48
- .leaflet-tile-pane { z-index: 2; }
49
- .leaflet-objects-pane { z-index: 3; }
50
- .leaflet-overlay-pane { z-index: 4; }
51
- .leaflet-shadow-pane { z-index: 5; }
52
- .leaflet-marker-pane { z-index: 6; }
53
- .leaflet-popup-pane { z-index: 7; }
54
-
41
+ max-width: 15000px !important;
42
+ }
55
43
  .leaflet-tile {
56
- filter: inherit;
57
- visibility: hidden;
44
+ filter: inherit;
45
+ visibility: hidden;
58
46
  }
59
47
  .leaflet-tile-loaded {
60
48
  visibility: inherit;
61
49
  }
62
-
63
50
  .leaflet-zoom-box {
64
- width: 0;
65
- height: 0;
66
- }
51
+ width: 0;
52
+ height: 0;
53
+ }
54
+
55
+ .leaflet-tile-pane { z-index: 2; }
56
+ .leaflet-objects-pane { z-index: 3; }
57
+ .leaflet-overlay-pane { z-index: 4; }
58
+ .leaflet-shadow-pane { z-index: 5; }
59
+ .leaflet-marker-pane { z-index: 6; }
60
+ .leaflet-popup-pane { z-index: 7; }
61
+
67
62
 
68
- /* Leaflet controls */
63
+ /* control positioning */
69
64
 
70
65
  .leaflet-control {
71
66
  position: relative;
@@ -110,58 +105,191 @@
110
105
  margin-right: 10px;
111
106
  }
112
107
 
113
- .leaflet-control-zoom {
114
- -moz-border-radius: 7px;
115
- -webkit-border-radius: 7px;
116
- border-radius: 7px;
108
+
109
+ /* zoom and fade animations */
110
+
111
+ .leaflet-fade-anim .leaflet-tile,
112
+ .leaflet-fade-anim .leaflet-popup {
113
+ opacity: 0;
114
+ -webkit-transition: opacity 0.2s linear;
115
+ -moz-transition: opacity 0.2s linear;
116
+ -o-transition: opacity 0.2s linear;
117
+ transition: opacity 0.2s linear;
118
+ }
119
+ .leaflet-fade-anim .leaflet-tile-loaded,
120
+ .leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
121
+ opacity: 1;
122
+ }
123
+
124
+ .leaflet-zoom-anim .leaflet-zoom-animated {
125
+ -webkit-transition: -webkit-transform 0.25s cubic-bezier(0,0,0.25,1);
126
+ -moz-transition: -moz-transform 0.25s cubic-bezier(0,0,0.25,1);
127
+ -o-transition: -o-transform 0.25s cubic-bezier(0,0,0.25,1);
128
+ transition: transform 0.25s cubic-bezier(0,0,0.25,1);
129
+ }
130
+ .leaflet-zoom-anim .leaflet-tile,
131
+ .leaflet-pan-anim .leaflet-tile,
132
+ .leaflet-touching .leaflet-zoom-animated {
133
+ -webkit-transition: none;
134
+ -moz-transition: none;
135
+ -o-transition: none;
136
+ transition: none;
137
+ }
138
+
139
+ .leaflet-zoom-anim .leaflet-zoom-hide {
140
+ visibility: hidden;
141
+ }
142
+
143
+
144
+ /* cursors */
145
+
146
+ .leaflet-clickable {
147
+ cursor: pointer;
148
+ }
149
+ .leaflet-container {
150
+ cursor: -webkit-grab;
151
+ cursor: -moz-grab;
152
+ }
153
+ .leaflet-popup-pane,
154
+ .leaflet-control {
155
+ cursor: auto;
156
+ }
157
+ .leaflet-dragging,
158
+ .leaflet-dragging .leaflet-clickable,
159
+ .leaflet-dragging .leaflet-container {
160
+ cursor: move;
161
+ cursor: -webkit-grabbing;
162
+ cursor: -moz-grabbing;
163
+ }
164
+
165
+
166
+ /* visual tweaks */
167
+
168
+ .leaflet-container {
169
+ background: #ddd;
170
+ outline: 0;
171
+ }
172
+ .leaflet-container a {
173
+ color: #0078A8;
174
+ }
175
+ .leaflet-container a.leaflet-active {
176
+ outline: 2px solid orange;
177
+ }
178
+ .leaflet-zoom-box {
179
+ border: 2px dotted #05f;
180
+ background: white;
181
+ opacity: 0.5;
182
+ }
183
+
184
+
185
+ /* general typography */
186
+ .leaflet-container {
187
+ font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
188
+ }
189
+
190
+
191
+ /* general toolbar styles */
192
+
193
+ .leaflet-bar {
194
+ box-shadow: 0 0 8px rgba(0,0,0,0.4);
195
+ border: 1px solid #888;
196
+ -webkit-border-radius: 5px;
197
+ border-radius: 5px;
198
+ }
199
+ .leaflet-bar-part {
200
+ background-color: rgba(255, 255, 255, 0.8);
201
+ border-bottom: 1px solid #aaa;
202
+ }
203
+ .leaflet-bar-part-top {
204
+ -webkit-border-radius: 4px 4px 0 0;
205
+ border-radius: 4px 4px 0 0;
206
+ }
207
+ .leaflet-bar-part-bottom {
208
+ -webkit-border-radius: 0 0 4px 4px;
209
+ border-radius: 0 0 4px 4px;
210
+ border-bottom: none;
211
+ }
212
+
213
+ .leaflet-touch .leaflet-bar {
214
+ -webkit-border-radius: 10px;
215
+ border-radius: 10px;
216
+ }
217
+ .leaflet-touch .leaflet-bar-part {
218
+ border-bottom: 4px solid rgba(0,0,0,0.3);
219
+ }
220
+ .leaflet-touch .leaflet-bar-part-top {
221
+ -webkit-border-radius: 7px 7px 0 0;
222
+ border-radius: 7px 7px 0 0;
117
223
  }
118
- .leaflet-control-zoom {
119
- padding: 5px;
120
- background: rgba(0, 0, 0, 0.25);
224
+ .leaflet-touch .leaflet-bar-part-bottom {
225
+ -webkit-border-radius: 0 0 7px 7px;
226
+ border-radius: 0 0 7px 7px;
227
+ border-bottom: none;
228
+ }
229
+
230
+
231
+ /* zoom control */
232
+
233
+ .leaflet-container .leaflet-control-zoom {
234
+ margin-left: 13px;
235
+ margin-top: 12px;
121
236
  }
122
237
  .leaflet-control-zoom a {
123
- background-color: rgba(255, 255, 255, 0.75);
238
+ width: 22px;
239
+ height: 22px;
240
+ text-align: center;
241
+ text-decoration: none;
242
+ color: black;
124
243
  }
125
- .leaflet-control-zoom a, .leaflet-control-layers a {
244
+ .leaflet-control-zoom a,
245
+ .leaflet-control-layers-toggle {
126
246
  background-position: 50% 50%;
127
247
  background-repeat: no-repeat;
128
248
  display: block;
129
249
  }
130
- .leaflet-control-zoom a {
131
- -moz-border-radius: 4px;
132
- -webkit-border-radius: 4px;
133
- border-radius: 4px;
134
- width: 19px;
135
- height: 19px;
136
- }
137
250
  .leaflet-control-zoom a:hover {
138
251
  background-color: #fff;
139
- }
140
- .leaflet-touch .leaflet-control-zoom a {
141
- width: 27px;
142
- height: 27px;
252
+ color: #777;
143
253
  }
144
254
  .leaflet-control-zoom-in {
145
- background-image: url(<%= asset_path 'zoom-in.png' %>);
146
- margin-bottom: 5px;
255
+ font: bold 18px/24px Arial, Helvetica, sans-serif;
147
256
  }
148
257
  .leaflet-control-zoom-out {
149
- background-image: url(<%= asset_path 'zoom-out.png' %>);
258
+ font: bold 23px/20px Tahoma, Verdana, sans-serif;
259
+ }
260
+ .leaflet-control-zoom a.leaflet-control-zoom-disabled {
261
+ cursor: default;
262
+ background-color: rgba(255, 255, 255, 0.8);
263
+ color: #bbb;
264
+ }
265
+
266
+ .leaflet-touch .leaflet-control-zoom a {
267
+ width: 30px;
268
+ height: 30px;
269
+ }
270
+ .leaflet-touch .leaflet-control-zoom-in {
271
+ font-size: 24px;
272
+ line-height: 29px;
273
+ }
274
+ .leaflet-touch .leaflet-control-zoom-out {
275
+ font-size: 28px;
276
+ line-height: 24px;
150
277
  }
151
278
 
279
+ /* layers control */
280
+
152
281
  .leaflet-control-layers {
153
- box-shadow: 0 1px 7px #999;
282
+ box-shadow: 0 1px 7px rgba(0,0,0,0.4);
154
283
  background: #f8f8f9;
155
- -moz-border-radius: 8px;
156
284
  -webkit-border-radius: 8px;
157
- border-radius: 8px;
285
+ border-radius: 8px;
158
286
  }
159
- .leaflet-control-layers a {
287
+ .leaflet-control-layers-toggle {
160
288
  background-image: url(<%= asset_path 'layers.png' %>);
161
289
  width: 36px;
162
290
  height: 36px;
163
291
  }
164
- .leaflet-touch .leaflet-control-layers a {
292
+ .leaflet-touch .leaflet-control-layers-toggle {
165
293
  width: 44px;
166
294
  height: 44px;
167
295
  }
@@ -175,11 +303,10 @@
175
303
  }
176
304
  .leaflet-control-layers-expanded {
177
305
  padding: 6px 10px 6px 6px;
178
- font: 12px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
179
306
  color: #333;
180
307
  background: #fff;
181
308
  }
182
- .leaflet-control-layers input {
309
+ .leaflet-control-layers-selector {
183
310
  margin-top: 2px;
184
311
  position: relative;
185
312
  top: 1px;
@@ -193,94 +320,64 @@
193
320
  margin: 5px -10px 5px -6px;
194
321
  }
195
322
 
323
+
324
+ /* attribution and scale controls */
325
+
196
326
  .leaflet-container .leaflet-control-attribution {
197
327
  background-color: rgba(255, 255, 255, 0.7);
198
328
  box-shadow: 0 0 5px #bbb;
199
329
  margin: 0;
200
- }
201
-
330
+ }
202
331
  .leaflet-control-attribution,
203
332
  .leaflet-control-scale-line {
204
333
  padding: 0 5px;
205
334
  color: #333;
206
335
  }
207
-
208
336
  .leaflet-container .leaflet-control-attribution,
209
337
  .leaflet-container .leaflet-control-scale {
210
- font: 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
338
+ font-size: 11px;
211
339
  }
212
-
213
340
  .leaflet-left .leaflet-control-scale {
214
341
  margin-left: 5px;
215
342
  }
216
343
  .leaflet-bottom .leaflet-control-scale {
217
344
  margin-bottom: 5px;
218
345
  }
219
-
220
346
  .leaflet-control-scale-line {
221
347
  border: 2px solid #777;
222
348
  border-top: none;
223
349
  color: black;
224
- line-height: 1;
225
- font-size: 10px;
226
- padding-bottom: 2px;
350
+ line-height: 1.1;
351
+ padding: 2px 5px 1px;
352
+ font-size: 11px;
227
353
  text-shadow: 1px 1px 1px #fff;
228
354
  background-color: rgba(255, 255, 255, 0.5);
355
+ box-shadow: 0 -1px 5px rgba(0, 0, 0, 0.2);
356
+ white-space: nowrap;
357
+ overflow: hidden;
229
358
  }
230
359
  .leaflet-control-scale-line:not(:first-child) {
231
360
  border-top: 2px solid #777;
232
- padding-top: 1px;
233
361
  border-bottom: none;
234
362
  margin-top: -2px;
363
+ box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
235
364
  }
236
365
  .leaflet-control-scale-line:not(:first-child):not(:last-child) {
237
366
  border-bottom: 2px solid #777;
238
367
  }
239
368
 
240
- .leaflet-touch .leaflet-control-attribution, .leaflet-touch .leaflet-control-layers {
369
+ .leaflet-touch .leaflet-control-attribution,
370
+ .leaflet-touch .leaflet-control-layers,
371
+ .leaflet-touch .leaflet-control-zoom {
241
372
  box-shadow: none;
242
373
  }
243
- .leaflet-touch .leaflet-control-layers {
244
- border: 5px solid #bbb;
245
- }
246
-
247
-
248
- /* Zoom and fade animations */
249
-
250
- .leaflet-fade-anim .leaflet-tile, .leaflet-fade-anim .leaflet-popup {
251
- opacity: 0;
252
-
253
- -webkit-transition: opacity 0.2s linear;
254
- -moz-transition: opacity 0.2s linear;
255
- -o-transition: opacity 0.2s linear;
256
- transition: opacity 0.2s linear;
257
- }
258
- .leaflet-fade-anim .leaflet-tile-loaded, .leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
259
- opacity: 1;
260
- }
261
-
262
- .leaflet-zoom-anim .leaflet-zoom-animated {
263
- -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75);
264
- -moz-transition: -moz-transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75);
265
- -o-transition: -o-transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75);
266
- transition: transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75);
267
- }
268
-
269
- .leaflet-zoom-anim .leaflet-tile,
270
- .leaflet-pan-anim .leaflet-tile,
271
- .leaflet-touching .leaflet-zoom-animated {
272
- -webkit-transition: none;
273
- -moz-transition: none;
274
- -o-transition: none;
275
- transition: none;
276
- }
277
-
278
- .leaflet-zoom-anim .leaflet-zoom-hide {
279
- visibility: hidden;
374
+ .leaflet-touch .leaflet-control-layers,
375
+ .leaflet-touch .leaflet-control-zoom {
376
+ border: 4px solid rgba(0,0,0,0.3);
280
377
  }
281
378
 
282
379
 
283
- /* Popup layout */
380
+ /* popup */
284
381
 
285
382
  .leaflet-popup {
286
383
  position: absolute;
@@ -289,9 +386,15 @@
289
386
  .leaflet-popup-content-wrapper {
290
387
  padding: 1px;
291
388
  text-align: left;
389
+ -webkit-border-radius: 20px;
390
+ border-radius: 20px;
292
391
  }
293
392
  .leaflet-popup-content {
294
393
  margin: 14px 20px;
394
+ line-height: 1.4;
395
+ }
396
+ .leaflet-popup-content p {
397
+ margin: 18px 0;
295
398
  }
296
399
  .leaflet-popup-tip-container {
297
400
  margin: 0 auto;
@@ -307,11 +410,16 @@
307
410
 
308
411
  margin: -8px auto 0;
309
412
 
310
- -moz-transform: rotate(45deg);
311
413
  -webkit-transform: rotate(45deg);
312
- -ms-transform: rotate(45deg);
313
- -o-transform: rotate(45deg);
314
- transform: rotate(45deg);
414
+ -moz-transform: rotate(45deg);
415
+ -ms-transform: rotate(45deg);
416
+ -o-transform: rotate(45deg);
417
+ transform: rotate(45deg);
418
+ }
419
+ .leaflet-popup-content-wrapper, .leaflet-popup-tip {
420
+ background: white;
421
+
422
+ box-shadow: 0 3px 14px rgba(0,0,0,0.4);
315
423
  }
316
424
  .leaflet-container a.leaflet-popup-close-button {
317
425
  position: absolute;
@@ -325,13 +433,11 @@
325
433
  color: #c3c3c3;
326
434
  text-decoration: none;
327
435
  font-weight: bold;
436
+ background: transparent;
328
437
  }
329
438
  .leaflet-container a.leaflet-popup-close-button:hover {
330
439
  color: #999;
331
440
  }
332
- .leaflet-popup-content p {
333
- margin: 18px 0;
334
- }
335
441
  .leaflet-popup-scrolled {
336
442
  overflow: auto;
337
443
  border-bottom: 1px solid #ddd;
@@ -339,41 +445,13 @@
339
445
  }
340
446
 
341
447
 
342
- /* Visual appearance */
448
+ /* div icon */
343
449
 
344
- .leaflet-container {
345
- background: #ddd;
346
- }
347
- .leaflet-container a {
348
- color: #0078A8;
349
- }
350
- .leaflet-container a.leaflet-active {
351
- outline: 2px solid orange;
352
- }
353
- .leaflet-zoom-box {
354
- border: 2px dotted #05f;
355
- background: white;
356
- opacity: 0.5;
357
- }
358
450
  .leaflet-div-icon {
359
- background: #fff;
360
- border: 1px solid #666;
361
- }
362
- .leaflet-editing-icon {
363
- border-radius: 2px;
364
- }
365
- .leaflet-popup-content-wrapper, .leaflet-popup-tip {
366
- background: white;
367
-
368
- box-shadow: 0 3px 10px #888;
369
- -moz-box-shadow: 0 3px 10px #888;
370
- -webkit-box-shadow: 0 3px 14px #999;
371
- }
372
- .leaflet-popup-content-wrapper {
373
- -moz-border-radius: 20px;
374
- -webkit-border-radius: 20px;
375
- border-radius: 20px;
451
+ background: #fff;
452
+ border: 1px solid #666;
376
453
  }
377
- .leaflet-popup-content {
378
- font: 12px/1.4 "Helvetica Neue", Arial, Helvetica, sans-serif;
454
+ .leaflet-editing-icon {
455
+ -webkit-border-radius: 2px;
456
+ border-radius: 2px;
379
457
  }