Project

General

Profile

metacat / lib / spatial / mapbuilder / lib / widget / CursorTrack.xsl @ 3106

1
<?xml version="1.0" encoding="UTF-8"?>
2
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
3

    
4
<!--
5
Description: Output a form for display of the cursor coordinates
6
Author:      Mike Adair
7
Licence:     LGPL as per: http://www.gnu.org/copyleft/lesser.html
8

    
9
$Id$
10
-->
11

    
12
  <xsl:output method="xml" encoding="utf-8"/>
13

    
14
  <!-- The common params set for all widgets -->
15
  <xsl:param name="lang">en</xsl:param>
16
  
17
  <!-- text value params -->
18
  <xsl:param name="longitude">longitude: </xsl:param>
19
  <xsl:param name="latitude">latitude: </xsl:param>
20
  <xsl:param name="xcoord">x:</xsl:param>
21
  <xsl:param name="ycoord">y:</xsl:param>
22
  <xsl:param name="showXY">false</xsl:param>
23
  <xsl:param name="showDMS">false</xsl:param>
24
  <xsl:param name="showMGRS">false</xsl:param>
25
  <xsl:param name="showPx">false</xsl:param>
26
  <xsl:param name="showLatLong">true</xsl:param>
27
  
28
  <!-- The name of the form for coordinate output -->
29
  <xsl:param name="formName"/>
30

    
31
  <!-- Main html -->
32
  <xsl:template match="/">
33
    <div>
34
    <form name="{$formName}" id="{$formName}">
35
      
36
        <xsl:if test="$showXY='true'">
37
          <xsl:value-of select="$xcoord"/> <input name="x" type="text" size="8" readonly="readonly"/>
38
          <xsl:value-of select="$ycoord"/> <input name="y" type="text" size="8" readonly="readonly"/>
39
        </xsl:if>
40
        
41
        <xsl:if test="$showPx='true'">
42
          <xsl:value-of select="$xcoord"/> <input name="px" type="text" size="8" readonly="readonly"/>
43
          <xsl:value-of select="$ycoord"/> <input name="py" type="text" size="8" readonly="readonly"/>
44
        </xsl:if>
45
        
46
        <xsl:if test="$showDMS='true'">
47
          <xsl:value-of select="$latitude"/> 
48
           <input name="latdeg" type="text" size="2" readonly="readonly"/>&#176;
49
           <input name="latmin" type="text" size="2" readonly="readonly"/>&quot;
50
           <input name="latsec" type="text" size="2" readonly="readonly"/>&apos;
51
           <input name="latH" type="text" size="1" readonly="readonly"/>
52
           <br/>
53
          <xsl:value-of select="$longitude"/> 
54
          <input name="longdeg" type="text" size="3" readonly="readonly"/>&#176;
55
          <input name="longmin" type="text" size="2" readonly="readonly"/>&quot;
56
          <input name="longsec" type="text" size="2" readonly="readonly"/>&apos;
57
          <input name="longH" type="text" size="1" readonly="readonly"/>&#8195;
58
         </xsl:if>
59

    
60
        <xsl:if test="$showLatLong='true'">
61
          <xsl:value-of select="$latitude"/> <input name="latitude" type="text" size="8" readonly="readonly"/>
62
          <xsl:value-of select="$longitude"/> <input name="longitude" type="text" size="8" readonly="readonly"/>
63
        </xsl:if>
64
 
65
        <xsl:if test="$showMGRS='true'">
66
          MGRS: <input name="mgrs" type="text" size="14" readonly="readonly"/>
67
        </xsl:if>
68
     
69
    </form>
70
    </div>
71
  </xsl:template>
72

    
73
</xsl:stylesheet>