Skip to content

Support MapLibre GL JS as an alternative to Mapbox GL JS #133

Open
@dwoznicki

Description

@dwoznicki

I'd like to use MapLibre GL JS as my map renderer instead of Mapbox GL JS. MapLibre is an open source fork of Mapbox after they changed to a proprietary model, and includes features and bug fixes that are not available to earlier versions of Mapbox GL JS.

The MapLibre NPM package is set up to be a drop-in replacement for Mapbox, so swapping over is pretty painless. I managed to load it up simply by changing the imports in src/component/Map/MapMapbox.jsx.

import MapboxGl from 'mapbox-gl'
// import MapboxGl from 'maplibre-gl'

I'd be happy to contribute this feature, but I'm not sure how best to proceed.

  • We could simply replace the mapbox-gl dependency with maplibre-gl, if you don't anticipate people really caring which library is used.
  • We could add an environment variable or command line argument to choose renderers at initialization time.
  • We could add a UI element to change renderers at runtime.

Any thoughts?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions