I have a map that will allow the user to select or slice images/pictures out of it.
As example a map width is 1200px * 1200px and the user selects say 700px x 700px square (note: aspect ratio is preserved) I grab the bounding box for that selection and I ask the tile server to generate a 1400px * 1400px image. That being said, I believe the scale of the image changes (ex. 1 inch equals 500feet) as its size change.
So I am trying to re-calculate that new scale level.
- Scale is defined as the ratio of the distance on a map to the corresponding distance on the surface the map represents.
- The distance on the map is the scale given.
How to calculate the corresponding distance on the surface the map represents?
Example: I have bounding box
The map says 1KM or 3000feet when I grab it. The bounding box width and height on the map is Width : 573px / Height: 573px.
Now I want to resize the image to be 900px by 900px and re calculate the scale, because the scale value changes as the size of the image changes.