Legit Prep In.5893:

It looked so convinent to treat the https://api.guildwars2.com/v1/map_floor.json?continent_id=1&floor=1&lang=en as a simple table/array, until I noticed that some map-IDs are in there multiple times … wouldn’t it be better to consolidate the entries under ONE UNIQUE mapID in there ? It is such a hassle for me to put together the data which is spread over that API result. Like search for “Lonar’s Pass”, you will find 2 entries with each having different data underneath… :/ why ?

smiley.1438:

Floor 1/1 contains all the instance data too, so it’s possible that the same map_id shows up multiple times with different values. To circumvent this, use floor 1/2 instead

See also: https://forum-en.guildwars2.com/forum/community/api/API-Bug-map-floor-multiple-entries-per-map

OK, so we found the cause of this bug. The underlying map floor content sometimes points to the incorrect map_id for a few map instances.

Since it’s a bug in the underlying content, it’ll take a little while for it to be fixed in a live patch.

At least you found a good workaround in the meantime, which is to read floor 2’s data instead.

Legit Prep In.5893:

thank you very much, I thought I’m going crazy here …tables with multiple keys lol

smiley.1438:

Protip:

INSERT IGNORE INTO `mytable`...

(you might want to have a look at this: https://github.com/codemasher/gw2-database )
;)