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/map-tools.xsl

    r33317 r33348  
    2121      <xsl:text>[</xsl:text>
    2222      <xsl:for-each select="//documentNode">
    23     <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']">
     23    <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']">
    2424      <xsl:text>{</xsl:text>
    2525      <xsl:text disable-output-escaping="yes">"nodeID":"</xsl:text>
     
    5757      </xsl:if>
    5858     
    59       <xsl:if test="metadataList/metadata[@name = 'children_GPS.mapOverlay']">
    60         <xsl:variable name="count"><xsl:value-of select="count(metadataList/metadata[@name = 'children_GPS.mapOverlay'])"/></xsl:variable>
     59      <xsl:if test="metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
     60        <xsl:variable name="count"><xsl:value-of select="count(metadataList/metadata[@name = 'descendants_GPS.mapOverlay'])"/></xsl:variable>
    6161        <xsl:text disable-output-escaping="yes">,</xsl:text>
    62         <xsl:text disable-output-escaping="yes">"childrenMapoverlays":[</xsl:text>
    63         <xsl:for-each select="metadataList/metadata[@name = 'children_GPS.mapOverlay']">
     62        <xsl:text disable-output-escaping="yes">"descendantsMapoverlays":[</xsl:text>
     63        <xsl:for-each select="metadataList/metadata[@name = 'descendants_GPS.mapOverlay']">
    6464            <xsl:value-of disable-output-escaping="yes" select="current()"/>
    6565            <xsl:if test="not(position() = $count)">
     
    8484    <gsf:metadata name="Coordinate" hidden="true"/>
    8585    <gsf:metadata name="GPS.mapOverlay" hidden="true"/>
    86     <gsf:metadata name="GPS.mapOverlay" select="children" hidden="true"/>
     86    <gsf:metadata name="GPS.mapOverlay" select="descendants" hidden="true"/>
    8787<!--  these were included in version in query. don't think we need them...
    8888    <gsf:metadata name="Image" hidden="true"/>
Note: See TracChangeset for help on using the changeset viewer.