@2gis/mapgl
Advanced tools
Comparing version 1.3.2 to 1.3.3
import * as mapgl from '../types'; | ||
export declare function load(): Promise<typeof mapgl>; | ||
export declare function load(mapglURL?: string): Promise<typeof mapgl>; |
@@ -1,4 +0,4 @@ | ||
var mapglURL = 'https://mapgl.2gis.com/api/js'; | ||
var map; | ||
export function load() { | ||
export function load(mapglURL) { | ||
if (mapglURL === void 0) { mapglURL = 'https://mapgl.2gis.com/api/js'; } | ||
if (typeof window === 'undefined') { | ||
@@ -10,3 +10,3 @@ throw new Error('mapgl is supported only in browser environment'); | ||
} | ||
return createScriptAndLoad().then(function () { | ||
return createScriptAndLoad(mapglURL).then(function () { | ||
map = window.mapgl; | ||
@@ -16,3 +16,3 @@ return map; | ||
} | ||
function createScriptAndLoad() { | ||
function createScriptAndLoad(mapglURL) { | ||
return new Promise(function (resolve, reject) { | ||
@@ -19,0 +19,0 @@ // Create script element and set attributes |
{ | ||
"name": "@2gis/mapgl", | ||
"version": "1.3.2", | ||
"version": "1.3.3", | ||
"description": "MapGL API script loader with typings", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
41022
1