Google Maps API doesn't work in a container

savasy a year ago

Hi,

I deployed traccar (6.4) in a docker container, it works fine except Google Maps.

The same deployment on a VM (non-container) with the same Google Maps API key works well.

What could be the reason(s)?

Thanks

Anton Tananaev a year ago

Have you checked the browser console to see what the errors are?

Turbovix a year ago

Did you happen to not configure the API to only allow use with the VM IP (non-container)?

savasy a year ago

I checked, full of 400 error messages like

DOMException: An attempt was made to use an object that is not, or is no longer, usable

traccar.jpg

savasy a year ago

no restriction on the API key other than limited to Google Maps API

Anton Tananaev a year ago

You're looking at the wrong error. You have to see what the tile server API error is.