Show
Ignore:
Timestamp:
06.06.2019 20:53:13 (6 months ago)
Author:
wy59
Message:

Improvements to Coordinate support AND bugfixes. BUT not all the fixes may be ideal, many marked with TODO. 1. Now we support an Array of coordinates. At present these are only displayed as Markers, but in future shapes should appear as shapes. 2. Bugfixes include: (a) expanding sections wasn't working when we had hierarchical docs with Coordinate data, because map-scripts 'overrode' the toggleSection function but no longer did any of the doc expanding behaviour that document_scripts.js used to do. This was not a problem with the ImagesGPS collection, simply because that did not have hierarchical/sectionalised documents. (b) Perl: A previous commit output duplicate Coordinates into the index. Now this doesn't happen. Fix works but may not be ideal. 3. Perl: (a) Reserved index names CD, CS for Coordinate and CoordShort?. Note however that LAT and LNG were never added to reserve list for index names. (b) Now doc.pm::processCoord() takes a section parameter and works out the section-ptr from that.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/map-tools.xsl

    r33126 r33128  
    3939      <xsl:if test="metadataList/metadata[@name = 'Coordinate']"> 
    4040        <xsl:text disable-output-escaping="yes">,</xsl:text> 
    41         <xsl:text disable-output-escaping="yes">"coord":"</xsl:text>         
    42         <xsl:value-of disable-output-escaping="yes" select="metadataList/metadata[@name = 'Coordinate']"/> 
    43         <xsl:text disable-output-escaping="yes">"</xsl:text> 
     41        <xsl:text disable-output-escaping="yes">"coords":</xsl:text> 
     42        <xsl:text>[</xsl:text> 
     43        <xsl:for-each select="metadataList/metadata[@name = 'Coordinate']"> 
     44            <xsl:text disable-output-escaping="yes">"</xsl:text> 
     45            <xsl:value-of disable-output-escaping="yes" select="current()"/> 
     46            <xsl:text disable-output-escaping="yes">"</xsl:text> 
     47            <xsl:text disable-output-escaping="yes">,</xsl:text> 
     48        </xsl:for-each> 
     49        <xsl:text>]</xsl:text> 
    4450      </xsl:if> 
    4551      <xsl:text>}</xsl:text>