Background: The mapdata library is a client to the MediaWiki Action API "mapdata" query. The Kartographer extension and kartotherian service consume this library. As a courtesy, the getter recursively fetches and substitutes "ExternalData", GeoJSON retrieved in additional HTTP requests. This recursion only goes one level down.
Problem: mapdata pulls the external data fragments out of their GeoJSON hierarchy and up to the top level of the internal result list, as a way of making the Promises easier to manage and parallelize. This is unexpected and unwieldy for external scripts to handle, for example when the interface wants to list all groups or hide a group that contains external data.
Suggestion: Expand mapdata in-place in the hierarchy. Keep the requests parallelized. This matches behavior of the new parse-time geoshape expansion.