[Config]
Name = GEO
Summary = Extracts geocodes (latitude/longitude).

[Description]
This metadata module extracts global map locations that have been embedded into feeds
using the <a href="http://www.w3.org/2003/01/geo/#vocabulary" target="_blank">W3C Basic Geo Vocabulary</a>

[Namespaces]
geo = http://www.w3.org/2003/01/geo/wgs84_pos#

[Common Metadata 1]
geo/latitude = geo:lat
geo/longitude = geo:long

; NOTE: The W3C spec indicates that lat/long pairs can be wrapped in a <geo:Point>
; element but no-one seems to be doing it :-)
[Common Metadata 2]
_XPathRoot = geo:Point
_MetadataGroupRoot = geo
latitude = geo:lat
longitude = geo:long

[Item Pane Columns]
_AvailabilityMsg=Available for channels that embed geocodes into their feed items.
Location=({%ITEM-METADATA% geo/latitude},{%ITEM-METADATA% geo/longitude})

[Channel Details Template Block]
{%?CHANNEL-METADATA% geo}
    <div class="mm-geo">
    {%REPEAT% geo}
        <a href="http://www.terraserver-usa.com/GetImageArea.ashx?t=4&s=10&w=800&h=800&lat={%CHANNEL-METADATA% geo/latitude}&lon={%CHANNEL-METADATA% geo/longitude}">
            Map
        </a>
    {%/REPEAT%}
    </div>
{%ENDIF%}

[Item Details Template Block]
{%?ITEM-METADATA% geo}
    <div class="mm-geo">
    {%REPEAT% geo}
        <a href="http://www.terraserver-usa.com/GetImageArea.ashx?t=4&s=10&w=800&h=800&lat={%ITEM-METADATA% geo/latitude}&lon={%ITEM-METADATA% geo/longitude}">
            Map
        </a>
    {%/REPEAT%}
    </div>
{%ENDIF%}

