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: '#353535'

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

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

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: '#555'

    water:
        data: { source: mapzen }
        draw:
            polygons:
                order: 2
                color: '#353535'

    landuse:
        data: { source: mapzen }
        draw:
            polygons:
                order: 1
                color: '#666'

    places:
        data: { source: mapzen }
        labels:
            filter:
                name: true
                kind: [locality]
                $zoom:
                    min: 7
                    max: 14
            draw:
                text:
                    priority: 4
                    text_source: global.TOM_multilanguage_label
                    font:
                        fill: #fff
                        family: Helvetica
                        size: 18px
            capital:
                filter:
                    country_capital: true
                    $zoom:
                        min: 7
                        max: 9
                draw:
                    text:
                        font:
                            fill: #330000
                            size: 25px

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

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