openmaptiles / osm-bright-gl-style

OSM Bright GL Style using OpenMapTiles
https://openmaptiles.github.io/osm-bright-gl-style/
Other
188 stars 120 forks source link

Use geojson file as multiple sources causes error in vector mode #2

Closed JINCHUNGEUN closed 7 years ago

JINCHUNGEUN commented 7 years ago

i edited the style in the Maputnik. In the website editor i add new sources,the source type is geojson and data is from remote url..when i finished editing the style,i exported the style json file.. before running the tileserver-gl docker , i only modified the sources of openmaptiles url to local url. and run .but error occurs when i open in vector mode part of style json file is as below

 "sources": {
    "openmaptiles": {
      "type": "vector",
      "url": "mbtiles://{v3}"
    },
    "places": {
      "type": "geojson",
      "data": "https://d2ad6b4ur7yvpq.cloudfront.net/naturalearth-3.3.0/ne_50m_populated_places_simple.geojson"
    }
  },
  "glyphs": "{fontstack}/{range}.pbf",

ERROR:

GET /styles/ckstyle.json 500 10.040 ms - 890
TypeError: Cannot read property 'replace' of undefined
    at fixUrl (/usr/src/app/src/serve_style.js:74:17)
    at /usr/src/app/src/serve_style.js:81:20
    at Array.forEach (native)
    at /usr/src/app/src/serve_style.js:79:37
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at next (/usr/src/app/node_modules/express/lib/router/route.js:131:13)
    at Route.dispatch (/usr/src/app/node_modules/express/lib/router/route.js:112:3)
    at Layer.handle [as handle_request] (/usr/src/app/node_modules/express/lib/router/layer.js:95:5)
    at /usr/src/app/node_modules/express/lib/router/index.js:277:22
    at Function.process_params (/usr/src/app/node_modules/express/lib/router/index.js:330:12)
klokan commented 7 years ago

Duplicate ticket to https://github.com/klokantech/tileserver-gl/issues/108

This error is produced by TileServerGL, it is not related to this GL style. Closing.