Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix issues #158

Merged
merged 7 commits into from
Sep 8, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
contents += '<p>Distributed as-is with no warranty</p>';
contents += '<p>Stop your bike in a safe place before using</p>';
contents += '<p>Requires internet access to view maps and location</p>';
contents += '<p><a href="https://github.com/JackDougherty/bikemapcode">This is a link!</a></p>';
contents += '<p>Allow smartphone browser to show your location<br> - iPhone > Settings > Privacy > Location Services (On) > Safari (While Using)<br> - Android (to come)</p>';
contents += '<p>Click OK if browser asks permission to show your location</p>';
contents += '<img src="images/AllowCurrentLocation.png" alt="Allow Current Location screen" width="200" height="123">';
Expand Down Expand Up @@ -117,19 +118,19 @@
color: 'blue',
distanceMarkers: { showAll: 11, offset: 1609, bgcolor: 'bg-blue'} // meters per mile; bgcolor defined in style.css
}).addTo(map);
controlLayers.addOverlay(WeHa11, 'West Hartford 11 mile (blue)');
controlLayers.addOverlay(WeHa11, 'West Hartford 11 mile <i class="color-line bg-blue"></i>');

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

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

// Thanks @ilyankou for gatherBounds function; update layer names
function gatherBounds() {
Expand Down Expand Up @@ -157,8 +158,11 @@

map.on('layerremove', function() {
gatherBounds();

});

$('<h3 id="mapTitle">Putin</h3>').insertBefore('div.leaflet-control-layers-base');

</script>
</body>
</html>
17 changes: 9 additions & 8 deletions src/L.Control.SlideMenu.css
Original file line number Diff line number Diff line change
@@ -1,27 +1,28 @@
.leaflet-control-slidemenu{
.leaflet-control-slidemenu {
cursor: pointer;
}

.leaflet-menu{
.leaflet-menu {
position: absolute;
background-color: rgba(255, 255, 255, 255);
background-color: rgba(255, 255, 255, 1);
overflow: auto;
cursor: default;
z-index: 9999;
overflow-x: hidden;
}

.leaflet-menu::-webkit-scrollbar{
.leaflet-menu::-webkit-scrollbar {
width: 7px;
height: 7px;
background: #f2f2f2;
}

.leaflet-menu::-webkit-scrollbar-thumb{
.leaflet-menu::-webkit-scrollbar-thumb {
border-radius: 2px;
background: #777;
}

.leaflet-menu-close-button{
.leaflet-menu-close-button {
background-color: transparent;
border: none;
font-size: 2em;
Expand All @@ -30,10 +31,10 @@
cursor: pointer;
}

.leaflet-menu-close-button:hover{
.leaflet-menu-close-button:hover {
color: #4285F4;
}

.leaflet-menu-contents{
.leaflet-menu-contents {
margin: 16px 10px 10px 10px;
}
62 changes: 29 additions & 33 deletions style.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,30 +17,27 @@ body {
line-height: 36px;
}*/

/* slide menu button with question circle */
.leaflet-control-slidemenu a, .leaflet-control-slidemenu a:hover {
width: 36px;
height: 36px;
line-height: 36px;
/* Slide menu button with question circle and locate button */
.leaflet-control-slidemenu a,
.leaflet-control-locate a,
.leaflet-control-layers a {
width: 36px !important;
height: 36px !important;
line-height: 36px !important;
font-size: 2em;
}

/* leaflet-control-locate button*/
.leaflet-control-locate a, leaflet-control-locate a:hover {
width: 36px;
height: 36px;
line-height: 36px;
font-size: 2em;
color: #0000ff;
}
.leaflet-control-locate.active a {
color: #0000ff;
/* Locate button color */
.leaflet-control-locate a {
color: #00f !important;
}
.leaflet-control-locate.active.following a {
color: #0000ff;

/* Gray outline to compass icon for mobile devices */
.leaflet-touch .leaflet-compass {
border: 2px solid rgba(0, 0, 0, 0.1);
}

/*line mileage distance markers and colors*/
/* Line mileage distance markers and colors */
.dist-marker {
font-size: 14px;
line-height: 18px;
Expand All @@ -52,22 +49,21 @@ body {
border-radius: 9px;
}

.bg-blue {
background: blue;
}

.bg-green {
background: green;
}

.bg-black {
background: black;
}
/* Background colors of distance markers */
.bg-blue { background: blue; }
.bg-green { background: green; }
.bg-black { background: black; }
.bg-yellow { background: #fc0; }
.bg-pink { background: #f39; }

.bg-yellow {
background: #ffcc00;
/* Colored line in layer control title */
.color-line {
display: inline-block;
vertical-align: middle;
height: 5px;
width: 50px;
}

.bg-pink {
background: #f39;
#mapTitle {
margin: 5px 0 5px 0;
}