Next Billion Maps GL is a drop-in upgrade for the Next Billion Maps. Most of the functionalities will work the same without changing much of your code.
However there are a few minor changes that would need adaptation depending on your use cases.
URL and API Key
Next Billion Maps GL introduces a new tiles service provided by NextBillion.ai which requires a valid API Key. You'll need to add the API Key before initializing a map instance. Please refer to the page Get an API Key for more information.
Basically, to upgrade your projects with the
Next Billion Maps GL, all that you need to change are:
maps-gl.nextbillion.iofor the stylesheet and script tags
- Provide a valid API Key
A complete example map:
If you've used polygons in your projects, you need to slightly change the
path parameter to make them work in the
Next Billion Maps GL.
Next Billion Maps GL doesn't support changing the outline of the shapes at the moment. If it's critical for your project to be able to edit shapes, please stay with the legacy version of the Next Billion Maps for now.
Meanwhile we're working hard to enable all features from the Next Billion Maps legacy version to the
Next Billion Maps GL. Please stay tuned!