radar-sdk-js 4.3.0-beta.2 → 4.3.0-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/radar.js +6 -2
- package/dist/radar.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +1 -1
- package/src/ui/RadarMap.ts +5 -1
- package/src/version.ts +1 -1
package/README.md
CHANGED
|
@@ -56,7 +56,7 @@ Radar.initialize('prj_test_pk_...', { /* options */ });
|
|
|
56
56
|
|
|
57
57
|
Add the following script in your `html` file
|
|
58
58
|
```html
|
|
59
|
-
<script src="https://js.radar.com/v4.3.0-beta.
|
|
59
|
+
<script src="https://js.radar.com/v4.3.0-beta.3/radar.min.js"></script>
|
|
60
60
|
```
|
|
61
61
|
|
|
62
62
|
Then initialize the Radar SDK
|
|
@@ -73,8 +73,8 @@ To create a map, first initialize the Radar SDK with your publishable key. Then
|
|
|
73
73
|
```html
|
|
74
74
|
<html>
|
|
75
75
|
<head>
|
|
76
|
-
<link href="https://js.radar.com/v4.3.0-beta.
|
|
77
|
-
<script src="https://js.radar.com/v4.3.0-beta.
|
|
76
|
+
<link href="https://js.radar.com/v4.3.0-beta.3/radar.css" rel="stylesheet">
|
|
77
|
+
<script src="https://js.radar.com/v4.3.0-beta.3/radar.min.js"></script>
|
|
78
78
|
</head>
|
|
79
79
|
|
|
80
80
|
<body>
|
|
@@ -98,8 +98,8 @@ To create an autocomplete input, first initialize the Radar SDK with your publis
|
|
|
98
98
|
```html
|
|
99
99
|
<html>
|
|
100
100
|
<head>
|
|
101
|
-
<link href="https://js.radar.com/v4.3.0-beta.
|
|
102
|
-
<script src="https://js.radar.com/v4.3.0-beta.
|
|
101
|
+
<link href="https://js.radar.com/v4.3.0-beta.3/radar.css" rel="stylesheet">
|
|
102
|
+
<script src="https://js.radar.com/v4.3.0-beta.3/radar.min.js"></script>
|
|
103
103
|
</head>
|
|
104
104
|
|
|
105
105
|
<body>
|
|
@@ -130,8 +130,8 @@ To power [geofencing](https://radar.com/documentation/geofencing/overview) exper
|
|
|
130
130
|
```html
|
|
131
131
|
<html>
|
|
132
132
|
<head>
|
|
133
|
-
<link href="https://js.radar.com/v4.3.0-beta.
|
|
134
|
-
<script src="https://js.radar.com/v4.3.0-beta.
|
|
133
|
+
<link href="https://js.radar.com/v4.3.0-beta.3/radar.css" rel="stylesheet">
|
|
134
|
+
<script src="https://js.radar.com/v4.3.0-beta.3/radar.min.js"></script>
|
|
135
135
|
</head>
|
|
136
136
|
|
|
137
137
|
<body>
|
package/dist/radar.js
CHANGED
|
@@ -405,7 +405,7 @@ class Navigator {
|
|
|
405
405
|
}
|
|
406
406
|
}
|
|
407
407
|
|
|
408
|
-
var SDK_VERSION = '4.3.0-beta.
|
|
408
|
+
var SDK_VERSION = '4.3.0-beta.3';
|
|
409
409
|
|
|
410
410
|
class Http {
|
|
411
411
|
static request({ method, path, data, host, version, headers = {}, responseType, }) {
|
|
@@ -1493,7 +1493,11 @@ class RadarMap extends maplibregl.Map {
|
|
|
1493
1493
|
const style = getStyle(config, mapOptions);
|
|
1494
1494
|
const maplibreOptions = Object.assign({}, defaultMaplibreOptions, mapOptions, { style });
|
|
1495
1495
|
Logger.debug(`initialize map with options: ${JSON.stringify(maplibreOptions)}`);
|
|
1496
|
-
maplibreOptions.transformRequest = (url) => {
|
|
1496
|
+
maplibreOptions.transformRequest = (url, resourceType) => {
|
|
1497
|
+
// this handles when a style is switched
|
|
1498
|
+
if (resourceType === 'Style' && isRadarStyle(url)) {
|
|
1499
|
+
url = createStyleURL(config, Object.assign(Object.assign({}, maplibreOptions), { style: url }));
|
|
1500
|
+
}
|
|
1497
1501
|
let headers = {
|
|
1498
1502
|
'Authorization': config.publishableKey,
|
|
1499
1503
|
'X-Radar-Device-Type': 'Web',
|
package/dist/radar.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radar.js","sources":[],"sourcesContent":[],"names":[],"mappings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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
declare const _default: "4.3.0-beta.
|
|
1
|
+
declare const _default: "4.3.0-beta.3";
|
|
2
2
|
export default _default;
|
package/package.json
CHANGED
package/src/ui/RadarMap.ts
CHANGED
|
@@ -75,7 +75,11 @@ class RadarMap extends maplibregl.Map {
|
|
|
75
75
|
);
|
|
76
76
|
Logger.debug(`initialize map with options: ${JSON.stringify(maplibreOptions)}`);
|
|
77
77
|
|
|
78
|
-
(maplibreOptions as maplibregl.MapOptions).transformRequest = (url) => {
|
|
78
|
+
(maplibreOptions as maplibregl.MapOptions).transformRequest = (url, resourceType) => {
|
|
79
|
+
// this handles when a style is switched
|
|
80
|
+
if (resourceType === 'Style' && isRadarStyle(url)) {
|
|
81
|
+
url = createStyleURL(config, { ...maplibreOptions, style: url });
|
|
82
|
+
}
|
|
79
83
|
|
|
80
84
|
let headers = {
|
|
81
85
|
'Authorization': config.publishableKey,
|
package/src/version.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export default '4.3.0-beta.
|
|
1
|
+
export default '4.3.0-beta.3';
|