Scenario :
- I'm currently trying to build a poor man's Google Maps using scripts and things to simulate all the functions.
- I have a massive image that I sliced up into tiles and display in a table on the web page.
- I found a script that enables a user to click and drag to navigate around the map.
Todo :
- Now I just need to implement zoom.
I found scripts to zoom single images but I want to be able to zoom the entire page out as a single element.
Since I have 100 images tiled to create the map, it's not practical to do it for each individual slice.
Is there a way to do this?
The page I have so far can be found at http://minecraft.firedrakecreative.com,
and then click on the thumbnail.
Any help is much appreciated!
Take a look at this example, it might help you out.
Basically you're gonna have to bind the scroll event and change the behavior. The example uses CSS3 transformations, if that doesn't work for you because it needs to work on old browsers you might need to change the images sizes. But still some browsers don't render the changed size of an image.
Just to give you a path to go, this is an example of what you can do, considering your page HTML:
You can see this DEMO in action here: http://jsfiddle.net/qG6qm/3/
IMPORTANT: for this code to work you have to change your table tag from:
to:
If you can use jQuery: