added via marker numbering

This commit is contained in:
DennisSchiefer
2012-05-15 13:48:24 +01:00
parent 19ae6db308
commit dfd5ee9134
7 changed files with 128 additions and 56 deletions
+77 -50
View File
@@ -17,12 +17,34 @@ or see http://www.gnu.org/licenses/agpl.txt.
/* OSRM CSS styles for printing*/
/* ------------------------------------------------------------------------ */
/* page setup */
body
{
margin: 8px;
}
/* ------------------------------------------------------------------------ */
/* changes/additions to leaflet styles */
.via-counter
{
position:absolute;
top:-3px;
right:-6px;
width:16px;
border-radius:5px;
-moz-border-radius:5px;
-webkit-border-radius:5px;
background-color:#FFFFFF;
text-align:center;
vertical-align:middle;
font-size:9px;
display:none;
}
/* ------------------------------------------------------------------------ */
/* header area */
#printing-header
@@ -57,6 +79,7 @@ div.label
margin:5px;
}
/* ------------------------------------------------------------------------ */
/* description content */
.description
@@ -125,6 +148,24 @@ div.label
}
}
/* ------------------------------------------------------------------------ */
/* iconic buttons */
.iconic-button
{
cursor:pointer;
width:16px;
height:16px;
background-repeat:no-repeat;
background-position:center;
}
#gui-printer-inactive
{
cursor:default;
}
/* ------------------------------------------------------------------------ */
/* utility styles */
.quad
@@ -151,6 +192,42 @@ div.label
}
}
/* ------------------------------------------------------------------------ */
/* table */
.full
{
display:table;
width:100%;
}
.row
{
display:table-row;
}
.left
{
display:table-cell;
text-align:left;
vertical-align:top;
}
.right
{
display:table-cell;
text-align:right;
vertical-align:top;
}
.center
{
display:table-cell;
text-align:center;
vertical-align:top;
}
.stretch
{
width:100%;
}
/* ------------------------------------------------------------------------ */
/* fonts */
@media print {
@@ -197,54 +274,4 @@ div.label
font-size: 9px;
font-weight: normal;
}
}
/* iconic buttons */
.iconic-button
{
cursor:pointer;
width:16px;
height:16px;
background-repeat:no-repeat;
background-position:center;
}
#gui-printer-inactive
{
cursor:default;
}
/* table */
.full
{
display:table;
width:100%;
}
.row
{
display:table-row;
}
.left
{
display:table-cell;
text-align:left;
vertical-align:top;
}
.right
{
display:table-cell;
text-align:right;
vertical-align:top;
}
.center
{
display:table-cell;
text-align:center;
vertical-align:top;
}
.stretch
{
width:100%;
}
+5 -2
View File
@@ -78,8 +78,11 @@ OSRM.drawMap = function(tile_server, bounds) {
// manage makers
OSRM.drawMarkers = function( markers ) {
OSRM.G.map.addLayer( new L.MouseMarker( markers[0].getPosition(), {draggable:false,clickable:false,icon:OSRM.G.icons['marker-source']} ) );
for(var i=1, size=markers.length-1; i<size; i++)
OSRM.G.map.addLayer( new L.MouseMarker( markers[i].getPosition(), {draggable:false,clickable:false,icon:OSRM.G.icons['marker-via']} ) );
for(var i=1, size=markers.length-1; i<size; i++) {
var via_marker = new L.MouseMarker( markers[i].getPosition(), {draggable:false,clickable:false,icon:OSRM.G.icons['marker-via']} );
OSRM.G.map.addLayer( via_marker );
via_marker.setLabel(i);
}
OSRM.G.map.addLayer( new L.MouseMarker( markers[markers.length-1].getPosition(), {draggable:false,clickable:false,icon:OSRM.G.icons['marker-target']} ) );
};