The simple realization _javascript skill of JavaScript map drag function Sprymap

Source: Internet
Author: User
Use it you can easily achieve similar to Google, Baidu map of the drag effect, to show the big picture when using Sprymap is the best. Sprymap customization is also very high, through the parameters can set the starting position of the picture, CSS style and so on. In addition, you can also set whether to use a smooth drag effect.
How to use
First load the Sprymap script file in the head
Copy Code code as follows:

<script type= "Text/javascript" src= "Sprymap-min2.js" ></script>

Add a picture to be displayed on the page, such as setting an IMG tag with ID worldmap
Copy Code code as follows:



Finally initialized when the page is loaded
Copy Code code as follows:

var map = new Sprymap ({ID: "WorldMap",
height:400,
width:800,
STARTX:200,
STARTY:200,
CssClass: "Mappy"});

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.