Options
All
  • Public
  • Public/Protected
  • All
Menu

Module Selection

JMap.Application.Selection

You can manage the application selection tools here.

Index

Functions

activateSelectionType

  • JMap.Application.Selection.activateSelectionType

    Changes the current type of selection

    example
    
    // change the selection type to rectangle
    JMap.Application.Selection.activateSelectionType("rectangle")

    Parameters

    Returns void

clearSelection

  • clearSelection(): void
  • JMap.Application.Selection.clearSelection

    Clears the current selection

    example
    // Clear the current selection
    JMap.Application.Selection.clearSelection()

    Returns void

clearSelectionForLayer

  • clearSelectionForLayer(layerId: JId): void
  • JMap.Application.Selection.clearSelectionForLayer

    Unselects all features for a given layer id.

    example
    
    // clear the layer id=2 selection
    JMap.Application.Selection.clearSelectionForLayer(2)

    Parameters

    • layerId: JId

      the JMap layer id

    Returns void

closeTableTab

  • closeTableTab(): void
  • JMap.Application.Selection.closeTableTab

    Closes the selection table tab.

    If the table is not visible, or not opened in another tab, do nothing.

    If the table is opened in another tab, close the tab and display the table over the map.

    example
    
    // closes the selection table tab.
    JMap.Application.Selection.closeTableTab()

    Returns void

exportAsExcelFile

  • exportAsExcelFile(): void
  • JMap.Application.Selection.exportAsExcelFile

    Exports the current selection as an excel file.

    If no selection, export an empty file.

    example
    // download the current selection as an excel file
    JMap.Application.Selection.exportAsExcelFile()

    Returns void

fitMapToDisplayLayerSelection

  • JMap.Application.Selection.fitMapToDisplayLayerSelection

    Pans and zooms the map to display the current selection.

    example
    // fit the map to display selected features
    JMap.Application.Selection.fitMapToDisplayLayerSelection()

    Parameters

    Returns void

getActiveSelectionType

  • JMap.Application.Selection.getActiveSelectionType

    Returns the current active type of selection

    example
    
    // return the current active selection type
    JMap.Application.Selection.getActiveSelectionType()

    Returns JAPP_SELECTION_TYPES

getDisplayedLayerId

  • getDisplayedLayerId(): JId
  • JMap.Application.Selection.getDisplayedLayerId

    The selection of only one layer can be diplayed at a time.

    This function returns the id of the layer for which the selection is displayed.

    example
    
    // return the layer id of the displayed selection
    JMap.Application.Selection.getDisplayedLayerId()

    Returns JId

getTableVisibility

  • getTableVisibility(): boolean
  • JMap.Application.Selection.getTableVisibility

    Returns true if the selection data table is diaplayed.

    example
    
    // return true if the selection data table is visible
    JMap.Application.Selection.getTableVisibility()

    Returns boolean

isTableDisplayedInTab

  • isTableDisplayedInTab(): boolean
  • JMap.Application.Selection.isTableDisplayedInTab

    Returns true if the selection table is displayed in an external browser tab.

    example
    
    // returns true if the selection table is displayed in an external browser tab.
    JMap.Application.Selection.isTableDisplayedInTab()

    Returns boolean

openTableInTab

  • openTableInTab(): void
  • JMap.Application.Selection.openTableInTab

    Displays the selection table in another tab.

    If the table is not visible, make it visible.

    example
    
    // displays the selection table in another tab.
    JMap.Application.Selection.openTableInTab()

    Returns void

selectFromFeature

  • JMap.Application.Selection.selectFromFeature

    Selects features on the map that intersect the given feature.

    example
    // will select all features that intersect the provided line feature
    JMap.Application.Selection.selectFromFeature(lineFeature)

    Parameters

    • feature: Feature

      the given feature

    • selectionType: JAPP_SELECTION_TYPES

      if not provided the method use

    Returns void

setDisplayedLayerId

  • setDisplayedLayerId(layerId: JId): void
  • JMap.Application.Selection.setDisplayedLayerId

    Displays the selection of the layer.

    If layer selection has no selection, hides the layer selection list.

    throws

    if layer not found for the given layer id

    example
    
    // display the layer id=2 selection
    JMap.Application.Selection.setDisplayedLayerId(2)

    Parameters

    Returns void

setTableVisibility

  • setTableVisibility(tableVisibility: boolean): void
  • JMap.Application.Selection.getTableVisibility

    Hides or shows the selection data table.

    example
    
    // make selection data table visible
    JMap.Application.Selection.setTableVisibility(true)
    
    // make selection data table not visible
    JMap.Application.Selection.setTableVisibility(false)

    Parameters

    • tableVisibility: boolean

    Returns void