Open Alexr03 opened 1 week ago
Hey! Great library! I am really wanting to use this to show a game map (not the real world map). To do this I need to apply a custom CRS.
CUSTOM_CRS = L.extend({}, L.CRS.Simple, { projection: L.Projection.LonLat, scale: function(zoom) { return Math.pow(2, zoom); }, zoom: function(sc) { return Math.log(sc) / 0.6931471805599453; }, distance: function(pos1, pos2) { let x_difference = pos2.lng - pos1.lng; let y_difference = pos2.lat - pos1.lat; return Math.sqrt(x_difference * x_difference + y_difference * y_difference); }, transformation: new L.Transformation(scale_x, center_x, -scale_y, center_y), infinite: true, });
Im unsure whether this library can currently do this, if not I would love to see this functionality added! :)
Thanks.
Hello sir,
Not, for this moment. Thanks a lot for your ideea. You can provides more information about your project?
Hey! Great library! I am really wanting to use this to show a game map (not the real world map). To do this I need to apply a custom CRS.
Im unsure whether this library can currently do this, if not I would love to see this functionality added! :)
Thanks.