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:
@@ -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
|
||||
|
||||
@@ -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"});
|
||||
|
||||
Reference in New Issue
Block a user