POI Layer Fails to display. CORS policy Blocking traccar

ChildApple 4 years ago

I treid with my own KML file and it didnt work so i used the test.kml file from github and it also didnt work.

when checking the console when the file is added in the server settings i get this 2 errors, when the file location is removed the errors go away.

Access to image at 'https://www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png' from origin 'http://██████████████:8082' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource.
www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png:1     

GET https://www.gstatic.com/mapspro/images/stock/503-wht-blank_maps.png net::ERR_FAILED 200

I have no clue what is happening or if perhaps its a bug?

any help would be greatly appreciated.

Anton Tananaev 4 years ago

Have you configured the CORS policy? Please provide details.

ChildApple 4 years ago

I looked at the docs but couldn't find anything about cors.

I did add <entry key='web.origin'>*</entry> to the traccar.xml file.

Truly don't know where I need to configure it. Anything pointing to the right direction would be greatly appreciated.

Anton Tananaev 4 years ago

You can try to use local images if you don't want to worry about cors.

ChildApple 4 years ago

Where should I change that? The app.js file? Or do I need to mess with more advanced stuff? Really really appreciate your help. Thanks.

Anton Tananaev 4 years ago

You change it in the KML file.