switched to leaflet0.4;

commented out most GUI
This commit is contained in:
DennisSchiefer 2012-08-13 13:04:26 +01:00
parent ecd342224e
commit 5f089e628b
9 changed files with 3521 additions and 1501 deletions

View File

@ -84,7 +84,7 @@ zoomed: function(e) {
OSRM.Routing.getRoute_Redraw({keepAlternative:true}); OSRM.Routing.getRoute_Redraw({keepAlternative:true});
}, },
contextmenu: function(e) {;}, contextmenu: function(e) {;},
mousemove: function(e) { OSRM.Via.drawDragMarker(e); }, mousemove: function(e) { },//OSRM.Via.drawDragMarker(e); },
click: function(e) { click: function(e) {
OSRM.GUI.deactivateTooltip( "CLICKING" ); OSRM.GUI.deactivateTooltip( "CLICKING" );
if( !OSRM.G.markers.hasSource() ) { if( !OSRM.G.markers.hasSource() ) {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

File diff suppressed because it is too large Load Diff

View File

@ -11,14 +11,13 @@
.leaflet-popup-pane, .leaflet-popup-pane,
.leaflet-overlay-pane svg, .leaflet-overlay-pane svg,
.leaflet-zoom-box, .leaflet-zoom-box,
.leaflet-image-layer { /* TODO optimize classes */ .leaflet-image-layer,
.leaflet-layer { /* TODO optimize classes */
position: absolute; position: absolute;
} }
.leaflet-container { .leaflet-container {
overflow: hidden; overflow: hidden;
} outline: 0;
.leaflet-tile-pane, .leaflet-container {
-webkit-transform: translate3d(0,0,0);
} }
.leaflet-tile, .leaflet-tile,
.leaflet-marker-icon, .leaflet-marker-icon,
@ -34,44 +33,50 @@
.leaflet-clickable { .leaflet-clickable {
cursor: pointer; cursor: pointer;
} }
.leaflet-dragging, .leaflet-dragging .leaflet-clickable {
cursor: move;
}
.leaflet-container img { .leaflet-container img {
/* map is broken in FF if you have max-width: 100% on tiles */
max-width: none !important; max-width: none !important;
} }
.leaflet-container img.leaflet-image-layer {
/* stupid Android 2 doesn't understand "max-width: none" properly */
max-width: 15000px !important;
}
.leaflet-tile-pane { z-index: 2; } .leaflet-tile-pane { z-index: 2; }
.leaflet-objects-pane { z-index: 3; } .leaflet-objects-pane { z-index: 3; }
.leaflet-overlay-pane { z-index: 4; } .leaflet-overlay-pane { z-index: 4; }
.leaflet-shadow-pane { z-index: 5; } .leaflet-shadow-pane { z-index: 5; }
.leaflet-marker-pane { z-index: 6; } .leaflet-marker-pane { z-index: 6; }
.leaflet-popup-pane { z-index: 7; } .leaflet-popup-pane { z-index: 7; }
.leaflet-zoom-box {
width: 0;
height: 0;
}
.leaflet-tile { .leaflet-tile {
visibility: hidden; filter: inherit;
visibility: hidden;
} }
.leaflet-tile-loaded { .leaflet-tile-loaded {
visibility: inherit; visibility: inherit;
} }
a.leaflet-active { .leaflet-zoom-box {
outline: 2px solid orange; width: 0;
} height: 0;
}
/* Leaflet controls */ /* Leaflet controls */
.leaflet-control { .leaflet-control {
position: relative; position: relative;
z-index: 7; z-index: 7;
pointer-events: auto;
} }
.leaflet-top, .leaflet-top,
.leaflet-bottom { .leaflet-bottom {
position: absolute; position: absolute;
z-index: 1000;
pointer-events: none;
} }
.leaflet-top { .leaflet-top {
top: 0; top: 0;
@ -105,7 +110,7 @@ a.leaflet-active {
margin-right: 10px; margin-right: 10px;
} }
.leaflet-control-zoom, .leaflet-control-layers { .leaflet-control-zoom {
-moz-border-radius: 7px; -moz-border-radius: 7px;
-webkit-border-radius: 7px; -webkit-border-radius: 7px;
border-radius: 7px; border-radius: 7px;
@ -132,7 +137,7 @@ a.leaflet-active {
.leaflet-control-zoom a:hover { .leaflet-control-zoom a:hover {
background-color: #fff; background-color: #fff;
} }
.leaflet-big-buttons .leaflet-control-zoom a { .leaflet-touch .leaflet-control-zoom a {
width: 27px; width: 27px;
height: 27px; height: 27px;
} }
@ -145,18 +150,18 @@ a.leaflet-active {
} }
.leaflet-control-layers { .leaflet-control-layers {
-moz-box-shadow: 0 0 7px #999; box-shadow: 0 1px 7px #999;
-webkit-box-shadow: 0 0 7px #999;
box-shadow: 0 0 7px #999;
background: #f8f8f9; background: #f8f8f9;
-moz-border-radius: 8px;
-webkit-border-radius: 8px;
border-radius: 8px;
} }
.leaflet-control-layers a { .leaflet-control-layers a {
background-image: url(images/layers.png); background-image: url(images/layers.png);
width: 36px; width: 36px;
height: 36px; height: 36px;
} }
.leaflet-big-buttons .leaflet-control-layers a { .leaflet-touch .leaflet-control-layers a {
width: 44px; width: 44px;
height: 44px; height: 44px;
} }
@ -189,23 +194,60 @@ a.leaflet-active {
} }
.leaflet-container .leaflet-control-attribution { .leaflet-container .leaflet-control-attribution {
margin: 0;
padding: 0 5px;
font: 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
color: #333;
background-color: rgba(255, 255, 255, 0.7); background-color: rgba(255, 255, 255, 0.7);
box-shadow: 0 0 5px #bbb;
margin: 0;
}
-moz-box-shadow: 0 0 7px #ccc; .leaflet-control-attribution,
-webkit-box-shadow: 0 0 7px #ccc; .leaflet-control-scale-line {
box-shadow: 0 0 7px #ccc; padding: 0 5px;
color: #333;
}
.leaflet-container .leaflet-control-attribution,
.leaflet-container .leaflet-control-scale {
font: 11px/1.5 "Helvetica Neue", Arial, Helvetica, sans-serif;
}
.leaflet-left .leaflet-control-scale {
margin-left: 5px;
}
.leaflet-bottom .leaflet-control-scale {
margin-bottom: 5px;
}
.leaflet-control-scale-line {
border: 2px solid #777;
border-top: none;
color: black;
line-height: 1;
font-size: 10px;
padding-bottom: 2px;
text-shadow: 1px 1px 1px #fff;
background-color: rgba(255, 255, 255, 0.5);
}
.leaflet-control-scale-line:not(:first-child) {
border-top: 2px solid #777;
padding-top: 1px;
border-bottom: none;
margin-top: -2px;
}
.leaflet-control-scale-line:not(:first-child):not(:last-child) {
border-bottom: 2px solid #777;
}
.leaflet-touch .leaflet-control-attribution, .leaflet-touch .leaflet-control-layers {
box-shadow: none;
}
.leaflet-touch .leaflet-control-layers {
border: 5px solid #bbb;
} }
/* Fade animations */ /* Zoom and fade animations */
.leaflet-fade-anim .leaflet-tile { .leaflet-fade-anim .leaflet-tile, .leaflet-fade-anim .leaflet-popup {
opacity: 0; opacity: 0;
-webkit-transition: opacity 0.2s linear; -webkit-transition: opacity 0.2s linear;
@ -213,30 +255,27 @@ a.leaflet-active {
-o-transition: opacity 0.2s linear; -o-transition: opacity 0.2s linear;
transition: opacity 0.2s linear; transition: opacity 0.2s linear;
} }
.leaflet-fade-anim .leaflet-tile-loaded { .leaflet-fade-anim .leaflet-tile-loaded, .leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
opacity: 1; opacity: 1;
} }
.leaflet-fade-anim .leaflet-popup { .leaflet-zoom-anim .leaflet-zoom-animated {
opacity: 0; -webkit-transition: -webkit-transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75);
-moz-transition: -moz-transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75);
-webkit-transition: opacity 0.2s linear; -o-transition: -o-transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75);
-moz-transition: opacity 0.2s linear; transition: transform 0.25s cubic-bezier(0.25,0.1,0.25,0.75);
-o-transition: opacity 0.2s linear;
transition: opacity 0.2s linear;
}
.leaflet-fade-anim .leaflet-map-pane .leaflet-popup {
opacity: 1;
} }
.leaflet-zoom-anim .leaflet-tile { .leaflet-zoom-anim .leaflet-tile,
-webkit-transition: none; .leaflet-pan-anim .leaflet-tile,
-moz-transition: none; .leaflet-touching .leaflet-zoom-animated {
-o-transition: none; -webkit-transition: none;
transition: none; -moz-transition: none;
} -o-transition: none;
transition: none;
}
.leaflet-zoom-anim .leaflet-objects-pane { .leaflet-zoom-anim .leaflet-zoom-hide {
visibility: hidden; visibility: hidden;
} }
@ -246,19 +285,18 @@ a.leaflet-active {
.leaflet-popup { .leaflet-popup {
position: absolute; position: absolute;
text-align: center; text-align: center;
-webkit-transform: translate3d(0,0,0);
} }
.leaflet-popup-content-wrapper { .leaflet-popup-content-wrapper {
padding: 1px; padding: 1px;
text-align: left; text-align: left;
} }
.leaflet-popup-content { .leaflet-popup-content {
margin: 19px; margin: 14px 20px;
} }
.leaflet-popup-tip-container { .leaflet-popup-tip-container {
margin: 0 auto; margin: 0 auto;
width: 40px; width: 40px;
height: 16px; height: 20px;
position: relative; position: relative;
overflow: hidden; overflow: hidden;
} }
@ -275,19 +313,30 @@ a.leaflet-active {
-o-transform: rotate(45deg); -o-transform: rotate(45deg);
transform: rotate(45deg); transform: rotate(45deg);
} }
.leaflet-popup-close-button { .leaflet-container a.leaflet-popup-close-button {
position: absolute; position: absolute;
top: 9px; top: 0;
right: 9px; right: 0;
padding: 4px 5px 0 0;
width: 10px; text-align: center;
height: 10px; width: 18px;
height: 14px;
overflow: hidden; font: 16px/14px Tahoma, Verdana, sans-serif;
color: #c3c3c3;
text-decoration: none;
font-weight: bold;
}
.leaflet-container a.leaflet-popup-close-button:hover {
color: #999;
} }
.leaflet-popup-content p { .leaflet-popup-content p {
margin: 18px 0; margin: 18px 0;
} }
.leaflet-popup-scrolled {
overflow: auto;
border-bottom: 1px solid #ddd;
border-top: 1px solid #ddd;
}
/* Visual appearance */ /* Visual appearance */
@ -298,17 +347,27 @@ a.leaflet-active {
.leaflet-container a { .leaflet-container a {
color: #0078A8; color: #0078A8;
} }
.leaflet-container a.leaflet-active {
outline: 2px solid orange;
}
.leaflet-zoom-box { .leaflet-zoom-box {
border: 2px dotted #05f; border: 2px dotted #05f;
background: white; background: white;
opacity: 0.5; opacity: 0.5;
} }
.leaflet-div-icon {
background: #fff;
border: 1px solid #666;
}
.leaflet-editing-icon {
border-radius: 2px;
}
.leaflet-popup-content-wrapper, .leaflet-popup-tip { .leaflet-popup-content-wrapper, .leaflet-popup-tip {
background: white; background: white;
box-shadow: 0 1px 10px #888; box-shadow: 0 3px 10px #888;
-moz-box-shadow: 0 1px 10px #888; -moz-box-shadow: 0 3px 10px #888;
-webkit-box-shadow: 0 1px 14px #999; -webkit-box-shadow: 0 3px 14px #999;
} }
.leaflet-popup-content-wrapper { .leaflet-popup-content-wrapper {
-moz-border-radius: 20px; -moz-border-radius: 20px;
@ -318,6 +377,3 @@ a.leaflet-active {
.leaflet-popup-content { .leaflet-popup-content {
font: 12px/1.4 "Helvetica Neue", Arial, Helvetica, sans-serif; font: 12px/1.4 "Helvetica Neue", Arial, Helvetica, sans-serif;
} }
.leaflet-popup-close-button {
background: white url(images/popup-close.png);
}

View File

@ -1,7 +1,3 @@
.leaflet-tile {
filter: inherit;
}
.leaflet-vml-shape { .leaflet-vml-shape {
width: 1px; width: 1px;
height: 1px; height: 1px;

File diff suppressed because one or more lines are too long

View File

@ -27,21 +27,21 @@ OSRM.init = function() {
OSRM.GUI.init(); OSRM.GUI.init();
OSRM.Map.init(); OSRM.Map.init();
OSRM.Printing.init(); // OSRM.Printing.init();
OSRM.Routing.init(); // OSRM.Routing.init();
OSRM.RoutingAlternatives.init(); // OSRM.RoutingAlternatives.init();
OSRM.Localization.init(); OSRM.Localization.init();
// stop if in maintenance mode // stop if in maintenance mode
if( OSRM.GUI.inMaintenance() == true ) if( OSRM.GUI.inMaintenance() == true )
return; return;
// check if the URL contains some GET parameter, e.g. for showing a route // // check if the URL contains some GET parameter, e.g. for showing a route
OSRM.parseParameters(); // OSRM.parseParameters();
//
// only init default position / geolocation position if GET parameters do not specify a different one // // only init default position / geolocation position if GET parameters do not specify a different one
if( OSRM.G.initial_position_override == false ) // if( OSRM.G.initial_position_override == false )
OSRM.Map.initPosition(); // OSRM.Map.initPosition();
}; };