<!--
osgEarth Sample - Annotations
-->
<map name="Annotations Demo">

    <options>
        <overlay_blending_source>alpha</overlay_blending_source>
    </options>

    <GDALImage name="imagery" url="../data/world.tif"/>

    <viewpoints>
        <viewpoint name="Annotation Samples"
                   lat="33" long="-118" range="500000"
                   heading="35.27" pitch="-35" />
    </viewpoints>

    <Annotations name="Annotations Group A">

        <label text="Label">
            <position lat="34" long="-120" />
            <style type="text/css">
                text-align:     center_center;
                text-size:      20;
                text-declutter: true;
                text-halo:      #777;
                text-bbox-fill: #00FF0033;
                text-bbox-margin: 3;
                text-bbox-border: #FFFFFFFF;
                text-bbox-border-width: 1;
            </style>
        </label>

        <label text="Label with offsets">
            <position lat="16" long="-120" />
            <style type="text/css">
                text-align:     center_center;
                text-size:      20;
                text-declutter: true;
                text-halo:      #777;
                text-offset-x:  28;
                text-offset-y:  -100;
                text-bbox-fill: #00FF0033;
                text-bbox-margin: 3;
                text-bbox-border: #FFFFFFFF;
                text-bbox-border-width: 1;
            </style>
        </label>

        <place text="Place">
            <position lat="35" long="-110"/>
            <icon>../data/placemark32.png</icon>
            <style type="text/css">
                text-declutter: true;
                text-halo:      #777;
            </style>
        </place>

        <place text="Extruded Place">
            <position lat="35" long="-105" alt="5000"/>
            <icon>../data/placemark32.png</icon>
            <style type="text/css">
                text-declutter: true;
                text-halo:      #777;
            </style>
        </place>

        <circle name="draped circle">
            <position lat="34.051" long="-117.974"/>
            <radius>50km</radius>
            <style type="text/css">
                fill:               #ffff0080;
                stroke:             #ffffff;
                stroke-width:       2px;
                altitude-clamping:  terrain-drape;
            </style>
        </circle>
        <label text="Draped circle" lat="34.051" long="-117.974"/>

        <circle name="scene-clamped circle">
            <position lat="22.074" long="-159.606"/>
            <radius>1.2km</radius>
            <style type="text/css">
                stroke:             #ffffff;
                stroke-width:       2px;
                altitude-clamping:  terrain-scene;
                altitude-binding:   vertex;
                render-depth-offset-auto: true;
            </style>
        </circle>
        <label text="scene-clamped circle" lat="22.074" long="-159.606"/>

        <ellipse name="ellipse relative">
            <position lat="40" long="-100" hat="5000"/>
            <radius_major>50km</radius_major>
            <radius_minor>40km</radius_minor>
            <style type="text/css">
                fill: #ff00ff7f;
                stroke: #ffffff;
            </style>
        </ellipse>
        <label text="HAT Ellipse" lat="40" long="-100.0"/>
    </Annotations>

    <Annotations name="Annotations Group B">

        <ellipse name="ellipse extruded">
            <position lat="32" long="-100.0"/>
            <radius_major>50km</radius_major>
            <radius_minor>20km</radius_minor>
            <style type="text/css">
                fill:             #ff7f007f;
                stroke:           #ff0000ff;
                extrusion-height: 5000;
            </style>
        </ellipse>
        <label text="Extruded Ellipse" lat="32" long="-100.0"/>

        <feature name="Extruded Line">
            <srs>wgs84</srs>
            <geometry>
                LINESTRING(-80.37 34.039, -80.09 33.96, -79.75 34, -79.43 33.37, -79.48 32.88)
            </geometry>
            <style type="text/css">
                fill:                #ff00ff7f;
                stroke:              #ffff00;
                stroke-width:        3;
                stroke-crease-angle: 45.0;
                extrusion-height:    30000;
                render-lighting:     true;
            </style>
        </feature>
        <label text="Extruded Line" lat="32" long="-80"/>

        <feature name="GPU-Clamped Line">
            <srs>wgs84</srs>
            <geometry>
                LINESTRING(-110 47, -110 43, -120 43, -120 42)
            </geometry>
            <style type="text/css">
                stroke:              #ff3000;
                stroke-width:        3;
                stroke-tessellation-size: 1km;
                altitude-clamping:   terrain-gpu;
                render-depth-offset: true;
            </style>
        </feature>
        <label text="GPU-Clamped Line" lat="44" long="-115">
            <style type="text/css">
                text-align:             center_center;
                text-geographic-course: 45.0;
                text-bbox-fill: #FFFF0033;
                text-bbox-margin: 8;
                text-bbox-border: #FFFF00;
                text-bbox-border-width: 0.5;
            </style>
        </label>

        <feature name="Draped Polygon">
            <srs>wgs84</srs>
            <geometry>
                POLYGON((-100 47, -100 49, -95 48, -96 45, -98 42))
            </geometry>
            <style type="text/css">
                fill:     #ffff007f;
                stroke:   #ffffff;
                stroke-width: 2px;
                altitude-clamping: terrain-drape;
            </style>
        </feature>
        <label text="Draped Polygon" lat="45" long="-98"/>

        <model name="Auto-Scaled Model">
            <position lat="43" long="-100"/>
            <style>
                model:       "../data/red_flag.osg.45.scale";
                model-scale: auto;
            </style>
        </model>
        <label text="Auto-Scaled Model" lat="42.5" long="-100"/>

        <imageoverlay>
            <url>../data/fractal.png</url>
            <alpha>1.0</alpha>
            <geometry>POLYGON((-81 26, -80.5 26, -80.5 26.5, -81 26.5))</geometry>
        </imageoverlay>
        <label text="ImageOverlay" lat="26" long="-81"/>

        <imageoverlay>
            <url>../data/fractal.png</url>
            <alpha>0.75</alpha>
            <geometry>POLYGON((-81 28, -80.5 28, -80.5 28.5, -81 28.5))</geometry>
        </imageoverlay>
        <label text="ImageOverlay(alpha)" lat="28" long="-81"/>

        <local_geometry name="3D geometry">
            <geometry>
                POLYGON((0 0 0, -25000 0 45000, 0 0 75000, 25000 0 45000))
            </geometry>
            <position lat="33.4" long="-116.6"/>
            <style type="text/css">
                fill:            #00ff00;
                stroke:          #ffff00;
                stroke-width:    2px;
                render-lighting: false;
            </style>
            <horizon_culling>true</horizon_culling>
        </local_geometry>
        <label text="3D Geometry" lat="33.4" long="-116.6"/>

        <feature name="Long Line">
            <srs>wgs84</srs>
            <geometry>
                LINESTRING(10 0, 10 65)
            </geometry>
            <style type="text/css">
                stroke: #ffff00;
                stroke-width: 3;
                stroke-tessellation-size: 1km;
                altitude-offset: 10000;
                render-lighting: false;
                render-depth-offset: true;
            </style>
        </feature>

        <label text="Tessellated line" lat="35" long="10">
            <style type="text/css">
                text-align:              center_bottom;
                text-geographic-course:  0;
            </style>
        </label>

        <feature name="Antimeridian polygon">
            <srs>wgs84</srs>
            <geometry>
                POLYGON((-160 -30 0, 150 -20 0, 160 -45 0, -150 -40 0))
            </geometry>
            <style type="text/css">
                stroke: #00ff00;
                stroke-width: 3;
                stroke-tessellation-size: 100km;
            </style>
        </feature>
        <label text="Antimeridian polygon" lat="-30" long="-180"/>

		<feature name="Vertical Polygon">
			<srs>wgs84</srs>
			<geometry>
				POLYGON((
					123.4903 41.6061 195,
					123.4906 41.6056 195,
					123.4906 41.6056 390,
					123.4903 41.6061 390
				))
			</geometry>
			<style>
                fill: #ff0000;
                stroke: #00ff00;
                stroke-width: 2px;
			</style>
		</feature>
        <label text="Vertical Polygon" lat="41.606" long="123.49045"/>

    </Annotations>
</map>
