Michael
Michael

Reputation: 42100

How to implement the zoom trick as in Google Maps?

I would like to rephrase the question I asked before.

Let's say there are three images of different size: small, medium, and large. They represent basically the same picture but with different resolutions and so they are slightly different.

I would like to display a small image first. When a user zooms it in I would like to replace it with the medium one. Now the user can drag the picture and scroll it in the window. When the user zooms out the medium image, I would like to replace it with the small one, etc. I guess Google Maps does the same trick.

What is the best way to implement this trick in javascript (flash is the second option) ?

Upvotes: 0

Views: 364

Answers (1)

kirilloid
kirilloid

Reputation: 14304

On zoom start:

  1. Start image preloading.
  2. start zoom in animation.
  3. When both would end, just replace more zoomed images with less zoomed.
  4. ???
  5. PROFIT!

The similar algorithm for zoom out.

Upvotes: 1

Related Questions