Spectrum Spatial (SSA/LIM)

Expand all | Collapse all

Convert v12 Infotemplate to v2018 and then v2019

  • 1.  Convert v12 Infotemplate to v2018 and then v2019

    Posted 8 days ago
    Edited by George Corea 8 days ago
      |   view attached
    I had a infotemplate in v12 that used to filter the columns to display and didn't show any that had a value of 'F'. How can I do the same in v2018?

    in v12
    <!--//use below for custom template impln-->
    <!--<ul data-ng-repeat="(key, prop) in feature.allOthers">
    <li ng-show="key.toUpperCase() !== 'STRATUSID'"><strong>{{key}}</strong>: {{prop}}</li>
    </ul>-->
    <!-- Display all the columns except the key column MI_PRINX --><ul>
    <div ng-repeat="columnname in notSorted(feature.featureAttributes) | filter : '!stratusid'" ng-if="feature[columnname].value != '' && feature[columnname].value != 'F'";>
    <strong>{{feature[columnname].name}}: </strong><span>{{feature[columnname].value}}</span>
    </div>

    I have attached the infotemplate that is created in v2018 as in the past I have been able to change the .html created in v2018 to what used in v12 by doing the following

    so if I had the following in v12
    <b><a href="http://globe.information.qld.gov.au/cgi-bin/SmartMapgen.py?q={{feature.Lot_num.value}}\{{feature.Plan_num.value}}" target="_blank">Open SMIS Map</b>

    In v2018 I changed this to
    <b><a href="http://globe.information.qld.gov.au/cgi-bin/SmartMapgen.py?q={{data.feature.Lot_num.value}}" target="_blank">Open SMIS Map</a></b>

    so... {feature} becomes {data.feature} but this didn't work.

    As there are a lot of fields I don't want to have to specify each column .

    Template_Planning_Layer_Summary_v12.html is the version that used to work
    ParcelLayers.* - are the files just created in v2018 and shows all the column names.

    ------------------------------
    George Corea
    Mangoesmapping
    ------------------------------

    Attachment(s)

    zip
    ParcelLayers.html.zip   4K 1 version


  • 2.  RE: Convert v12 Infotemplate to v2018 and then v2019

    Posted 4 days ago
    Hi George,

    There is a checkbox in Template Designer to hide fields with NULL Values, it adds this component "isHideNull": true against each attribute listed in the TS & JSON files.

    You can probably tackle this with Notepad++ and a careful Find&Replace.

    Cheers,

    Will

    ------------------------------
    William Dean
    Cairns Regional Council
    ------------------------------



  • 3.  RE: Convert v12 Infotemplate to v2018 and then v2019

    Posted 4 hours ago
    Thanks Will - the issue is that the field is not null -it has a 'F' in it. I can replace all the 'F' values with null in the .tab file but there should be a way of dealing with this in code.

    The key is in changing
    <div ng-repeat="columnname in notSorted(feature.featureAttributes) | filter : '!stratusid'" ng-if="feature[columnname].value != '' && feature[columnname].value != 'F'";>

    In the 2018/19 versions of SSA feature. becomes data.feature.

    But there must be a difference in the way the columns are called as now as in the html it's
    <pb-info-column [columnConfig]="Row_IDConfig" [feature]="data.feature" class="multilabelrow col-xs-12 default-topbtm-padding">
    </pb-info-column>

    As per https://docs.angularjs.org/api/ng/directive/ngRepeat the ng-repeat needs whatever columnnameis now called.

    ------------------------------
    George Corea
    Mangoesmapping
    ------------------------------