Showing Posts For smiley.1438:

Gendarran Fields Map

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

Go protest on the wiki contributor’s talk page, if you don’t like the contributor’s map. The wiki is only comprised of information contributed by users, just like you and me.

This. Theres a reason why the wiki has talk pages editable by everyone.

So, what about looking at the file’s page and read the comment over there?
http://wiki.guildwars2.com/wiki/File:Gendarran_Fields_map.jpg

Updated to conform with the Sky Pirates of Tyria update. This map does not have the map boundaries that Dr. Ishmael implements, but I am sure he can add them to this map if he desires

This is the map’s source btw. https://forum-en.gw2archive.eu/forum/community/fangen/High-Resolution-Zone-Maps-PvE/first#post2308855

Event Details API location coordinates

in API Development

Posted by: smiley.1438

smiley.1438

To figure out where something is on the continent you need to know their place within map_rect on the map, then fit map_rect inside continent_rect on the continent.

In fact we wouldn’t need to mess around with the map_rect at all if the data was consistent. Why can’t the events in the event_details.json have absolute coordinates like the POIs ’n stuff in the floor.json?

(i have currently ~400 extra lines of code just to clean up the inconsitent mess of the API o.O)

(edited by smiley.1438)

Event Details API location coordinates

in API Development

Posted by: smiley.1438

smiley.1438

continent_rect (and clamped_view) are the map bounds corners in absolute pixels within the worldmap (usually given by the texture_dims), where x/y 0 is the top left corner.

see that part of my parser for the use of that.

For the map_rect see a few postings above

(edited by smiley.1438)

High Resolution Zone Maps (PvE)

in Community Creations

Posted by: smiley.1438

smiley.1438

Huh, wrong forum ;D

I would have expected a post in the API forum – on the other hand: i should look more often into this one^^

Anyway, thanks for that

Bug with Swear Word filter

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

Imagine that kitten filter applied to a newspaper… o.O

Poor americans, must get everything filtered… land of freedom and so…

Forum search doesn't work

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

What are the WvW map bound value?

in API Development

Posted by: smiley.1438

smiley.1438

(edited by smiley.1438)

Many items in a single request.

in API Development

Posted by: smiley.1438

smiley.1438

I realized that when i hit the post button… ;D Anyway, what about a “just-in-time” refresh? Usually you don’t need the latest data for search features. So when you then call a specific item or reciepe, your app calls the API and refreshes the DB if the data is outdated.

Many items in a single request.

in API Development

Posted by: smiley.1438

smiley.1438

You just need to store the data on your side and compare the APIs item list with your local one, then request the missing items – you don’t need a thousand requests for that.

I’m doing that in 2 steps – first step – update your local data (this is the lazy way of comparing whats missing)

$data = gw2_api_request('items.json');
if(is_array($data) && isset($data['items'])){
	foreach($data['items'] as $item){
		mysqli_query('INSERT IGNORE INTO `gw2_items` (`item_id`) VALUES ('.intval($item).') ');
	}
}

second step – request the missing data:

$count = mysqli_query('SELECT COUNT(*) FROM `gw2_items` WHERE `name_de` = \'\' OR `name_en` = \'\' OR `name_es` = \'\' OR `name_fr` = \'\' ');
if(intval($count[0]) > 0){
	$q = mysqli_query('SELECT `item_id` FROM `gw2_items` WHERE `name_de` = \'\' OR `name_en` = \'\' OR `name_es` = \'\' OR `name_fr` = \'\' ');
	while($row = mysqli_fetch_assoc($q)){
		$data = gw2_api_request('item_details.json?item_id='.$row['item_id'].'&lang=de');
		if(is_array($data) && !isset($data['error'])){
			// yada yada yada...
		}
	}
}

Since items don’t change that often, this ist still the best strategy. If you really need the latest data, you should rely on a direct request.

(edited by smiley.1438)

Event Details API location coordinates

in API Development

Posted by: smiley.1438

smiley.1438

you can do this as below :


longitude = (coord[0] - 16384) / (32768 / 360);
latitude = 2 * arctan( e ^ ( ( coord[1] - 16384 ) / -(32768 / (2 * PI)) ) - PI / 2 ) * (180/PI);

Thanks so much for this, i got it working now – the hint about the map size was essential, but a few missing brackets made me crazy…

http://gw2.chillerlan.net/examples/gw2maps-gmaps-simple.html

so it looks like this now:

function fromPointToLatLng(point, max_zoom) {
	var size = (1 << max_zoom) * 256,
		lat = (2 * Math.atan(Math.exp((point.y - size/2) / -(size/(2 * Math.PI)))) - (Math.PI / 2)) * (180/Math.PI),
		lng = (point.x - size/2) * (360/size);
	return new google.maps.LatLng(lat, lng);
}

and LatLng to pixel conversion:

function fromLatLngToPoint(ll, max_zoom){
	var point = new google.maps.Point(0, 0),
		origin = new google.maps.Point(128, 128),
		tiles = 1 << max_zoom,
		bound = function(value, min, max){
			if (min != null) value = Math.max(value, min);
			if (max != null) value = Math.min(value, max);
			return value;
		},
		sin_y = bound(Math.sin(ll.lat() * (Math.PI / 180)), -0.9999, 0.9999);
	point.x = origin.x + ll.lng() * (256 / 360);
	point.y = origin.y + 0.5 * Math.log((1 + sin_y) / (1 - sin_y)) * -(256 / (2 * Math.PI));
	return new google.maps.Point(Math.floor(point.x * tiles), Math.floor(point.y * tiles));
}


(edited by smiley.1438)

Forum improvements

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

Anet, please just install php on your webserver and run a php based commercial forum software like invision power board which should perfectly suit all your needs. When you now come up with “security reasons” for not running php, well, that’s not php’s fault, but the admin’s (i mean, even facebook runs php/mysql and they seem to know why…).

(edited by smiley.1438)

Who is excited about the API going public?

in API Development

Posted by: smiley.1438

smiley.1438

btw. there are some stickied threads on the top of this forum:

API implementation library master list
List of apps and websites using the API

;)

[CSS-Hack] Fluid forum layout

in Guild Wars 2 Discussion

Posted by: smiley.1438

smiley.1438

Yep, and the browser extension injects the code to the current site – so it’s kind of a hack

[CSS-Hack] Fluid forum layout

in Guild Wars 2 Discussion

Posted by: smiley.1438

smiley.1438

will i get banned? since this is a third-party “program”?

This is actually no third party program. Installing a browser extension (which would be 3rd party, but not for the game^^) that just manages the appearance of a website isn’t bad at all.

btw. i made some more fixes. There’s still a problem with the “delete post” dialog when it loads via ajax into the overlay container. Current workaround: right click -> open in new window.

Map API / Mumble Mashup

in API Development

Posted by: smiley.1438

smiley.1438

Localisation Error

in API Development

Posted by: smiley.1438

smiley.1438

Yep, looks fine now.

btw. have you looked into that double space thing yet? I belive that most french and spanish items (~6200 each) with runes on them are affected.

example: https://api.guildwars2.com/v1/item_details.json?item_id=30189&lang=es

pattern: name [double space] suffix

(edited by smiley.1438)

Map API / Mumble Mashup

in API Development

Posted by: smiley.1438

smiley.1438

€: huh, the post i replied to is gone… :o well you could figure what the complaint was ;D

Where exactly is the difference between being in mumble or teamspeak with 50 people and/or seeing them on the map. Do you think everyone who plays serious (cough) wvw would reveal his position to the enemy? I’m working on a tool for exact this case: when you’re in a given guild or ally, you’ll see your members positions – you won’t see the enemy and the enemy won’t see you.

(edited by smiley.1438)

[CSS-Hack] Fluid forum layout

in Guild Wars 2 Discussion

Posted by: smiley.1438

smiley.1438

:D

I’ve fixed that lil bug (ok, i actually fixed it by making the notice box invisible) and i’ve added a monospace font for pre tags.

[CSS-Hack] Fluid forum layout

in Guild Wars 2 Discussion

Posted by: smiley.1438

smiley.1438

You’re welcome

I’ve found a little bug when posting and editing messages. i thought i had it fixed by adding :not(.flash.notice), but it wasn’t that easy. I recommend to remove the 2 occurences of this until i’ve brought up another fix.

[CSS-Hack] Fluid forum layout

in Guild Wars 2 Discussion

Posted by: smiley.1438

smiley.1438

Ok, i just wanted to adjust the width of the forum, because i’m sick of having 50% space wasted on my 1920 screen, but i ended up in a whole “redesign”. I’d like to share it with you, you just need a browser plug which can handle user stylesheets. Have fun

https://gist.github.com/codemasher/5884119

/*
 * Fluid Layout CSS Hack for the official Guild Wars 2 Forums
 *
 *
 * This stylesheet will override the forums default style and set it to a fluid full width layout
 * with increased font sizes for better readability at high resolutions.
 * It will also fix a few quirks like the unusable language links on the top and margins around smileys,
 * adds a monospace font and background for <pre> tags, increases the size of editor textareas and hides the e-mail address in the forums overall header.
 * (if you ever happen to make screenshots on the forums)
 *
 * intended for use with tools like:
 *
 * Stylebot (developed and tested with that)
 * https://chrome.google.com/webstore/detail/stylebot/oiaejidbmkiecgbjeifoejpgmdaleoha
 *
 * Stylish for Firefox (a few things somehow don't work, like min-height for posts)
 * https://addons.mozilla.org/de/firefox/addon/stylish/
 *
 * ...or any other browser plug-in which lets you add user defined styles.
 *
 * If you have suggestions or encounter problems with this stylesheet, just drop me a line on the gw2 forums
 * or just leave a comment right here on GitHub. (just don't ask me how to install this!)
 *
 *
 * smiley.1438
 *
 */

Attachments:

(edited by smiley.1438)

Map API / Mumble Mashup

in API Development

Posted by: smiley.1438

smiley.1438

GW2 uses inches (don’t ask)

Y U NO USE METRIC SYSTEM?

(sorry, i couldn’t resist…)

Map tiles service intermittently cutting out

in API Development

Posted by: smiley.1438

smiley.1438

Ah, ok. Thanks for the info

Map tiles service intermittently cutting out

in API Development

Posted by: smiley.1438

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

Event Details API location coordinates

in API Development

Posted by: smiley.1438

smiley.1438

The third number is the Z-coordinate, which doesn’t matter for plotting on a 2D map.

Isn’t that the center of the sphere (if applies) so that you would draw a spherical segment on the map?

This is a short sample to convert Pixel To coordinates

If you work with leaflet.js, the similar methods are L.Map.project() and L.Map.unproject() btw. http://leafletjs.com/reference.html#map-conversion-methods

While we’re at it: i’m trying to do the same with the gmaps API – they have a simple example there. However, translating latlng to pixel works fine with that, but i believe i’m too dumb to figure out how to translate back from pixel to latlng – the example function doesn’t seem to work as expected. There are a gazillion threads on the net, asking how that works, most answers are just RTFM like or “yay, solved!” with no comment on the final solution.

So, anyone please?

https://developers.google.com/maps/documentation/javascript/examples/map-coordinates

(edited by smiley.1438)

Numerous dubious references to cloudfront.net

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

http://aws.amazon.com/cloudfront/
http://whois.domaintools.com/cloudfront.net

These “garbage” subdomains are just to bypass a browsers parallel requests per domain limitation.

(edited by smiley.1438)

language selection usability issue

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

What is this picture in the top left?

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

Seems like a misbehaviour of the browser cache. Did you try flushing the cache and reload?

List of apps/websites using the API

in API Development

Posted by: smiley.1438

smiley.1438

[API Suggestion] Maps API

in API Development

Posted by: smiley.1438

smiley.1438

I wouldn’t mind if there was an individual array for each type so that you could loop through with 1 loop instead of 4 – the current map parser is an ugly duckling because of that.

I’d also like to request a “geocoding” service where you could send an id or a name and get just the data which you requested so that you don’t have to toop through hundreds of thousands arrays just to find 1 (!) point of interest.

(edited by smiley.1438)

[API Suggestion] World vs World

in API Development

Posted by: smiley.1438

smiley.1438

Hehe, thats the why i did it with my gmaps powerd wvw map weeks ago
https://chillerlan.net/gw2/wvw.html

[API Bug] map_floor: multiple entries per map

in API Development

Posted by: smiley.1438

smiley.1438

I’ve already seen your approaches on the wiki, but you seem to have problems with bounding boxes aka. pan restrictions – thats why i posted my example on your talk page earlier. It has also a minimum of inline JS which allows easier maintenance and it already supports multiple maps as you can see.

(edited by smiley.1438)

[API Bug] map_floor: multiple entries per map

in API Development

Posted by: smiley.1438

smiley.1438

Actually floor 2 seems to be the better choice to draw a full world map. Floor 1 is missing (or overwrites) sector names for Dredgehaunt Cliffs, Lornar Pass, Bloodtide Coast and Harathi Hinterlands. (You can see the holes on the map on low zoom levels with the sector name layer enabled. I’ve updated the demo on my server, not yet on GitHub – i’m using floor 2 now and dropped the workaround.

http://gw2.chillerlan.net/examples/gw2maps.html

btw. it’s interesting how leaflet manages the zoom levels depending on the viewport, yet annoying sometimes…

Dr Ishmael, i’d like to encourage you to use my example and help making it perfect for wiki use – i made these examples for the german wiki – i hope i’ll get some widget rights there soon to test it

(edited by smiley.1438)

[API Bug] map_floor: multiple entries per map

in API Development

Posted by: smiley.1438

smiley.1438

I hope we’ll get some more information on how the floors work. If you take floor 2 instead, everything seems to be fine. Floor 1 has all the instance data included and takes forever to load, too.

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

http://gw2.chillerlan.net/examples/gw2maps-test.html

(edited by smiley.1438)

Map API / Mumble Mashup

in API Development

Posted by: smiley.1438

smiley.1438

Resize and translate this point to fit into continent_rect (that’s the easy part) and boom, you can slap it onto the map.

http://i.imgur.com/ULRQjyd.jpg

Thats awesome!

Now make it so that it sends a POST request with the map_id/coords to a given URL (preferrably via https)…

(edited by smiley.1438)

Event Details API location coordinates

in API Development

Posted by: smiley.1438

smiley.1438

Yep, thats the impression i have too after further investigation:

15: {
	map_name: "Queensdale",
	min_level: 1,
	max_level: 17,
	default_floor: 1,
	floors: [0, 1, 2],
	region_id: 4,
	region_name: "Kryta",
	continent_id: 1,
	continent_name: "Tyria",
	map_rect: [
		[-43008, -27648],
		[43008, 30720]
	],
	continent_rect: [
		[9856, 11648],
		[13440, 14080]
	]
}


D77349CE-E422-469E-905B-827AA138D88F: {
	name: "Stop the elder earth elemental from destroying the dam.",
	level: 4,
	map_id: 15,
	flags: [ ],
	location: {
		type: "sphere",
		center: [-28975, 27321.2, -785.732],
		radius: 2000,
		rotation: 0
	}
}


….but: currently i don’t use the map_rect at all, nor do i have an idea how to translate the coords :o

Event Details API location coordinates

in API Development

Posted by: smiley.1438

smiley.1438

Hmm, the points in the event details are actually weird. My first thought was that these are relative values, but this wouldn’t make sense too.

[API Suggestion] World vs World

in API Development

Posted by: smiley.1438

smiley.1438

Now that we have a maps API, the coordinates for WvW objectives would be greatly appreciated. (beside the correct objective names and types)

https://api.guildwars2.com/v1/wvw/objective_names.json

[API Suggestion] Maps API

in API Development

Posted by: smiley.1438

smiley.1438

Is it possible to add/swap the poi/task/sector ids as iterator for easier access and consistency?

bad (requires ugly workaround to get the poi_id, see https://github.com/codemasher/gw2api-tools/blob/master/js/gw2maps.js ):

points_of_interest: [
	{
		poi_id: 1052,
		name: "Altes Löwenstein",
		type: "landmark",
		floor: 1,
		coord: [
			15688.1,
			15253.7
		]
	}
]


good (directly accessible via: points_of_interest[poi_id]):

points_of_interest: [
	1052: {
		name: "Altes Löwenstein",
		type: "landmark",
		floor: 1,
		coord: [
			15688.1,
			15253.7
		]
	}
]



Oh, the skill challenges don’t even have an id – is it possible to add one for direct access (beside the name of the challenge)?

€:
Would anyone mind if there would be one array, e.g. points, wich contains all point data (like the current points_of_interest array) instead of 4 arrays?

(edited by smiley.1438)

[API Suggestion] Event Details

in API Development

Posted by: smiley.1438

smiley.1438

Before i start working with these: please group the events by map_id if possible. (It’s already a pain in the kitteh to write workarounds for getting a poi by id in the maps API. I don’t like workarounds – i like usable data )

(edited by smiley.1438)

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

Yep, thanks!

Another thing:

the map floor API returns just 1 sector element per map for some maps eg: id 26: Dredgehaunt Cliffs – i believe this is not intended or is this an instace map (apparently not)?

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

(edited by smiley.1438)

API errors & bugs

in API Development

Posted by: smiley.1438

smiley.1438

Did we already kill the maps API? O.o

{
	error: 42,
	product: 0,
	module: 9001,
	line: 4119,
	text: "Srv2Route, transaction timeout {#17108}, {P+/Content/GetMapFloor+STS/1.0}"
}

Guild API feature requests

in API Development

Posted by: smiley.1438

smiley.1438

[API Suggestion] Maps API

in API Development

Posted by: smiley.1438

smiley.1438

Is there a map for the mists? I didn’t see one, but it would definitely help for the WvW app I’m making.

Have you read the Documentation? *coughs*

https://api.guildwars2.com/v1/continents.json

apparently yes

[API Suggestion] Maps API

in API Development

Posted by: smiley.1438

smiley.1438

I took Cliff’s example jsFiddle, expanded it, and turned it into a #widget for the wiki.

This is awesomesauce!

[Maps API] .zip'd tiles possible?

in API Development

Posted by: smiley.1438

smiley.1438

Hmm, 5G is huge, yes. :o

So i’ll give remote a try… Hand me some tranquilizers…

[Maps API] .zip'd tiles possible?

in API Development

Posted by: smiley.1438

smiley.1438

It’s just for development purposes – having the tiles on localhost would keep me sane when i’m reloading my local dev page – i’m on a 384kbit connection, so it would take ages to reload and zoom etc… from a remote server.

[Maps API] .zip'd tiles possible?

in API Development

Posted by: smiley.1438

smiley.1438

First of all: maps API – pure awsomeness – thanks for that one!

Would it be possible to zip the map tiles and have them as a seperate download? This would make life easier for developers on a slow internet connection (like me… coughs)

Please fix these annoying mouseover menus

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

Each time when i want to switch the language, a submenu pops up and keeps me from using the language selector because the menu box lays over the language box – very annoying. There are a gazillion possibilities to create such menus – why did you choose the worst one?

Attachments:

A topic with 49 answers is bugged

in Forum and Website Bugs

Posted by: smiley.1438

smiley.1438

See also this thread: https://forum-en.gw2archive.eu/forum/support/forum/Thread-loaded-as-Empty

A temporary fix is to post another message to a thread which is broken like i did over here: https://forum-en.gw2archive.eu/forum/community/api/API-Suggestion-Guilds/page/2#post2155561

High resolution WvW map?

in API Development

Posted by: smiley.1438

smiley.1438

Wow, thanks!

Am i asking too much when i say that i’d like to have all pve maps in this quality, too?
https://chillerlan.net/gw2/wvw (you smell what i’m cooking, eh?)