diff --git a/README.md b/README.md index 8896dce..44d745d 100644 --- a/README.md +++ b/README.md @@ -56,7 +56,7 @@ Radar.initialize('prj_test_pk_...', { /* options */ }); Add the following script in your `html` file ```html - + ``` Then initialize the Radar SDK @@ -73,8 +73,8 @@ To create a map, first initialize the Radar SDK with your publishable key. Then ```html - - + + @@ -98,8 +98,8 @@ To create an autocomplete input, first initialize the Radar SDK with your publis ```html - - + + @@ -130,8 +130,8 @@ To power [geofencing](https://radar.com/documentation/geofencing/overview) exper ```html - - + + diff --git a/package-lock.json b/package-lock.json index f990b77..8cb7dba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "radar-sdk-js", - "version": "4.4.5", + "version": "4.4.6-beta.1", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/package.json b/package.json index 329eb41..db02d31 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "radar-sdk-js", - "version": "4.4.5", + "version": "4.4.6-beta.1", "description": "Web Javascript SDK for Radar, location infrastructure for mobile and web apps.", "homepage": "https://radar.com", "type": "module", diff --git a/src/api.ts b/src/api.ts index 50cdc03..93e3dc6 100644 --- a/src/api.ts +++ b/src/api.ts @@ -76,7 +76,7 @@ class Radar { Logger.info(`initialized with ${live ? 'live' : 'test'} publishableKey.`); if (options.debug) { - Logger.info(`using options: ${JSON.stringify(options)}`); + Logger.debug('using options', options); } // NOTE(jasonl): this allows us to run jest tests diff --git a/src/logger.ts b/src/logger.ts index 71bf4da..21701ea 100644 --- a/src/logger.ts +++ b/src/logger.ts @@ -27,9 +27,9 @@ const getLevel = (): number => { } class Logger { - public static debug(message: string) { + public static debug(message: string, options?: any) { if (getLevel() === LOG_LEVELS.debug) { - console.log(`Radar SDK (debug): ${message.trim()}`); + console.log(`Radar SDK (debug): ${message.trim()}`, options); } } diff --git a/src/ui/RadarMap.ts b/src/ui/RadarMap.ts index 4ccfcbd..7d04429 100644 --- a/src/ui/RadarMap.ts +++ b/src/ui/RadarMap.ts @@ -96,7 +96,7 @@ class RadarMap extends maplibregl.Map { radarMapOptions, { style }, ); - Logger.debug(`initialize map with options: ${JSON.stringify(mapOptions)}`); + Logger.debug('map initailized with options', mapOptions); (mapOptions as maplibregl.MapOptions).transformRequest = (url, resourceType) => { // this handles when a style is switched diff --git a/src/ui/autocomplete.ts b/src/ui/autocomplete.ts index 3d25cac..79bf13b 100644 --- a/src/ui/autocomplete.ts +++ b/src/ui/autocomplete.ts @@ -186,7 +186,7 @@ class AutocompleteUI { this.inputField.addEventListener('blur', this.close.bind(this), true); } - Logger.debug(`AutocompleteUI iniailized with options: ${JSON.stringify(this.config)}`); + Logger.debug('AutocompleteUI initialized with options', this.config); } public handleInput() { diff --git a/src/version.ts b/src/version.ts index 9faaae5..5e827c3 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1 +1 @@ -export default '4.4.5'; \ No newline at end of file +export default '4.4.6-beta.1'; \ No newline at end of file