On this page

Function diff

  • Diff two stylesheet

    Creates semanticly aware diffs that can easily be applied at runtime. Operations produced by the diff closely resemble the maplibre-gl-js API. Any error creating the diff will fall back to the 'setStyle' operation.

    Example diff: [ { command: 'setConstant', args: ['@water', '#0000FF'] }, { command: 'setPaintProperty', args: ['background', 'background-color', 'black'] } ]

    Parameters

    Returns DiffCommand<keyof DiffOperationsMap>[]

    Array list of changes

Was this helpful?
SDK JS
Reference
diff