Join us online - 19th of November
Save your spot
For AI agents: a documentation index is available at /llms.txt. Markdown versions of all pages are available by appending .md to any URL.

Function migrate

  • Migrate a Mapbox/MapLibre GL Style to the latest version.

    Parameters

    Returns StyleSpecification

    a migrated style

    const fs = require('fs');
    const migrate = require('@maplibre/maplibre-gl-style-spec').migrate;
    const style = fs.readFileSync('./style.json', 'utf8');
    fs.writeFileSync('./style.json', JSON.stringify(migrate(style)));
    
Was this helpful?