Motivation: allow displaying page content before map data loading is done (geojson blob is in the header now) to show page contents faster
Best practice to place secondary JS and data at the bottom instead of the header
To consider:
- Make sure the dynamic mapframe code doesn’t accidentally miss the data and queries the API, i.e. initialization must also happen at the bottom.
- How does it work during preview?
- May break user scripts like the ones on Wikivoyage
Additional optimizations:
- T149855 Don’t include GeoJSON in JS config when the wiki is set to show static map thumbnails. Request on-demand.
- Request via a single mapdata API request with no group ids, which pulls all mapframes on the page. Current code will probably load each mapframe mapdata via a separate API call.