I'm using MapSCII (by rastapasta) for a project with python and nodejs. I need to render some objects by their location within the MapSCII output. MapSCII uses OSM tile layers to generate the ASCII map. I only know the coordinates of the center of the map, the zoom level as well as the number of rows/columns of the ASCII map.
Do you have any hints on how to calculate the boundaries (upper left and lower right corner), so that I can map a local coordinate system onto the ACSII data?
Take these variables for example:
def calculate_boundaries(lat, lng, zoom, width, height) -> tuple:
...
lat = 51.5252178
lng = -0.0925642
zoom = 17
width = 80
height = 24
upper_left, lower_right = calculate_boundaries(lat, lng, zoom, width, height)
I stumbled across this wiki entry, but it does not seem to be helpful, as I do not work with the tile numbers but with latitude/longitude.
// Edit Is this even feasible? Or would it be easier to note down, how much lat/lng change when moving in the 2D MapSCII array on each zoom level?