Skip to content

Instantly share code, notes, and snippets.

declare var Wkt: WktModule.WktStatic;
declare namespace WktModule {
interface WktStatic {
new (obj?: any): Wkt;
beginsWith(str: string, sub: string): boolean;
endsWith(str: string, sub: string): boolean;
delimiter: string;
isArray(obj: any): boolean;
trim(str: string, sub: string): string;
mapboxgl.accessToken = "your_access_token" ;
/** Create Map */
var map = new mapboxgl.Map({container: "map",
style: 'mapbox://styles/mapbox/streets-v9',
center: [-98, 38.88],
zoom: 3});
/** Init Client */
var mapboxClient = mapboxSdk({ accessToken: mapboxgl.accessToken });
declare namespace MapboxSdk {
/*********************************************************************************************************************
* SDK Types
*********************************************************************************************************************/
export interface EventEmitter {
response: MapiResponse;
error: MapiError;
downloadProgress: ProgressEvents;
uploadProgress: ProgressEvents;
}