Skip to content

Commit 3f75d7b

Browse files
author
German Zargaryan
committed
Fix base path of the dark theme example
Signed-off-by: German Zargaryan <[email protected]>
1 parent 0e3af27 commit 3f75d7b

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

change-style-at-load/demo.js

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,11 @@
55
function setStyle(map){
66
// get the vector provider from the base layer
77
var provider = map.getBaseLayer().getProvider();
8-
// create the style object from the YAML configuration
9-
var style = new H.map.Style('./data/dark.yaml');
8+
// Create the style object from the YAML configuration.
9+
// First argument is the style path and the second is the base URL to use for
10+
// resolving relative URLs in the style like textures, fonts.
11+
// all referenced resources relative to the base path https://js.api.here.com/v3/3.1/styles/omv.
12+
var style = new H.map.Style('./data/dark.yaml', 'https://js.api.here.com/v3/3.1/styles/omv');
1013
// set the style on the existing layer
1114
provider.setStyle(style);
1215
}
@@ -39,4 +42,4 @@ window.addEventListener('resize', () => map.getViewPort().resize());
3942
var behavior = new H.mapevents.Behavior(new H.mapevents.MapEvents(map));
4043

4144
// Now use the map as required...
42-
setStyle(map);
45+
setStyle(map);

0 commit comments

Comments
 (0)