openstreetmaprasterqgisopenmaptilestileserver-gl

How do I show custom marker in openmaptiles?


I have two data sources in my config.json

"data": {
"openmaptiles": {
  "mbtiles": "tiles.mbtiles"
},
"starbucks": {
  "mbtiles": "starbucks.mbtiles"
}

Where mbtiles is my extracted region and starbucks is a point extracted with QGIS into GeoJson and then converted into mbtiles using tippecanoe. My problem is that when i preview my map in openmaptiles via Data Preview, I can see that the point is indeed there however when I turn data preview off, I can no longer see it because I'm doing something wrong in my styles.json. enter image description here enter image description here My current style.json for the respective point is the following...

   {
  "id": "undefined",
  "type": "symbol",
  "source": "starbucks",
  "source-layer": "place",
  "layout": {
    "icon-image": "park_11",
    "icon-size": 1,
    "visibility": "visible"
  }
},

I believe my problem lays in how I'm styling this point, however there is no documentation so I've been trying to copy other marker's and their sprites.


Solution

  • Turns out the answer was there all along, although I couldn't find documentation on it. The rendering problem (or rather the displaying problem) was indeed due to the source layer. Long story short, the source layer needs to be starbucks_icon — basically, whatever the layer is called in QGIS or, in this case, whatever follows the # sign (if using tileserver gl).