<!--
osgEarth Sample - TFS
-->
<map name="Demo: TFS scripting">

    <TFSFeatures name="buildings-data">	                
        <url>https://readymap.org/readymap/features/tfs/4/</url>
        <format>json</format>
    </TFSFeatures>
    
    <TiledFeatureModel name="buildings" features="buildings-data">
        <styles>                
            <style type="text/css">
                b1 {
                    extrusion-height:  15m;
                    fill:              #ff7f2f;
                    altitude-clamping: terrain;
                }
                b2 {
                    extrusion-height:  30m;
                    fill:              #2f7fff;
                    altitude-clamping: terrain;
                }
                b3 {
                    extrusion-height:  45m;
                    fill:              #ff2f7f;
                    altitude-clamping: terrain;
                }
            </style>

            <selector name="default" style_expr="selectStyle()"/>

            <script language="javascript">
                <![CDATA[
                rotator = 0;
                function selectStyle() {
                    rotator = (rotator+1)%3;
                    if      (rotator==0) return "b1";
                    else if (rotator==1) return "b2";
                    else                 return "b3";
                }
                ]]>
            </script>
        </styles>  
    </TiledFeatureModel>

    <xi:include href="readymap_imagery.xml"/>


    <viewpoints home="0">
        <viewpoint>
            <heading>-12.3715</heading>
            <pitch>-38.216</pitch>
            <range>5000.38m</range>
            <long>-99.16536849045873</long>
            <lat>19.42101714904623</lat>
            <height>0.00265851616859436</height>
            <srs>+proj=longlat +datum=WGS84 +no_defs </srs>
        </viewpoint>
    </viewpoints>

</map>
