use relative image locations
This commit is contained in:
parent
0ba881c390
commit
9bd4b77278
@ -31,7 +31,7 @@ init: function() {
|
||||
OSRM.GUI.width = document.getElementById("main-wrapper").clientWidth;
|
||||
|
||||
// init favicon
|
||||
document.getElementById('favicon').href=OSRM.G.images["favicon"].src;
|
||||
document.getElementById('favicon').href=OSRM.G.images["favicon"].getAttribute("src");
|
||||
|
||||
// init starting source/target
|
||||
document.getElementById('gui-input-source').value = OSRM.DEFAULTS.ONLOAD_SOURCE;
|
||||
|
@ -95,15 +95,15 @@ OSRM.prefetchIcons = function() {
|
||||
|
||||
for(var i=0; i<icon_list.length; i++) {
|
||||
var icon = {
|
||||
iconUrl: OSRM.G.images[icon_list[i].image_id].src, iconSize: new L.Point(25, 41), iconAnchor: new L.Point(13, 41),
|
||||
shadowUrl: OSRM.G.images["marker-shadow"].src, shadowSize: new L.Point(41, 41),
|
||||
iconUrl: OSRM.G.images[icon_list[i].image_id].getAttribute("src"), iconSize: new L.Point(25, 41), iconAnchor: new L.Point(13, 41),
|
||||
shadowUrl: OSRM.G.images["marker-shadow"].getAttribute("src"), shadowSize: new L.Point(41, 41),
|
||||
popupAnchor: new L.Point(0, -33)
|
||||
};
|
||||
OSRM.G.icons[icon_list[i].id] = new L.SwitchableIcon(icon);
|
||||
}
|
||||
|
||||
// special values for drag marker
|
||||
OSRM.G.icons['marker-drag'] = new L.SwitchableIcon( {iconUrl: OSRM.G.images["marker-drag"].src, iconSize: new L.Point(18, 18) } );
|
||||
OSRM.G.icons['marker-drag'] = new L.SwitchableIcon( {iconUrl: OSRM.G.images["marker-drag"].getAttribute("src"), iconSize: new L.Point(18, 18) } );
|
||||
};
|
||||
|
||||
|
||||
|
@ -154,9 +154,9 @@ getDrivingInstructionIcon: function(server_instruction_id) {
|
||||
local_icon_id += server_instruction_id;
|
||||
|
||||
if( OSRM.G.images[local_icon_id] )
|
||||
return OSRM.G.images[local_icon_id].src;
|
||||
return OSRM.G.images[local_icon_id].getAttribute("src");
|
||||
else
|
||||
return OSRM.G.images["direction_0"].src;
|
||||
return OSRM.G.images["direction_0"].getAttribute("src");
|
||||
},
|
||||
|
||||
// retrieve driving instructions from instruction ids
|
||||
|
Loading…
Reference in New Issue
Block a user