import:
  - ../TOMBaseStyles/TOMPlaceLabels.yaml?a=4

global:
    labels: true
    language: nl
    TOM_multilanguage_label: |
        function() {
            // Use preferred language label if available
            console.log(feature);
            if (global.labels) {
              return (global.language && feature['name:'+global.language]) || feature.name;
            }
        }
scene:
    background:
        color: '#ffffff'

cameras:
    perspective:
        type: perspective
        vanishing_point: [0, -500]

lights:
    light1:
        type: directional
        direction: [.1, .5, -1]
        diffuse: .7
        ambient: .5

settings:
    places:
        - &placelabels                '#5C5C5C'
        - &placelabelscapital         black
        - &highway_link1              [0.00, 0.00, 0.00]
        - &water                      '#383858'

styles:
    buildings:
        base: polygons
        shaders:
            blocks:
                color: |
                    color.rgb *= vec3(min((worldPosition().z*.001 + .5),1.));

layers:
    earth:
        data: { source: mapzen }
        draw:
            polygons:
                order: 0
                color: white

    water:
        data: { source: mapzen }
        draw:
            polygons:
                order: 2
                color: *water

    landuse:
        data: { source: mapzen }
        draw:
            polygons:
                order: 1
                color: white
    places:
        data: { source: mapzen }
        labels:
            draw:
                text:
                    font:
                        fill: *placelabels
            capital:
                draw:
                    text:
                        font:
                            fill: *placelabelscapital
        draw:
            polygons:
                order: 3
                color: '#404040'

    roads:
        data: { source: mapzen }
        filter:
            not: { kind: ferry }
            $zoom:
                min: 14
                max: 20

        draw:
            lines:
                order: 2
                color: '#777'
                width: 5
