Ignore:
Timestamp:
2019-07-23T16:33:07+12:00 (5 years ago)
Author:
ak19
Message:

2 major changes. 1. Forgot to commit Dr Bainbridge's bugfix for why performProximitySearch() wasn't working for solr collections: the + concatenation signs in the constructed request URL should be spaces which ajax will then convert to + signs. This seems not to have been a problem in lucene, but in solr the + signs end up double encoded or something and the query failed until spaces were used. Unfortunately, with performProximitySearch() now working, searching by facets (unticking and ticking facets) doesn't show up many differences in the map and no longer just displays the search result documents' GPS map information marked up on the map, but that of all nearby documents. 2. With Kathy having now implemented the descendants option, requests for a node's children's mapoverlays has been replaced with requests for descendants' mapoverlays. Tested to work with existing subsection (child) information. 3 Turning off _DEBUGGING_ flag again in map_scripts with performProximitySearch working again. 4. Fixed a minor bug in the debugging function for printing the map bounds, allowing the bounds to be undefined, since that was apparently a possibility. 5. Workaround for when scrool through markers is on, and loopThroughMarkers goes through the doc.shapes array the first time, when it has 3 elements yet they're undefined.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone3/web/interfaces/default/transform/pages/document.xsl

    r33321 r33348  
    844844                <xsl:when test="count(//documentNode) > 0">
    845845                    <xsl:for-each select="//documentNode">
    846                         <xsl:if test="(metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']) or metadataList/metadata[@name = 'Coordinate'] or metadataList/metadata[@name = 'GPS.mapOverlay'] or metadataList/metadata[@name = 'children_GPS.mapOverlay']">
     846                        <xsl:if test="(metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']) or metadataList/metadata[@name = 'Coordinate'] or metadataList/metadata[@name = 'GPS.mapOverlay'] or metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
    847847                            <xsl:text>{</xsl:text>
    848848                            <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text><xsl:value-of select="@nodeID"/><xsl:text disable-output-escaping="yes">",</xsl:text>
     
    874874                            </xsl:if>
    875875                           
    876                             <xsl:if test="metadataList/metadata[@name = 'children_GPS.mapOverlay']">
    877                                 <xsl:variable name="count"><xsl:value-of select="count(metadataList/metadata[@name = 'children_GPS.mapOverlay'])"/></xsl:variable>
     876                            <xsl:if test="metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
     877                                <xsl:variable name="count"><xsl:value-of select="count(metadataList/metadata[@name = 'descendants_GPS.mapOverlay'])"/></xsl:variable>
    878878                                <xsl:text disable-output-escaping="yes">,</xsl:text>
    879                                 <xsl:text disable-output-escaping="yes">"childrenMapoverlays":[</xsl:text>
    880                                 <xsl:for-each select="metadataList/metadata[@name = 'children_GPS.mapOverlay']">
     879                                <xsl:text disable-output-escaping="yes">"descendantsMapoverlays":[</xsl:text>
     880                                <xsl:for-each select="metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
    881881                                    <xsl:value-of disable-output-escaping="yes" select="current()"/>
    882882                                    <xsl:if test="not(position() = $count)">
     
    899899                <xsl:otherwise>
    900900                    <xsl:for-each select="/page/pageResponse/document">
    901                         <xsl:if test="(metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']) or metadataList/metadata[@name = 'Coordinate']  or metadataList/metadata[@name = 'GPS.mapOverlay'] or metadataList/metadata[@name = 'children_GPS.mapOverlay']">
     901                        <xsl:if test="(metadataList/metadata[@name = 'Latitude'] and metadataList/metadata[@name = 'Longitude']) or metadataList/metadata[@name = 'Coordinate']  or metadataList/metadata[@name = 'GPS.mapOverlay'] or metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
    902902                            <xsl:text>{</xsl:text>
    903903                            <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text><xsl:value-of select="@selectedNode"/><xsl:text disable-output-escaping="yes">",</xsl:text>
     
    929929                            </xsl:if>
    930930                           
    931                             <xsl:if test="metadataList/metadata[@name = 'children_GPS.mapOverlay']">
    932                                 <xsl:variable name="count"><xsl:value-of select="count(metadataList/metadata[@name = 'children_GPS.mapOverlay'])"/></xsl:variable>
     931                            <xsl:if test="metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
     932                                <xsl:variable name="count"><xsl:value-of select="count(metadataList/metadata[@name = 'descendants_GPS.mapOverlay'])"/></xsl:variable>
    933933                                <xsl:text disable-output-escaping="yes">,</xsl:text>
    934                                 <xsl:text disable-output-escaping="yes">"childrenMapoverlays":[</xsl:text>
    935                                 <xsl:for-each select="metadataList/metadata[@name = 'children_GPS.mapOverlay']">
     934                                <xsl:text disable-output-escaping="yes">"descendantsMapoverlays":[</xsl:text>
     935                                <xsl:for-each select="metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
    936936                                    <xsl:value-of disable-output-escaping="yes" select="current()"/>                                   
    937937                                    <xsl:if test="not(position() = $count)">
     
    955955        <gsf:metadata name="Coordinate" hidden="true"/>
    956956        <gsf:metadata name="GPS.mapOverlay" hidden="true"/>
    957         <gsf:metadata name="GPS.mapOverlay" select="children" hidden="true"/>
     957        <gsf:metadata name="GPS.mapOverlay" select="descendants" hidden="true"/>
    958958    </xsl:template>
    959959   
Note: See TracChangeset for help on using the changeset viewer.