Animation when Zooming

J

Jon

Hello all,

When zooming in on Google maps a little animation appears (a red box).
How would it be possible to do this in JS?

I've tried having an image that I make visible, zoom in, then hide the
image but it doesn't appear as it all happens too fast.

Any help would be great.

Jon
 
R

rf

Jon said:
Hello all,

When zooming in on Google maps a little animation appears (a red box).
How would it be possible to do this in JS?

I've tried having an image that I make visible, zoom in, then hide the
image but it doesn't appear as it all happens too fast.

Any help would be great.

Why not study how google do it?
 
S

Stevo

Jon said:
Hello all,

When zooming in on Google maps a little animation appears (a red box).
How would it be possible to do this in JS?

I've tried having an image that I make visible, zoom in, then hide the
image but it doesn't appear as it all happens too fast.

You're probably hiding your image too early. I imagine google maps first
zoom in and show the image they already have zoomed, meanwhile they're
loading the more detailed image. They probably only hide their animation
once the more detailed image has loaded.

It sounds like you're hiding immediately. If you're zooming in on
something and not actually going to the server to download anything,
then why not hide the animation via a setTimeout. Maybe something like
half a second.
 
J

Jon

You will need to help us helping you, though.

Where exactly does your understanding end with this?

<http://jibbering.com/faq/#posting>

PointedEars
--
Use any version of Microsoft Frontpage to create your site.
(This won't prevent people from viewing your source, but no one
will want to steal it.)
  -- from <http://www.vortex-webdesign.com/help/hidesource.htm> (404-comp.)

Thomas,

When I study the google maps site, I can't dissect the code
sufficiently to see where the box appears.
I'm not a hardcore JS developer and so elements are beyond my skill
level.

Jon
 
J

Jon

You're probably hiding your image too early. I imagine google maps first
zoom in and show the image they already have zoomed, meanwhile they're
loading the more detailed image. They probably only hide their animation
once the more detailed image has loaded.

It sounds like you're hiding immediately. If you're zooming in on
something and not actually going to the server to download anything,
then why not hide the animation via a setTimeout. Maybe something like
half a second.

Cheers Stevo,

I'll give that a try.

Jon
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,262
Messages
2,571,056
Members
48,769
Latest member
Clifft

Latest Threads

Top