<!--
osgEarth Sample - Annotations
-->
<map name="Scene clamping test">

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

    <DebugImage enabled="false"/>

    <Viewpoints home="0" time="1">
        <viewpoint name="Circles">
            <heading>25.2721</heading>
            <pitch>-24.7961</pitch>
            <range>22653.9m</range>
            <long>-159.6077378781463</long>
            <lat>22.08047563003597</lat>
            <height>1057.80545252189</height>
            <srs>+proj=longlat +ellps=WGS84 +towgs84=0,0,0,0,0,0,0 +no_defs </srs>
        </viewpoint>
    </Viewpoints>

    <annotations name="Annotations: LocalGeometryNode">
    
        <circle name="Circle clamped directly to the ground">
            <position lat="22.074" long="-159.606"/>
            <radius value="1.2" units="km"/>
            <style type="text/css">
                stroke:             #ffffff;
                stroke-width:       2px;
                altitude-binding:   vertex;
                render-depth-offset: 25m;
            </style>
        </circle>
        <label text="WHITE = clamped to ground" lat="22.074" long="-159.5">
            <style>
                text-size: 24;
                text-halo: #000;
            </style>
        </label>
        
        <circle name="Circle clamped with an altitude offset">
            <position lat="22.074" long="-159.606" hat="1000"/>
            <radius value="1.2" units="km"/>
            <style type="text/css">
                stroke:             #ffff00;
                stroke-width:       4px;
                stroke-stipple-pattern: 0xfff8;
                altitude-binding:   vertex;
            </style>
        </circle>
        <label text="YELLOW = clamped relative to ground" lat="22.17" long="-159.606"/>
             
        <circle name="Circle clamped above the ground by its centroid">
            <position lat="22.074" long="-159.606" hat="2000"/>
            <radius value="1.2" units="km"/>
            <style type="text/css">
                stroke:             #00ffff;
                stroke-width:       2px;
                altitude-binding:   centroid;
            </style>
        </circle>
        <label text="CYAN = clamped relative to ground by centroid" lat="22.074" long="-159.7"/>
                
        <local_geometry name="Local Geometry tessellated and clamped">
            <geometry>
                LINESTRING(0 0, 25000 0, 25000 25000, 0 25000, 0 0);
            </geometry>
            <position lat="22.078" long="-159.602"/>
            <style type="text/css">
                stroke:          #ff00ff;
                stroke-width:    3px;
                stroke-tessellation-size: 500m;
                altitude-binding:    vertex;
                render-depth-offset: 25m;
            </style>
        </local_geometry>
    </annotations>
    
    <annotations name="Annotations: FeatureNode">    
        <feature name="Feature clamped to ground">
            <srs>wgs84</srs>
            <geometry>
                LINESTRING(-159.606 22.074, -159.606 22.5)
            </geometry>
            <style type="text/css">
                stroke:              #ffffff;
                stroke-width:        3;
                stroke-tessellation-size: 500m;
                altitude-clamping:   terrain;
                altitude-technique:  scene;
                render-depth-offset: 25m;
            </style>
        </feature>
        
        <feature name="Feature clamped relative to ground">
            <srs>wgs84</srs>
            <geometry>
                LINESTRING(-159.606 22.074 1000, -159.606 22.5 1000)
            </geometry>
            <style type="text/css">
                stroke:              #ffff00;
                stroke-width:        3;
                stroke-tessellation-size: 500m;
                altitude-clamping:   relative;
                altitude-technique:  scene;
                render-depth-offset: 25m;
            </style>
        </feature>
    </annotations>

    <annotations name="Annotations: Extrusion">    
        <circle name="Circle clamped and extruded">
            <position lat="21.974" long="-159.606"/>
            <radius value="1.2" units="km"/>
            <style type="text/css">
                fill:               #8f4f107f;
                stroke:             #ffff00;
                stroke-width:       1px;
                altitude-technique: scene;
                altitude-binding:   vertex;
                extrusion-height:   500;
            </style>
        </circle>
    </annotations>
    
    <annotations name="PlaceNode">              
        <place name="Placemark" text="Placemark">
            <position lat="22.074" long="-159.606"/>
            <icon>../data/placemark32.png</icon>
            <style type="text/css">
                text-declutter: true;
                text-halo:      #777;
            </style>
        </place>
    </annotations>
</map>
