Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Schools not loading #29

Open
olafveerman opened this issue Mar 18, 2021 · 1 comment
Open

Schools not loading #29

olafveerman opened this issue Mar 18, 2021 · 1 comment
Labels
bug Something isn't working

Comments

@olafveerman
Copy link
Member

What's wrong

When the layer Schools is enabled, nothing shows up on the map. Also no error message in the console, nor any failed tile requests in the network tab.

Troubleshooting

✔️ The tiles themselves are working: https://aep-tiles.staging.derilinx.com/tiles/ke/schools/mapbox.html

✔️ The metadata.json seems ok and in line with the Mapbox config: https://aep-tiles.staging.derilinx.com/tiles/ke/schools/metadata.json

Source:

    "schools": {
      "tiles": [
        "https://aep-tiles.staging.derilinx.com/tiles/ke/schools/{z}/{x}/{y}.pbf"
      ],
      "type": "vector"
    }

Layer:

    {
      "id": "schools",
      "type": "circle",
      "source": "schools",
      "source-layer": "data_layer"
    }

❌ Interestingly enough console.log(theMap.getLayer('schools')) returns this:

filter: (3) ["all", Array(3), Array(3)]
id: "schools"
layout: di {_properties: wi, _values: {…}}
maxzoom: undefined
metadata: {mapbox:group: "a636a5194689e7c1dede11bf3cd8dcac"}
minzoom: undefined
paint: di {_properties: wi, _values: {…}}
source: "composite"
sourceLayer: "landuse"
type: "fill"
visibility: "visible"

My guess is that the layer name clashes with the layer name in the base style. Any thoughts @danielfdsilva ?

@olafveerman olafveerman added the bug Something isn't working label Mar 18, 2021
@danielfdsilva
Copy link
Member

@olafveerman That is correct. The layer and source names cannot match an existing one.
This could be validated in the frontend, but it is perhaps easier to run this through the validator.

Any layer id to be added must not be any one:

background
​landcover_foliage
​national_park
​landcover_snow
​industrial
​schools
​hospitals
​cemeteries
​parks
​pitch
​sand
​water
​waterway-river-canal
​barrier_line-land-polygon
​barrier_line-land-line
​aeroway-polygon
​aeroway-runway
​aeroway-taxiway
​ferries
​road-construction
​road-sidewalks
​road-path
​road-steps
​road-trunk_link
​road-motorway_link
​road-pedestrian
​road-service-link-track
​road-street_limited
​road-street
​road-secondary-tertiary
​road-primary
​road-trunk
​road-motorway
​road-rail
​road-subway
​admin-3-4-boundaries
​wb-boundaries-bg
​wb-boundaries
​wb-boundaries-disputed
​admin-2-boundaries-bg
​admin-2-boundaries
​admin-2-boundaries-dispute
​waterway-label
​water-label
​poi-scalerank1
​airport-label
​ferry-label
​road-label-small
​road-label-medium
​road-label-large
​place-islets-archipelago-aboriginal
​place-neighbourhood
​place-suburb
​place-hamlet
​place-village
​place-town
​place-islands
​place-city-sm
​place-city-md
​place-city-lg
​marine-label-sm-ln
​marine-label-sm-pt
​marine-label-md-ln
​marine-label-md-pt
​marine-label-lg-ln
​marine-label-lg-pt
​state-label-sm
​state-label-md
​state-label-lg
​country-label-sm
​country-label-md
​country-label-lg

Any source id to be added must not be any one:

composite

olafveerman added a commit that referenced this issue Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants