0

Add retina size icons for spawn and location

Unfortunately we need to explicitly tell leaflet not to scale them
weirdly but to make them perceptually equivalent to the normal ones,
which means we have hardcoded icon sizes for those two right now.
This commit is contained in:
Nicolas F
2016-07-12 21:20:46 +02:00
committed by Andrew Chin
parent ebfd40c995
commit 6426182c1e
2 changed files with 7 additions and 3 deletions

View File

@@ -104,7 +104,9 @@ directory.
'signMarker': 'signpost_icon.png',
'bedMarker': 'bed.png',
'spawnMarker': 'icons/marker_home.png',
'queryMarker': 'icons/marker_location.png'
'spawnMarker2x': 'icons/marker_home_2x.png',
'queryMarker': 'icons/marker_location.png',
'queryMarker2x': 'icons/marker_location_2x.png'
}
dump['CONST']['mapDivId'] = 'mcmap'
dump['CONST']['regionStrokeWeight'] = 2 # Obselete

View File

@@ -130,9 +130,10 @@ overviewer.util = {
overviewer.collections.spawnMarker.remove();
}
if (typeof(ovconf.spawn) == "object") {
/// TODO: Retina Icon
var spawnIcon = L.icon({
iconUrl: overviewerConfig.CONST.image.spawnMarker,
iconRetinaUrl: overviewerConfig.CONST.image.spawnMarker2x,
iconSize: [32, 37],
});
var latlng = overviewer.util.fromWorldToLatLng(ovconf.spawn[0],
ovconf.spawn[1],
@@ -684,9 +685,10 @@ overviewer.util = {
overviewer.map.setView(latlngcoords, zoom);
if (ovconf.showlocationmarker) {
/// TODO: Retina Icon
var locationIcon = L.icon({
iconUrl: overviewerConfig.CONST.image.queryMarker,
iconRetinaUrl: overviewerConfig.CONST.image.queryMarker2x,
iconSize: [32, 37],
});
var locationm = L.marker(latlngcoords, { icon: locationIcon,
title: "Linked location"});