GIS Cloud filters are used to to filter data in a map and attribute table based on features attributes. It is possible to set filters for multiple layers withing the same map. It is also possible to set filters for more maps within the custom app. Filters are available only for custom apps.

Add filters to a custom app

    1. Open https://manager.giscloud.com/ and login with your GIS Cloud credentials .
    2. Go under the Apps tab and click Edit button.

filter

 

    1. Go under the Advanced tab and click Create/Open app folder.

filter2

 

  1. Create a new app.json file or open the existing one.
  2. If a new app.json file is created, paste this code:
  3. {
    "responsive": true,
    "scripts": {
    "setup": []
    },
    "sections": {
    "top": {
    "menu": {
    "items": [{
    "label_i18n": "Filters",
    "href": "javascript:;",
    "onclick": "giscloud.app.panels[0].toggle();"
    }, {
    "label_i18n": "Filter builder",
    "href": "javascript:;",
    "adminCheck": true,
    "onclick": "new giscloud.ui.FilterBuilderManager()"
    }]
    }
    }
    }
    }

    If you already have the app.json file set with some custom buttons, paste only code below. It should be in the 9th row, between “items”: [ and {

    {
    "label_i18n": "Filters",
    "href": "javascript:;",
    "onclick": "giscloud.app.panels[0].toggle();"
    },
    {
    "label_i18n": "Filter builder",
    "href": "javascript:;",
    "adminCheck": true,
    "onclick": "new giscloud.ui.FilterBuilderManager()"
    },

    Capture1

  4. Click Save&Close
  5. Refresh Map Portal and it should have two additional buttons: Filters and Filter Builder.

Note: only app owner can see Filter builder button after login.

ui

Adding filters

Here you can find instructions on how to add filters. After clicking the Filter builder button on the Map preview ribbon:

  1. Open Filter builder button.
  2. Choose the layer.
  3. Select filter type.
  4. Select layer column.
  5. Add the label which will be displayed and additional options.
  6. Click Apply.
  7. Click Save&Close.
  8. Click Filters button to view filters.

List of available filters

  1. Input filter – search exact value within selected column. This filter is case sensitive.
  2.  

    input filter

     

  3. Autocomplete filter – populates entered values. Display only relevant values – if some other filter is applied, this option filters values from already filtered rows.
  4.  

    autocomplete filter

     

  5. Min/Max filter – filter for numbers. Searches features between minimum value and value written in the box. This filter works only with Integer and Real column type. Autofetch option automatically calculates minimum and maximum value.
  6.  

    minmax

     

  7. Range filter – filters values in range between min and max value. Step value option defines difference value between two classes. Autofetch option automatically calculates minimum and maximum value.
  8.  

    range

     

  9. Dropdown filter – values can be selected from drop down menu. When Multiselect option is checked, it is possible to select more values from the dropdown list. You can manually add values in drop down list or check Autofetch to automatically add all values within a column in this filter.
  10.  

    dropdown

     

  11. Date filter – searches features based on Date and time. This feature works only for Timestamp column type. You can choose between Before and After operators. Before operator filters dates before selected date and after filters dates after the date selected in filter.
  12.  

    date

     

  13. Slider filter – features can be filtered using slider. Step value option defines difference value between two classes.
  14.  

    slider

     

  15. Features number filter – shows number of selected features.
  16.  

    results