Skip to content

Commit 3cc4c9f

Browse files
Merge pull request #158 from ilyankou/gh-pages
Fix issues
2 parents 96b28fb + a2e3356 commit 3cc4c9f

3 files changed

Lines changed: 45 additions & 44 deletions

File tree

‎index.html‎

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
contents += '<p>Distributed as-is with no warranty</p>';
7575
contents += '<p>Stop your bike in a safe place before using</p>';
7676
contents += '<p>Requires internet access to view maps and location</p>';
77+
contents += '<p><a href="https://github.com/JackDougherty/bikemapcode">This is a link!</a></p>';
7778
contents += '<p>Allow smartphone browser to show your location<br> - iPhone > Settings > Privacy > Location Services (On) > Safari (While Using)<br> - Android (to come)</p>';
7879
contents += '<p>Click OK if browser asks permission to show your location</p>';
7980
contents += '<img src="images/AllowCurrentLocation.png" alt="Allow Current Location screen" width="200" height="123">';
@@ -117,19 +118,19 @@
117118
color: 'blue',
118119
distanceMarkers: { showAll: 11, offset: 1609, bgcolor: 'bg-blue'} // meters per mile; bgcolor defined in style.css
119120
}).addTo(map);
120-
controlLayers.addOverlay(WeHa11, 'West Hartford 11 mile (blue)');
121+
controlLayers.addOverlay(WeHa11, 'West Hartford 11 mile <i class="color-line bg-blue"></i>');
121122

122123
var WeHa25 = new L.GPX("routes/WeHa2015-25.gpx", {
123124
color: 'green',
124125
distanceMarkers: { showAll: 11, offset: 1609, bgcolor: 'bg-green'} // meters per mile; bgcolor defined in style.css
125126
});
126-
controlLayers.addOverlay(WeHa25, 'West Hartford 25 mile (green)');
127+
controlLayers.addOverlay(WeHa25, 'West Hartford 25 mile <i class="color-line bg-green"></i>');
127128

128129
var WeHa50 = new L.GPX("routes/WeHa2015-50.gpx", {
129130
color: '#ff3399',
130131
distanceMarkers: { showAll: 11, offset: 1609, bgcolor: 'bg-pink'} // meters per mile; bgcolor defined in style.css
131132
});
132-
controlLayers.addOverlay(WeHa50, 'West Hartford 50 mile (pink)');
133+
controlLayers.addOverlay(WeHa50, 'West Hartford 50 mile <i class="color-line bg-pink"></i>');
133134

134135
// Thanks @ilyankou for gatherBounds function; update layer names
135136
function gatherBounds() {
@@ -157,8 +158,11 @@
157158

158159
map.on('layerremove', function() {
159160
gatherBounds();
161+
160162
});
161163

164+
$('<h3 id="mapTitle">Putin</h3>').insertBefore('div.leaflet-control-layers-base');
165+
162166
</script>
163167
</body>
164168
</html>

‎src/L.Control.SlideMenu.css‎

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,28 @@
1-
.leaflet-control-slidemenu{
1+
.leaflet-control-slidemenu {
22
cursor: pointer;
33
}
44

5-
.leaflet-menu{
5+
.leaflet-menu {
66
position: absolute;
7-
background-color: rgba(255, 255, 255, 255);
7+
background-color: rgba(255, 255, 255, 1);
88
overflow: auto;
99
cursor: default;
1010
z-index: 9999;
11+
overflow-x: hidden;
1112
}
1213

13-
.leaflet-menu::-webkit-scrollbar{
14+
.leaflet-menu::-webkit-scrollbar {
1415
width: 7px;
1516
height: 7px;
1617
background: #f2f2f2;
1718
}
1819

19-
.leaflet-menu::-webkit-scrollbar-thumb{
20+
.leaflet-menu::-webkit-scrollbar-thumb {
2021
border-radius: 2px;
2122
background: #777;
2223
}
2324

24-
.leaflet-menu-close-button{
25+
.leaflet-menu-close-button {
2526
background-color: transparent;
2627
border: none;
2728
font-size: 2em;
@@ -30,10 +31,10 @@
3031
cursor: pointer;
3132
}
3233

33-
.leaflet-menu-close-button:hover{
34+
.leaflet-menu-close-button:hover {
3435
color: #4285F4;
3536
}
3637

37-
.leaflet-menu-contents{
38+
.leaflet-menu-contents {
3839
margin: 16px 10px 10px 10px;
3940
}

‎style.css‎

Lines changed: 29 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,27 @@ body {
1717
line-height: 36px;
1818
}*/
1919

20-
/* slide menu button with question circle */
21-
.leaflet-control-slidemenu a, .leaflet-control-slidemenu a:hover {
22-
width: 36px;
23-
height: 36px;
24-
line-height: 36px;
20+
/* Slide menu button with question circle and locate button */
21+
.leaflet-control-slidemenu a,
22+
.leaflet-control-locate a,
23+
.leaflet-control-layers a {
24+
width: 36px !important;
25+
height: 36px !important;
26+
line-height: 36px !important;
2527
font-size: 2em;
2628
}
2729

28-
/* leaflet-control-locate button*/
29-
.leaflet-control-locate a, leaflet-control-locate a:hover {
30-
width: 36px;
31-
height: 36px;
32-
line-height: 36px;
33-
font-size: 2em;
34-
color: #0000ff;
35-
}
36-
.leaflet-control-locate.active a {
37-
color: #0000ff;
30+
/* Locate button color */
31+
.leaflet-control-locate a {
32+
color: #00f !important;
3833
}
39-
.leaflet-control-locate.active.following a {
40-
color: #0000ff;
34+
35+
/* Gray outline to compass icon for mobile devices */
36+
.leaflet-touch .leaflet-compass {
37+
border: 2px solid rgba(0, 0, 0, 0.1);
4138
}
4239

43-
/*line mileage distance markers and colors*/
40+
/* Line mileage distance markers and colors */
4441
.dist-marker {
4542
font-size: 14px;
4643
line-height: 18px;
@@ -52,22 +49,21 @@ body {
5249
border-radius: 9px;
5350
}
5451

55-
.bg-blue {
56-
background: blue;
57-
}
58-
59-
.bg-green {
60-
background: green;
61-
}
62-
63-
.bg-black {
64-
background: black;
65-
}
52+
/* Background colors of distance markers */
53+
.bg-blue { background: blue; }
54+
.bg-green { background: green; }
55+
.bg-black { background: black; }
56+
.bg-yellow { background: #fc0; }
57+
.bg-pink { background: #f39; }
6658

67-
.bg-yellow {
68-
background: #ffcc00;
59+
/* Colored line in layer control title */
60+
.color-line {
61+
display: inline-block;
62+
vertical-align: middle;
63+
height: 5px;
64+
width: 50px;
6965
}
7066

71-
.bg-pink {
72-
background: #f39;
67+
#mapTitle {
68+
margin: 5px 0 5px 0;
7369
}

0 commit comments

Comments
 (0)