I want to know how I would go about creating a parallax Google Maps effect like on this wordpress theme (scroll toward the bottom)
I tried using some various parallax jquery scripts and javascripts, but can’t seem to get the same effect.
I want to know how I would go about creating a parallax Google Maps effect like on this wordpress theme (scroll toward the bottom)
I tried using some various parallax jquery scripts and javascripts, but can’t seem to get the same effect.
You must be logged in to post a comment.
The effect only for a map is not hard to achieve. Observe the
scroll
-event of the window and use thepanBy
-method of the map to get the effect.Simple implementation: http://jsfiddle.net/doktormolle/dXqhn/
The link you provided didn’t seem like a parallax to me, but either way, I made a short fiddle using Jquery scrollTop() method showing how it can be achieved, mind it’s a bit buggy, but maybe we could find a better workaround based on it.
Here is the fiddle forked from Dr.Molle’s answer: http://jsfiddle.net/xsz32sy9/
And here is the Jquery code:
It looks like the page takes it’s google maps, makes sure that the map layer is larger then the space it displays in, and then modifies the top margin from 0px to -150px as the user scrolls over it.
The zoom controls are in a separate fixed position div so that they stay in place as the background moves.