route direction icons are now background images (which should be faster

in rendering)
This commit is contained in:
DennisSchiefer 2012-04-19 11:02:09 +01:00
parent 917ef160c5
commit 57d9bc5bae
4 changed files with 11 additions and 2 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 489 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 489 B

After

Width:  |  Height:  |  Size: 373 B

View File

@ -276,11 +276,20 @@ html, body {
vertical-align: middle;
padding:1px 5px 1px 5px;
}
.result-direction
{
width:18px;
height:21px;
background-repeat:no-repeat;
background-position:center;
}
.result-distance
{
text-align:right;
vertical-align: middle;
padding:1px 1px 1px 5px;
}
.result-item
{

View File

@ -66,8 +66,8 @@ show: function(response) {
route_desc += '<tr class="'+rowstyle+'">';
route_desc += '<td class="result-directions">';
route_desc += '<img width="18px" src="'+OSRM.RoutingDescription.getDrivingInstructionIcon(response.route_instructions[i][0])+'" alt="" />';
route_desc += "</td>";
route_desc += '<div class="result-direction" style="background-image:url(\''+ OSRM.RoutingDescription.getDrivingInstructionIcon(response.route_instructions[i][0]) + '\');"></div>';
route_desc += "</td>";
route_desc += '<td class="result-items">';
route_desc += '<div class="result-item" onclick="OSRM.RoutingDescription.onClickRouteDescription('+response.route_instructions[i][3]+')">';