Possible map_floor API bug?

Possible map_floor API bug?

in API Development

Posted by: AdelphiA.9287

AdelphiA.9287

I have been trying to get the WP / landmark data from mists which I believe is continent 2, floor 1.

However, if I enter…

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

I also get all other floor data for points_of_interest. Is this correct or should it just return the floor I requested?

AdelphiA.9287 – The Enigma Guild

Possible map_floor API bug?

in API Development

Posted by: smiley.1438

smiley.1438

This is just fine, the floordata returns everything (well, not everything yet) what can be found on the specified floor – when you look for the data on a specific map, you’ll need to dig through the floors you find in https://api.guildwars2.com/v1/continents.json

Possible map_floor API bug?

in API Development

Posted by: AdelphiA.9287

AdelphiA.9287

My whole point of asking is, if it returns ALL floors, why do we need to specify “floor=X”?

AdelphiA.9287 – The Enigma Guild

Possible map_floor API bug?

in API Development

Posted by: smiley.1438

smiley.1438

Floor 1 has basically all floor data so that you can build a full world map i guess.

Possible map_floor API bug?

in API Development

Posted by: Cliff Spradlin.3512

Cliff Spradlin.3512

Lead Programmer

It’s up to the level designers to decide how to organize this data.

Note that in Tyria for example, all waypoints, etc. exist on all 3 floors in-game, even though the waypoint itself is on just one floor. This is so that you can always see waypoints.

This is reflected in the map_floor.json API too. The technical implementation of the map data does not always consistently reflect the logical in-game understanding of the map.

(edited by Cliff Spradlin.3512)

Possible map_floor API bug?

in API Development

Posted by: AdelphiA.9287

AdelphiA.9287

Thanks for the response Cliff, but for the life of me I can’t figure out how to display WPs in WvW or PvP. ;( They just refuse to show. I’m sure it’s something I’m doing as I make a call to test and the names come up correctly. Oh well, a bit more delving to do…

AdelphiA.9287 – The Enigma Guild

Possible map_floor API bug?

in API Development

Posted by: smiley.1438

smiley.1438

Why not have a look at existing code? I don’t know what language you’re coding in, but a Javascript example might serve for an idea:

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

Possible map_floor API bug?

in API Development

Posted by: AdelphiA.9287

AdelphiA.9287

Thanks, I’ll take a look at that as it’s JS I’m using. I’ve been working from the basic example that Cliff linked us.

AdelphiA.9287 – The Enigma Guild