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

Wrong version of tilejson on self hosted #41

Open paul-legac opened 6 days ago

paul-legac commented 6 days ago

Hello,

I'm trying to self host openfreemap.

The installation went well with both SKIP_PLANET=true and then SKIP_PLANET=false with no specific error.

But when I try to use it, I see that the displayed version of tilejson is "3.0.0" on my end and is 8 on https://tiles.openfreemap.org/styles/liberty

And it doesn't work.

It look like your json answer is refering to a similar children file tilejson":"3.0.0"

Any idea what I may have missed ?

Here is mine :

{"tilejson":"3.0.0","tiles":["https://kart.itsgoti.me/monaco/20241106_231001_pt/{z}/{x}/{y}.pbf"],"vector_layers":[{"id":"aeroway","fields":{"class":"String"},"minzoom":12,"maxzoom":14},{"id":"boundary","fields":{"admin_level":"Number","disputed":"Number","maritime":"Number"},"minzoom":0,"maxzoom":14},{"id":"building","fields":{"colour":"String","render_height":"Number","render_min_height":"Number"},"minzoom":13,"maxzoom":14},{"id":"housenumber","fields":{"housenumber":"String"},"minzoom":14,"maxzoom":14},{"id":"landcover","fields":{"class":"String","subclass":"String"},"minzoom":13,"maxzoom":14},{"id":"landuse","fields":{"class":"String"},"minzoom":5,"maxzoom":14},{"id":"mountain_peak","fields":{"class":"String","rank":"Number"},"minzoom":13,"maxzoom":14},{"id":"park","fields":{"class":"String","name":"String","name:ar":"String","name:de":"String","name:en":"String","name:eo":"String","name:es":"String","name:eu":"String","name:fa":"String","name:fr":"String","name:it":"String","name:latin":"String","name:zh":"String","name_de":"String","name_en":"String","name_int":"String","rank":"Number"},"minzoom":13,"maxzoom":14},{"id":"place","fields":{"capital":"Number","class":"String","iso_a2":"String","name":"String","name:am":"String","name:ar":"String","name:az":"String","name:be":"String","name:bg":"String","name:bn":"String","name:br":"String","name:bs":"String","name:ca":"String","name:co":"String","name:cs":"String","name:cy":"String","name:da":"String","name:de":"String","name:el":"String","name:en":"String","name:eo":"String","name:es":"String","name:et":"String","name:eu":"String","name:fa":"String","name:fi":"String","name:fr":"String","name:fy":"String","name:ga":"String","name:gd":"String","name:he":"String","name:hi":"String","name:hr":"String","name:hu":"String","name:hy":"String","name:id":"String","name:is":"String","name:it":"String","name:ja":"String","name:ka":"String","name:kk":"String","name:kn":"String","name:ko":"String","name:ku":"String","name:la":"String","name:latin":"String","name:lb":"String","name:lt":"String","name:lv":"String","name:mk":"String","name:ml":"String","name:mt":"String","name:nl":"String","name:oc":"String","name:pa":"String","name:pl":"String","name:pnb":"String","name:pt":"String","name:rm":"String","name:ro":"String","name:ru":"String","name:sk":"String","name:sl":"String","name:sq":"String","name:sr":"String","name:sv":"String","name:ta":"String","name:te":"String","name:th":"String","name:tr":"String","name:uk":"String","name:ur":"String","name:vi":"String","name:zh":"String","name:zh-Hans":"String","name:zh-Hant":"String","name_de":"String","name_en":"String","name_int":"String","rank":"Number"},"minzoom":2,"maxzoom":14},{"id":"poi","fields":{"class":"String","indoor":"Number","layer":"Number","level":"Number","name":"String","name:ar":"String","name:az":"String","name:be":"String","name:bg":"String","name:bn":"String","name:br":"String","name:ca":"String","name:co":"String","name:cs":"String","name:cy":"String","name:da":"String","name:de":"String","name:el":"String","name:en":"String","name:eo":"String","name:es":"String","name:et":"String","name:eu":"String","name:fa":"String","name:fi":"String","name:fr":"String","name:ga":"String","name:he":"String","name:hr":"String","name:hu":"String","name:hy":"String","name:id":"String","name:it":"String","name:ja":"String","name:ka":"String","name:kk":"String","name:ko":"String","name:ku":"String","name:latin":"String","name:lb":"String","name:lt":"String","name:lv":"String","name:mk":"String","name:nl":"String","name:oc":"String","name:pa":"String","name:pl":"String","name:pt":"String","name:rm":"String","name:ro":"String","name:ru":"String","name:sk":"String","name:sl":"String","name:sq":"String","name:sr":"String","name:sv":"String","name:th":"String","name:tr":"String","name:uk":"String","name:vi":"String","name:zh":"String","name_de":"String","name_en":"String","name_int":"String","rank":"Number","subclass":"String"},"minzoom":12,"maxzoom":14},{"id":"transportation","fields":{"access":"String","bicycle":"String","brunnel":"String","class":"String","foot":"String","horse":"String","indoor":"Number","layer":"Number","level":"Number","oneway":"Number","ramp":"Number","service":"String","subclass":"String","surface":"String"},"minzoom":7,"maxzoom":14},{"id":"transportation_name","fields":{"class":"String","indoor":"Number","layer":"Number","level":"Number","name":"String","name:en":"String","name:es":"String","name:fr":"String","name:it":"String","name:latin":"String","name:ru":"String","name_de":"String","name_en":"String","name_int":"String","network":"String","ref":"String","ref_length":"Number","route_1_name":"String","route_1_network":"String","route_1_ref":"String","route_2_name":"String","route_2_network":"String","route_2_ref":"String","subclass":"String"},"minzoom":14,"maxzoom":14},{"id":"water","fields":{"class":"String","id":"Number","intermittent":"Number"},"minzoom":0,"maxzoom":14},{"id":"water_name","fields":{"class":"String","intermittent":"Number","name":"String","name:en":"String","name:fr":"String","name:latin":"String","name_de":"String","name_en":"String","name_int":"String"},"minzoom":13,"maxzoom":14},{"id":"waterway","fields":{"brunnel":"String","class":"String","intermittent":"Number"},"minzoom":4,"maxzoom":14}],"attribution":"<a href=\"https://openfreemap.org\" target=\"_blank\">OpenFreeMap</a> <a href=\"https://www.openmaptiles.org/\" target=\"_blank\">&copy; OpenMapTiles</a> Data from <a href=\"https://www.openstreetmap.org/copyright\" target=\"_blank\">OpenStreetMap</a>","bounds":[7.40921,43.72335,7.44864,43.75169],"center":[7.42892,43.73752,1],"description":"https://openfreemap.org","maxzoom":14,"minzoom":0,"name":"OpenFreeMap","version":"3.15.0"}

Here is yours :

{
  "version": 8,
  "sources": {
    "ne2_shaded": {
      "maxzoom": 6,
      "tileSize": 256,
      "tiles": [
        "https://tiles.openfreemap.org/natural_earth/ne2sr/{z}/{x}/{y}.png"
      ],
      "type": "raster"
    },
    "openmaptiles": {
      "type": "vector",
      "url": "https://tiles.openfreemap.org/planet"
    }
...
hyperknot commented 6 days ago

Those are 2 different files. One is a style JSON, other is the TileJSON. The style JSON is pointing to the TileJSON.

Is anything broken? You need to use https://kart.itsgoti.me/styles/liberty, which will link to https://kart.itsgoti.me/monaco

hyperknot commented 6 days ago

I see https://kart.itsgoti.me/planet is returning 403, is this the error? Was the last command you run the one with SKIP_PLANET=false?

paul-legac commented 5 days ago

Thanks for your answer,

I see https://kart.itsgoti.me/planet is returning 403, is this the error? Was the last command you run the one with SKIP_PLANET=false?

The last command I ran was with SKIP_PLANET=false yes. It finished without error.

https://kart.itsgoti.me/planet returns an 403, while https://kart.itsgoti.me/planet/20241106_001001_pt works

paul-legac commented 5 days ago

I see no configuration in /data/nginx/sites/ofm_le.conf for location /planet

hyperknot commented 5 days ago

I'll try to reproduce your setup today.