Custom sources
Author: mournerCreated Jul 29, 2016Updated Aug 12, 2026
Labelsfeature :green_apple:
The custom source API (addType, etc.) as implemented in #2667 is an undocumented / experimental feature. There's some private documentation in https://github.com/mapbox/mapbox-gl-js/blob/6a6479884e08385998354fc845d4193d6bdb4336/src/ui/map.js#L950-L960 and https://github.com/mapbox/mapbox-gl-js/blob/6a6479884e08385998354fc845d4193d6bdb4336/src/source/source.js, but no guarantees that it is / will stay accurate!
The true custom source API is something we're hoping to work on pretty soon ( ), and you can track that work here: https://github.com/mapbox/mapbox-gl-js/projects/2
Source: mapbox/mapbox-gl-js