- Added a new property that can be massed during the map intialisation called
togglePoisVisibilityControl
. If true, this will enable a new control for switching between pois visibility. POIs can be visualised on the map starting with zoom 14 and it's only available in combination with UNL vectorial tiles: rich
, default
or base
.
var map = new UnlSdk.Map({
...
apiKey: "YOUR-OWN-API-KEY",
vpmId: "YOUR-OWN-VPM-ID",
togglePoisVisibilityControl: true,
...
});
- Added a new map style option: 'rich';
- Allow passing a 'tiles' parameter during sdk initialization. In combination with the
tilesSelectorControl
it allows passing the options available for the map style. If the tiles parameter is not sent, by default, all the map style options will be present: 'rich', 'default', 'satellite', 'terrain', 'traffic', 'base'; Eg.
var map = new UnlSdk.Map({
...
apiKey: "YOUR-OWN-API-KEY",
vpmId: "YOUR-OWN-VPM-ID",
tilesSelectorControl: true,
tiles: ["rich", "default", "satellite"]
...
});
- Override the 'tiles' by the 'style' option. This is allowing developers to pass their own style during the map initialization and so any
tiles
array or tilesSelectionControl
flag will be ignored:
var map = new UnlSdk.Map({
...
apiKey: "YOUR-OWN-API-KEY",
vpmId: "YOUR-OWN-VPM-ID",
style: 'YOUR-OWN-MAP-STYLE"
...
});
- Added a parameter named 'env' for switching between the 'sandbox' and 'prod' apis. The api key and vpm id provided should be generated on the same env. By default, the library is pointing to the prod environment. Eg.
var map = new UnlSdk.Map({
...
apiKey: "YOUR-OWN-API-KEY",
vpmId: "YOUR-OWN-VPM-ID",
env: UnlSdk.Environment.SANDBOX,
...
});
- Fixed the polyfill issue experienced with webpack.
- Added the custom attribution control representing the tiles copyright on the map;
- General bug fixes.