Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Search

JMap.Layer.Search

Methods used to search features for a layer.

Index

Functions

Functions

byAttribute

  • JMap.Layer.Search.byAttribute

    Returns features, for a given layer, having attribute value equals to the given value(s).

    throws

    Error if promise fails

    example
    
    // returns all features that have the attribute "E"
    JMap.Layer.Search
      .byAttribute({
         layerId: 99,
         attributeName: "TREE",
         attributeValue: [ "Cherry", "Birch" ] // here an array for multipe values, but could be a single value like a string
      })
      .then(features => console.info(`Total ${features.length} feature(s) found`, features))
      .catch(error => console.error(error))

    Parameters

    Returns Promise<any>

    a promise that will return all the features of the Layer corresponding to the search criteria