Tutorial

Tutorial - Filter API

Mapapps

IDs of object in current map extent

To verify the feature example on the map, activate the referenced value in "Karteninhalt".

Filter API reference

Read more detailed information in the referenced API documentation:

Filter API reference
IDs of object in current map extent
Current map extent

Consider some additional informations:

Pass an empty array [] to reset passed filters.


Be aware of a different query syntax, depending on your requested layer:

For filtering on the cluster layer, use the 'field' / 'values' syntax, like you see it in the examples.

For filtering on the feature layer, use the ArcGis SQL syntax.

To use the function as seen in the example, use following code:

    function postEvent(functionName, detail) {
        const integrationElement = document.getElementById('mapIntegrationElement').contentWindow
        if(integrationElement){
            integrationElement.postMessage({functionName: functionName, detail: detail}, "*")
        }
    }
    [...]
    // Query for cluster
    const parameter_query = {
            [
                {
                    "field": "Name",
                    "values": [
                        "Stadt Chemnitz",
                        "Landratsamt Bautzen"
                    ]
                }
            ]
    }
     // Query for features
    const parameter_feature = {
    	"layerId": "standorte_uVb",
	    "query": "Name like '%Dresden%' or Name like '%Chemnitz%' ",
	    "attribute": "OBJECTID"
    }

    postEvent("filterObjects",parameter_query )
    postEvent("filterObjects",parameter_feature )