ozma.3498:

I’m sure the devs are aware of it, but since it doesn’t look like anybody else has posted about it I thought I’d let you know that the map tile JPGs are intermittently not loading and have been this way for 8+ hours at the time of this post. It’s not just me – many others are having the same issue.

For example:
https://tiles.guildwars2.com/1/1/7/62/66.jpg

This is just a randomly selected tile. At the time of this post, none of them will load.

onekopaka.5803:

I can’t even resolve tiles.guildwars2.com, both from Google Public DNS and my VPS provider’s DNS. OpenDNS seems to work fine though.

smiley.1438:

Yup, map tile service seems to be completely down – i’m just getting th error tiles after a while.

http://wiki-de.guildwars2.com/wiki/Königintal/Interaktive_Karte

Cliff Spradlin.3512:

Hi,

We weren’t aware of the problem actually.

Sorry about the outage — we changed our authoritative DNS servers this morning for guildwars2.com and it seems like tiles.guildwars2.com didn’t make it over to the new server.

It should be fixed now, or within a few minutes depending on negative caching.

smiley.1438:

Ah, ok. Thanks for the info

ozma.3498:

Thanks for the update Cliff!

Drakma.1549:

This brings up a good point though. Cliff, how hard would it be to get an API status json that contained all if the API calls and their statuses?

Cliff Spradlin.3512:

This brings up a good point though. Cliff, how hard would it be to get an API status json that contained all if the API calls and their statuses?

It’s a good idea, but it’s not super easy, unfortunately. It would need to run on a server outside of our normal datacenters to be effective for external failures like DNS problems.

We do have internal monitoring of our services of course, but errors reported by those systems don’t map directly to specific API failures. To do a really good job, we’d need to write services that top into our monitoring, and translate them to specific API failures.

Long story short, if there’s enough interest, maybe one of you could write a status site. It would probably work just as well as one we’d create, if not better.

smiley.1438:

Well, not really an outage, but is it just me or aren’t the tiles updated with the new map yet?

Oh and while i’m at it:

According to texture_dims, these tiles should exist, right? (They actually do exist, but only for zoom level 1 and 2)


GET https://tiles.guildwars2.com/2/1/3/0/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/0/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/1/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/1/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/2/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/2/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/3/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/3/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/4/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/4/0.jpg:1
...

http://gw2.chillerlan.net/examples/gw2maps-gmaps-simple.html -> switch to the mists and see

multivira.7925:

I’m guessing they can’t be bothered with purely white tiles

Cliff Spradlin.3512:

Well, not really an outage, but is it just me or aren’t the tiles updated with the new map yet?

Oh and while i’m at it:

According to texture_dims, these tiles should exist, right? (They actually do exist, but only for zoom level 1 and 2)


GET https://tiles.guildwars2.com/2/1/3/0/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/0/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/1/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/1/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/2/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/2/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/3/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/3/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/4/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/4/0.jpg:1
...

http://gw2.chillerlan.net/examples/gw2maps-gmaps-simple.html -> switch to the mists and see

You need to respect the clamped_view from the map_floor api. From the docs: “The map_floor.json API contains useful information like the size of each floor, and bounding rects. The bounding rects define which tiles are available for download, as well as the area of the map that should presented to the user. Tiles outside of the bounding rect are not available for download.”

https://api.guildwars2.com/v1/map_floor.json?continent_id=2&floor=1

“clamped_view”: [
[0,4094], [16382,16382]
]

Sorry if it’s confusing – world maps are complicated.

smiley.1438:

I’m aware of the clamped_view, i was just wondering because the tiles are available at zoom 1&2

Firilion.3867:

Well, not really an outage, but is it just me or aren’t the tiles updated with the new map yet?

Oh and while i’m at it:

According to texture_dims, these tiles should exist, right? (They actually do exist, but only for zoom level 1 and 2)


GET https://tiles.guildwars2.com/2/1/3/0/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/0/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/1/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/1/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/2/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/2/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/3/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/3/0.jpg:1
GET https://tiles.guildwars2.com/2/1/3/4/0.jpg 403 (Forbidden) tiles.guildwars2.com/2/1/3/4/0.jpg:1
...

http://gw2.chillerlan.net/examples/gw2maps-gmaps-simple.html -> switch to the mists and see

You need to respect the clamped_view from the map_floor api. From the docs: “The map_floor.json API contains useful information like the size of each floor, and bounding rects. The bounding rects define which tiles are available for download, as well as the area of the map that should presented to the user. Tiles outside of the bounding rect are not available for download.”

https://api.guildwars2.com/v1/map_floor.json?continent_id=2&floor=1

“clamped_view”: [
[0,4094], [16382,16382]
]

Sorry if it’s confusing – world maps are complicated.

It is a bit confusing to me how i have to use the clamped_view. I am trying to build a world map in c# (within a WPF Client) without using leaflet and co. and it is very hard to get it running.

This will become part of a tool for my guild which is currently under development. It uses WCF Services hosted on an IIS, Data-Storage within a SQL Server and a WPF – Client for my fellow Guildies. It is currently Alpha status an we are testing a lot.
Right now we have a complete Calendar with Appointments, a Userlist with Auto-Invite, Boss-Timer, Live-WvW Maps and a lot more but the biggest thing missing are integrated Maps.

Could you please help me a bit into the right direction to get Maps working?
Thanks a lot and please excuse my bad english

Many Greetings
Firilion

p.s.: Maybe i’ll post a youtube video of our tool later on (actually i only have some video footage in german language). When it is done, i will try to get it installable and so distributable to anyone who is interested.

smiley.1438:

Could you please help me a bit into the right direction to get Maps working?

This part of my code may give you an idea:

https://github.com/codemasher/gw2api-tools/blob/master/js/gw2maps-jquery.js#L153

		// the map has a clamped view? ok, we use this as bound
		if(floordata.clamped_view){
			clamp = floordata.clamped_view;
			bounds = new L.LatLngBounds(p2ll([clamp[0][0], clamp[1][1]]), p2ll([clamp[1][0], clamp[0][1]])).pad(0.2);
		}
		// we display a specific map? so lets use the maps bounds
		else if(options.region_id && options.map_id){
			clamp = floordata.regions[options.region_id].maps[options.map_id].continent_rect;
			bounds = new L.LatLngBounds(p2ll([clamp[0][0], clamp[1][1]]), p2ll([clamp[1][0], clamp[0][1]])).pad(0.4);
		}
		// else use the texture_dims as bounds
		else{
			//bounds = new L.LatLngBounds(p2ll([0, (1 << options.max_zoom)*256]), p2ll([(1 << options.max_zoom)*256, 0]));
			bounds = new L.LatLngBounds(p2ll([0, floordata.texture_dims[1]]), p2ll([floordata.texture_dims[0], 0])).pad(0.1);
		}
		mapobject.map.setMaxBounds(bounds).fitBounds(bounds);

Firilion.3867:

Could you please help me a bit into the right direction to get Maps working?

This part of my code may give you an idea:

https://github.com/codemasher/gw2api-tools/blob/master/js/gw2maps-jquery.js#L153

		// the map has a clamped view? ok, we use this as bound
		if(floordata.clamped_view){
			clamp = floordata.clamped_view;
			bounds = new L.LatLngBounds(p2ll([clamp[0][0], clamp[1][1]]), p2ll([clamp[1][0], clamp[0][1]])).pad(0.2);
		}
		// we display a specific map? so lets use the maps bounds
		else if(options.region_id && options.map_id){
			clamp = floordata.regions[options.region_id].maps[options.map_id].continent_rect;
			bounds = new L.LatLngBounds(p2ll([clamp[0][0], clamp[1][1]]), p2ll([clamp[1][0], clamp[0][1]])).pad(0.4);
		}
		// else use the texture_dims as bounds
		else{
			//bounds = new L.LatLngBounds(p2ll([0, (1 &lt;&lt; options.max_zoom)*256]), p2ll([(1 &lt;&lt; options.max_zoom)*256, 0]));
			bounds = new L.LatLngBounds(p2ll([0, floordata.texture_dims[1]]), p2ll([floordata.texture_dims[0], 0])).pad(0.1);
		}
		mapobject.map.setMaxBounds(bounds).fitBounds(bounds);

Thanks for your answer but i don’t get how this effects the tiles i have to download from tiles.guildwars2.com/cID/fID/zLevel/x/y.jpg
How do i matchmake this with the clamped_view?
Since i can’t use leaflet I do not have those options you are using.

Example: The Mists – Map
tiles.guildwars2.com/2/1/2/0/0.jpg does exist
tiles.guildwars2.com/2/1/3/0/0.jpg does not exist or is not available for dl

How can i calculate which map-tiles are available at a specific zoom level?

Thank for your help!

multivira.7925:

Could you please help me a bit into the right direction to get Maps working?

This part of my code may give you an idea:

https://github.com/codemasher/gw2api-tools/blob/master/js/gw2maps-jquery.js#L153

		// the map has a clamped view? ok, we use this as bound
		if(floordata.clamped_view){
			clamp = floordata.clamped_view;
			bounds = new L.LatLngBounds(p2ll([clamp[0][0], clamp[1][1]]), p2ll([clamp[1][0], clamp[0][1]])).pad(0.2);
		}
		// we display a specific map? so lets use the maps bounds
		else if(options.region_id && options.map_id){
			clamp = floordata.regions[options.region_id].maps[options.map_id].continent_rect;
			bounds = new L.LatLngBounds(p2ll([clamp[0][0], clamp[1][1]]), p2ll([clamp[1][0], clamp[0][1]])).pad(0.4);
		}
		// else use the texture_dims as bounds
		else{
			//bounds = new L.LatLngBounds(p2ll([0, (1 &lt;&lt; options.max_zoom)*256]), p2ll([(1 &lt;&lt; options.max_zoom)*256, 0]));
			bounds = new L.LatLngBounds(p2ll([0, floordata.texture_dims[1]]), p2ll([floordata.texture_dims[0], 0])).pad(0.1);
		}
		mapobject.map.setMaxBounds(bounds).fitBounds(bounds);

Thanks for your answer but i don’t get how this effects the tiles i have to download from tiles.guildwars2.com/cID/fID/zLevel/x/y.jpg
How do i matchmake this with the clamped_view?
Since i can’t use leaflet I do not have those options you are using.

Example: The Mists – Map
tiles.guildwars2.com/2/1/2/0/0.jpg does exist
tiles.guildwars2.com/2/1/3/0/0.jpg does not exist or is not available for dl

How can i calculate which map-tiles are available at a specific zoom level?

Thank for your help!

Just try and download them. If you get an error, just don’t display anything there. It will be very unlikely that people will want to view those areas anyway as they’re all white as far as I can tell.

smiley.1438:

Only files within the clamped_view are available for download as Cliff mentioned above.
Now look at this line:

//bounds = new L.LatLngBounds(p2ll([0, (1 << options.max_zoom)*256]), p2ll([(1 << options.max_zoom)*256, 0]));

p2ll() recalculates from pixels to lat/lng where the parameters are the NE and SW corners of the map – starting at 0 in this case. You can calculate like this:

2 ^ zoom = 1 << zoom (bit shift) = tile_range (assuming all tiles are available)

so:

2 ^ max_zoom * tile_size = (1 << max_zoom) * tile_size = texture_dims (where tile_size is 256)

With this knowledge you can check if a tile is in range by comparing to the clamped_view data. Google Maps for example uses a function as tile getter where you’re able to verify if a tile is in range:

function get_tile(coords,zoom){ // coords are the calculated tile coordinates which the app tries to download
	if(coords.y < 0 || coords.x < 0 || coords.y >= (1 << zoom) || coords.x >= (1 << zoom)){
		return "/path/to/errortile.jpg";
	}
	return "https://tiles.guildwars2.com/"+continent_id+"/"+floor_id+"/"+zoom+"/"+coords.x+"/"+coords.y+".jpg";
}

You can replace the min and max values with the values of the clamped_view then (if available).