| 1 |
// |
| 2 |
// Interactive Map |
| 3 |
// Based on https://github.com/Leaflet/Leaflet |
| 4 |
// -------------------------------------------------- |
| 5 |
|
| 6 |
|
| 7 |
// Zoom controls |
| 8 |
|
| 9 |
.leaflet-touch { |
| 10 |
.leaflet-control-layers, |
| 11 |
.leaflet-bar { |
| 12 |
border: 0; |
| 13 |
box-shadow: $box-shadow; |
| 14 |
} |
| 15 |
.leaflet-bar a { |
| 16 |
transition: $nav-link-transition; |
| 17 |
color: $nav-link-color; |
| 18 |
font-weight: normal; |
| 19 |
line-height: 26px; |
| 20 |
&:first-child { |
| 21 |
border-bottom-color: $border-color; |
| 22 |
border-top-left-radius: $border-radius-sm; |
| 23 |
border-top-right-radius: $border-radius-sm; |
| 24 |
} |
| 25 |
&:last-child { |
| 26 |
border-bottom-left-radius: $border-radius-sm; |
| 27 |
border-bottom-right-radius: $border-radius-sm; |
| 28 |
} |
| 29 |
&:hover { |
| 30 |
background-color: $white; |
| 31 |
color: $nav-link-hover-color; |
| 32 |
} |
| 33 |
&.leaflet-disabled { |
| 34 |
background-color: $white; |
| 35 |
color: rgba($nav-link-disabled-color, .7); |
| 36 |
} |
| 37 |
} |
| 38 |
} |
| 39 |
|
| 40 |
|
| 41 |
// Custom marker: Dot |
| 42 |
|
| 43 |
.custom-marker-dot { |
| 44 |
display: block; |
| 45 |
width: .875rem !important; |
| 46 |
height: .875rem !important; |
| 47 |
margin: { |
| 48 |
top: -.75rem !important; |
| 49 |
left: -.375rem !important; |
| 50 |
} |
| 51 |
padding-left: .875rem; |
| 52 |
transition: box-shadow .2s ease-in-out; |
| 53 |
border-radius: 50%; |
| 54 |
box-sizing: border-box; |
| 55 |
background: $primary; |
| 56 |
|
| 57 |
&:hover { |
| 58 |
box-shadow: 0 0 0 .625rem rgba($primary, .25); |
| 59 |
} |
| 60 |
|
| 61 |
&.leaflet-marker-shadow { display: none; } |
| 62 |
} |
| 63 |
|
| 64 |
|
| 65 |
// Custom marker: Icon |
| 66 |
|
| 67 |
.custom-marker-icon { |
| 68 |
display: block; |
| 69 |
width: 3rem !important; |
| 70 |
height: auto !important; |
| 71 |
margin: { |
| 72 |
top: -1.5rem !important; |
| 73 |
left: -1.5rem !important; |
| 74 |
} |
| 75 |
&.leaflet-marker-shadow { display: none; } |
| 76 |
} |
| 77 |
|
| 78 |
|
| 79 |
// Popup |
| 80 |
|
| 81 |
.leaflet-popup-content-wrapper { |
| 82 |
padding: 0; |
| 83 |
overflow: hidden; |
| 84 |
.leaflet-popup-content { |
| 85 |
width: 220px !important; |
| 86 |
margin:10px !important; |
| 87 |
padding:3px !important; |
| 88 |
color: $body-color; |
| 89 |
} |
| 90 |
} |
| 91 |
.leaflet-container { |
| 92 |
font-family: $font-family-sans-serif; |
| 93 |
a.leaflet-popup-close-button { |
| 94 |
top: .5rem; |
| 95 |
right: .5rem; |
| 96 |
width: 1.5rem; |
| 97 |
height: 1.5rem; |
| 98 |
padding: 0; |
| 99 |
background-color: $white; |
| 100 |
border-radius: 50%; |
| 101 |
color: rgba($gray-800, .7); |
| 102 |
font-size: .875rem; |
| 103 |
line-height: 1.5rem; |
| 104 |
text-align: center; |
| 105 |
box-shadow: $box-shadow-sm; |
| 106 |
&:hover { color: $gray-800; } |
| 107 |
} |
| 108 |
} |
| 109 |
.leaflet-popup:focus, |
| 110 |
.leaflet-marker-icon:focus { outline: none; } |
| 111 |
.leaflet-popup-tip-container { |
| 112 |
backface-visibility: hidden; |
| 113 |
} |
| 114 |
@-moz-document url-prefix() { |
| 115 |
.leaflet-container a.leaflet-popup-close-button { |
| 116 |
line-height: 1.375rem; |
| 117 |
} |
| 118 |
} |
| 119 |
|
| 120 |
|
| 121 |
// Hide / show map popup |
| 122 |
|
| 123 |
.map-popup { |
| 124 |
transition: opacity .25s ease-in-out, visibility .25s ease-in-out; |
| 125 |
background-color: $white; |
| 126 |
z-index: 10; |
| 127 |
&.invisible { |
| 128 |
opacity: 0; |
| 129 |
visibility: hidden; |
| 130 |
} |
| 131 |
.btn-icon { |
| 132 |
position: absolute; |
| 133 |
top: $spacer; |
| 134 |
right: $spacer; |
| 135 |
z-index: 999; |
| 136 |
} |
| 137 |
} |
| 138 |
|
| 139 |
.map-popup, |
| 140 |
.map-popup .interactive-map { |
| 141 |
position: absolute; |
| 142 |
top: 0; |
| 143 |
left: 0; |
| 144 |
width: 100%; |
| 145 |
height: 100%; |
| 146 |
} |
| 147 |
|
| 148 |
@include media-breakpoint-down(lg) { |
| 149 |
.map-popup { |
| 150 |
position: fixed; |
| 151 |
z-index: $zindex-fixed + 1; |
| 152 |
} |
| 153 |
} |