<!--
osgEarth Sample.

Demonstrates the use of a Resource Library in order to apply "typical" textures
to extruded buildings.
-->

<map name="Boston Demo" type="geocentric" version="2">

    <options lighting="true" elevation_tile_size="15">
        <terrain lighting="false"/>
        <cache type="filesystem">
            <path>cache</path>
        </cache>
        <!-- <cache_policy usage="cache_only"/> -->
     </options>

    <image name="osm_mapnik" driver="xyz">
        <url>http://[abc].tile.openstreetmap.org/{z}/{x}/{y}.png</url>
        <profile>spherical-mercator</profile>
    </image>

<!--
    <model name="buildings" driver="feature_geom">
        <features name="buildings" driver="ogr">
            <url>data/boston_buildings_utm19.shp</url>
            <build_spatial_index>true</build_spatial_index>
        </features>
        
        <layout tile_size_factor="52">
            <level name="default" max_range="20000" style="buildings"/>
        </layout>

        <styles>
            <library name="us_resources">
                <url>data/resources/textures_us/catalog.xml</url>
            </library>

            <style type="text/css">
                buildings {
                    extrusion-height:        3.5 * max([story_ht_], 1);
                    extrusion-flatten:       true;
                    extrusion-wall-style:    building-wall;
                    extrusion-wall-gradient: 0.8;
                    extrusion-roof-style:    building-rooftop;
                    altitude-clamping:       terrain;
                    altitude-technique:      map;
                    altitude-binding:        vertex;
                    render-lighting:         false;
                }
                building-wall {
                    skin-library:     us_resources;
                    skin-tags:        building;
                    skin-random-seed: 1;
                    fill:             #ffffff;
                }
                building-rooftop {
                    skin-library:     us_resources;
                    skin-tags:        rooftop;
                    skin-tiled:       true;
                    skin-random-seed: 1;
                    fill:             #ffffff;
                }
            </style>
        </styles>
    </model>
-->

    <external>
        <viewpoints>
            <viewpoint name="Home" heading="-25" height="50" lat="42.355" long="-71.068" pitch="-90" range="480"/>
            <viewpoint name="Bird's eye" heading="24" height="50" lat="42.355" long="-71.068" pitch="-20" range="1000"/>
            <viewpoint name="Overview" heading="24.261" height="0" lat="42.34425" long="-71.076262" pitch="-21.6" range="3450"/>
            <viewpoint name="Downtown 1" heading="117" lat="42.3568" long="-71.0585" height="0" pitch="-20.4" range="1500" />
            <viewpoint name="Downtown 2" heading="-128.5" lat="42.3582" long="-71.0546" height="0" pitch="-19" range="1620" />
            <viewpoint name="Street Level" heading="-193" lat="42.3569" long="-71.07" pitch="0" height="20" range="85"/>
        </viewpoints>
        <sky hours="14.0"/>
    </external>
</map>
