i have a image (1536x1536), it's a map.
And i want to have X and Y axe on image max x: 3000.0, max y: 3000.0, min x: -3000.0, min y: -3000.0.
I want to to convert my coordinates (X,Y) in position on map (top/bottom and left/right)
i have a image (1536x1536), it's a map.
And i want to have X and Y axe on image max x: 3000.0, max y: 3000.0, min x: -3000.0, min y: -3000.0.
I want to to convert my coordinates (X,Y) in position on map (top/bottom and left/right)
Copyright © 2021 Jogjafile Inc.
From comments I assume you do not resize image by CSS but keep it in it's natural state. As such you can use a translate object with ratio difference. If this is extremely resource dependent I recommend using array over object (as to code displayed below).
It give you point to pixel translation.
Result:
More samples:
Various console log samples
Yields: