File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed
Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 55function 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());
3942var behavior = new H . mapevents . Behavior ( new H . mapevents . MapEvents ( map ) ) ;
4043
4144// Now use the map as required...
42- setStyle ( map ) ;
45+ setStyle ( map ) ;
You can’t perform that action at this time.
0 commit comments