hyperknot / openfreemap

Free and open-source map hosting solution with custom styles for websites and apps, using OpenStreetMap data
https://openfreemap.org/
Other
2.86k stars 58 forks source link

After running self host script styles still point to tiles.openfreemap.org #28

Open Feryla opened 1 month ago

Feryla commented 1 month ago

I ran the self host script and set style in maplibre to /styles/bright. This fetches the style from my domain, but the style.json still links to tiles.openfreemap.org for all other resources. After replacing all instances of tiles.openfreemap.org with my domain in the style.json it works as expected.

hyperknot commented 1 month ago

Hi, thank you for the report. The string "tiles.openfreemap.org" is literally not present in the code part of the repo. Are you sure you didn't fill out DOMAIN_LE=tiles.openfreemap.org in your .config file?

Feryla commented 1 month ago

DOMAIN_LE is set to my domain. From what I can tell the styles that are downloaded from assets.openfreemap.com contain references to tiles.openfreemap.org. I guess the style assets need to be post processed after download to point to the correct domain.

hyperknot commented 1 month ago

You are very right, the default style is indeed hardcoded! Good catch! I'll need to calculate it on-the-fly.

Also, congratulations for being the first person who tried self-hosting, I'm happy it works and just this bug needs to be fixed.