How do I establish a set of preset zoom levels?

I'm experimenting with developing a mapping API based on Open Zoom and I would like to know how I might establish a set of preset zoom levels. I use a typical quadtree map tile service, with a set of integer zoom levels, each containing n 256 x 256 pixel tiles on each side of a square, where n = 2 ^ zoomLevel.

I would like to use Open Zoom to zoom to each one of these fixed levels, so that 1 screen pixel always represents 1 image pixel. In other words, I never want to be "between" zoom levels (except during the zoom tweening).

My problem is that I sometimes wind up on the "wrong" zoom level, where the previous map tile level is displayed at 2x magnification (or something like that) instead of showing the appropriate level at 1:1 magnification. And I don't know how to report which integer zoom level I am at, because I do not know how to translate between Open Zoom's scale and zoom values and this integer zoom level. Do you have any guidance on how to approach this problem?
Inappropriate?
1 person has this question

The company marked this question as answered.


User_default_medium