NextBillion
NextBillion.ai web SDK Entry.
You need to use the singleton instance of this class by calling window.nextbillion
if you load the sdk with CDN url.
Or you can get instance by import nextbillion from '@nbai/nbmap-gl' if you import the sdk with npm
Properties
Name | Type |
---|---|
apiHost | null | string |
apiKey | null | string |
version | string |
Methods
Method | |
---|---|
DisableNBTransform | DisableNBTransform() Return Value: void Disable the inner request transform for NextBillion.ai maptiles. You only need to call this method if you want to use the maptiles not provided by nextbillion.ai. |
EnableNBTransform | EnableNBTransform() Return Value: void Enable the inner request transform for NextBillion.ai maptiles. |
setApiHost | setApiHost(host: null | string) Parameters
Return Value: void Set the API host for the web SDK. |
setApiKey | setApiKey(token: null | string) Parameters
Return Value: void Set the API key for the web SDK. |
NBMap
Constructor
Name | |
---|---|
NBMap | new NBMap(options: NBMapOptions) Parameters
|
Properties
Name | Type |
---|---|
map | Map |
Methods
Method | |
---|---|
on | on(type: string, listener: Listener) Parameters
Return Value: NBMap |
setStyle | setStyle(style: null | string | StyleSpecification, options: StyleOptions) Parameters
Return Value: NBMap |
Example
Interface NBMapOptions
Properties
Name | |
---|---|
style | Type: string | StyleSpecification |