I have a html map that uses world map image as its background.
I can make a js function that changes div’s background position, but I like to change background position when user click on the map then drag like google map.
so I have a sample page here: http://lab.qacode.com/map which uses http://lab.qacode.com/map/map.jpg
I would appreciate any advice or tip.
An easy way to make this work is to use jQuery UI’s draggable
HTML
JavaScript
Placing markers
It’s possible to place a marker (or whatever) on the map. It’s very easy, and the coords are based on pixels within the canvas. For the marker in the test case it’s 150px from left and top of canvas.
Now to something a little more advanced, namely the (in)famous Google Maps pin.
See test case on jsFiddle