"Baidu Map API" How to make a Map of Warcraft!! --cs map can also, hahaha

Source: Internet
Author: User

Original: "Baidu Map API" How to make a Map of Warcraft!! --cs map can also, hahaha

Summary:

Do You play Warcraft? Do you know how to make a Map of Warcraft?

Come and see this article!

---------------------------------------------

First, the preparation of the Production of Warcraft map

In fact, you just need to prepare some maps of the tile map, you can.

Using the slicing tool, put a complete picture (preferably larger, clearer) and cut into small pieces. ( I'll post the download link for this tool next week.) Leave a suspense, haha. )

Official Announcement Graph Tool Link: http://openapi.baidu.com/Tools/TileCutter.rar

Second, understand the Baidu Map API map Layer Interface

constructor function Describe
TileLayer([opts:TileLayerOptions]) Create an instance of a map layer.

Interface Address: Http://openapi.baidu.com/map/classReference.html#anchor6_TileLayer

Using this interface, you can spread the tiled map tiles on the original Baidu map.

varTilelayer= NewBmap.tilelayer ();
Tilelayer.gettilesurl= function(Tilecoord, zoom) {
varx=tilecoord.x;
vary=Tilecoord.y;
varURL= 'images/tiles/' +Zoom+ '/tile' +x+ '_' +y+ '. PNG';
returnURL;
}

Third, limit the display level of the map

If you only cut a level 1-4 map, your warcraft map should only show level 1-4.

So, make a limit to the map's display. Look at the first line of the source code below.

You also need to specify a custom map type to see the second line of the source code.

The third line, add the Fishbone control, will only show level 1-4 yo ~ because the first line controls the Minzoom and Maxzoom.

varMyMap= NewBmap.maptype ('MyMap', Tilelayer, {minzoom:1, Maxzoom:4});
varMap= NewBmap.map ('Container', {maptype:mymap});
Map.addcontrol (NewBmap.navigationcontrol ());

----------------------------------------------------------------------------------

Example: http://openapi.baidu.com/map/exam/example.html?v=1.2&7_20#7&20

"Baidu Map API" How to make a Map of Warcraft!! --cs map can also, hahaha

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.