steerpath-smart-sdk
Advanced tools
Comparing version 1.8.0 to 1.9.0
{ | ||
"name": "steerpath-smart-sdk", | ||
"version": "1.8.0", | ||
"version": "1.9.0", | ||
"files": [ | ||
@@ -5,0 +5,0 @@ "steerpath-smart.css", |
@@ -31,4 +31,4 @@ # Steerpath Smart SDK for Web | ||
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | ||
<script src="https://s3-eu-west-1.amazonaws.com/steerpath-web-sdk/releases/smart/1.8.0/steerpath-smart.min.js"></script> | ||
<link href="https://steerpath-web-sdk.s3-eu-west-1.amazonaws.com/releases/smart/1.8.0/steerpath-smart.css" rel="stylesheet"> | ||
<script src="https://s3-eu-west-1.amazonaws.com/steerpath-web-sdk/releases/smart/1.9.0/steerpath-smart.min.js"></script> | ||
<link href="https://steerpath-web-sdk.s3-eu-west-1.amazonaws.com/releases/smart/1.9.0/steerpath-smart.css" rel="stylesheet"> | ||
@@ -74,2 +74,26 @@ <style> | ||
### Version number (1.9.0) | ||
* Allow setting the route network from the client side thus avoiding smart sdk loading it from the server | ||
```javascript | ||
const createSDK = () => { | ||
const smartSDK = new steerpath.SmartSDK() | ||
setLocalRouteData(() => { | ||
clientSmartSDK.start( | ||
apiKey, | ||
config | ||
) | ||
}) | ||
} | ||
createSDK() | ||
const setLocalRouteData = (callback) => { | ||
// localRouteData is the all_routes.json normally downloaded from the server by the SDK | ||
const parsedRouteData = window.steerpath.parseRouteData(localRouteData) | ||
window.steerpath["routes"][apiKey] = parsedRouteData | ||
callback() | ||
} | ||
``` | ||
* Loading circle indicating the route network loading status | ||
### Version number (1.8.0) | ||
@@ -76,0 +100,0 @@ * Add support for setting *initialMapMode* in the config's _smartMap_ object |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
1375885
4150
657