Reincarnated.1754 Posted March 22, 2022 Share Posted March 22, 2022 I don't know who dose the Tiles on Wiki but I have a quick fix if they are interested. There is two things to change just a few lines. This may be temporary (HA HA) so note your code to return back to normal when fixed by ArenaNet. (As If) Could do with a code format button, so I have numbered code lines `code` First is the unproject function. `code` function unproject(coord) { `code` if (Continent === 2) { `code` return map.unproject(coord, map.getMaxZoom()); `code` } else { `code` var newValueX = coord[0] - 32768; //128 tiles `code` var newValueY = coord[1] - 16384; //64 tiles `code` return map.unproject([newValueX, newValueY], map.getMaxZoom()); `code` } `code` } If you made some none API icons, that is, use pre-fixed coordinates, then you need to use the original unproject function. I made a separate unprojectX(coord). Second is the origin of the maps. This only matters if you intend to make some new Tiles. I keep dreaming that ArenaNet find someone who knows how how to make the Tiles. #wher's that pipe# `code` MapContinents = $.getJSON("https://api.guildwars2.com/v1/continents.json" Only gives overall size of map. I doubt that ArenaNet are going to move all the Tiles to a new Zero Origin. (This may have gone over some heads) Currently it assumed the Zero Origin = 0,0. They have increased the overall map size but also increased it Northwards and to the West. (Zero Origin moved East and South) I reckon: South 2304, 9 Tiles. East 19456, 76 Tiles. So. `code` var MapOffsetSouthWestN = -19456; // 76 Tiles. `code` var MapOffsetNorthEastN = -2304; // 9 Tiles. `code` // Get Map Continents----------------------- `code` var MapContinents = $.getJSON("https://api.guildwars2.com/v1/continents.json", { `code` }) `code` .fail(function () { `code` TyriaMapSizeNE = 81920; `code` TyriaMapSizeSW = 114688; `code` MistsMapSizeNE = 16384; `code` MistsMapSizeSW = 16384; `code` //======= `code` }) `code` .done(function (jsonData) { `code` Continents = jsonData.continents; `code` TyriaMapSize = Continents[1].continent_dims; `code` TyriaMapSizeNE = TyriaMapSize[0]; `code` TyriaMapSizeSW = TyriaMapSize[1]; `code` MistsMapSize = Continents[2].continent_dims; `code` MistsMapSizeNE = MistsMapSize[0]; `code` MistsMapSizeSW = MistsMapSize[1]; `code` //======= `code` }) `code` .always(function () { `code` if (Continent === 2) { `code` MapMinZoom = 3; `code` MapMaxZoom = 6; `code` southWest = map.unproject([0, MistsMapSizeSW], MapMaxZoom); `code` northEast = map.unproject([MistsMapSizeNE, 0], MapMaxZoom); `code` } `code` else { `code` MapMinZoom = 3; `code` MapMaxZoom = 7; `code` southWest = map.unproject([MapOffsetSouthWestN, TyriaMapSizeSW + MapOffsetSouthWestN], MapMaxZoom);//lat: -744, lng: -152 `code` northEast = map.unproject([TyriaMapSizeNE + MapOffsetNorthEastN, MapOffsetNorthEastN], MapMaxZoom);//lat: 18, lng: 622 `code` } `code` map.setZoom(MapMaxZoom); `code` map.options.maxZoom = MapMaxZoom; `code` map.options.minZoom = MapMinZoom; `code` map.setMaxBounds([southWest, northEast]); `code` //======= `code` }); `code` } 1 Link to comment Share on other sites More sharing options...
Reincarnated.1754 Posted April 21, 2022 Author Share Posted April 21, 2022 Update. The "Molten Furnace" did not fit. `code` var MapOffsetSouthWestN = -25600; // 100 Tiles. `code` var MapOffsetNorthEastN = -12800; // 50 Tiles. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now