Select to view content in your preferred language

Incorrect image path os BasemapToggle widget using ES Modules

422
0
03-01-2021 12:51 PM
RafaelFreitas
Occasional Contributor

Hello! 
Recently I´ve migrated my project to use ES Modules to import arcgis js api. 
My problem is with BasemapToggle widget, it seems to be working correctly but it doesn´t load the images under /assets/esri/images/basemap and display blank divs. (images attached)

My project url which I am using Arcgis maps is:
http://localhost/first/second

Under devTools inspection I´ve noticed that the url generated is: 
           background-image: url("http://localhots/first/assets/esri/images/basemap/hybrid.jpg")

If I change manually to the below, the images load correctly:
           background-image: url("http://localhots/assets/esri/images/basemap/hybrid.jpg")

My assestsPath is: 
config.assetsPath = '/assets';

 

Any help would be appreciated!

Thanks.

0 Kudos
0 Replies