Options
All
  • Public
  • Public/Protected
  • All
Menu

Module UI

JMap.UI

Here you'll find all UI related methods

Index

Functions

closeIFramePopup

  • closeIFramePopup(): void
  • JMap.UI.closeIFramePopup

    Closes the iframe popup if opened.

    example
    
    // Open an embedded popup of k2geospatial website
    JMap.UI.openIFramePopup({
     src: "https://k2geospatial.com/",
     title: "My embedded web page",
     initialPosition: { x: 400, y: 150 },
     initialWidth: 400,
     initialHeight: 350
    })
    
    // Then close it
    JMap.UI.closeIFramePopup()
    

    Returns void

getContainerHeight

  • getContainerHeight(): number
  • JMap.UI.getContainerHeight

    Returns the map container height in pixels.

    example
    
    // returns the map container height in pixels
    JMap.UI.getContainerHeight()

    Returns number

getContainerWidth

  • getContainerWidth(): number
  • JMap.UI.getContainerWidth

    Returns the map container width in pixels.

    example
    
    // returns the map container width in pixels
    JMap.UI.getContainerWidth()

    Returns number

openIFramePopup

  • JMap.UI.openIFramePopup

    Opens a embedded page in a popup that is movable (and resizable in options).

    Only one iframe popup can be open at the same time.

    Parameters initialWidth and initialHeight are in pixels.

    Embedding a page that sets the X-Frame-Options or Content-Security-Policy: frame-ancestors headers in an incompatible way may cause the display of the page to fail.

    See here and here for details

    throws

    Error if invalid parameters are passed

    example
    
    // Open an embedded popup of k2geospatial website
    JMap.UI.openIFramePopup({
     src: "https://my.web.site.com/",
     initialPosition: { x: 400, y: 250 },
     initialWidth: 400,
     initialHeight: 250,
     title: "My embeded web page",
     resizable: true
    })
    

    Parameters

    Returns void

setMainLayoutVisibility

  • setMainLayoutVisibility(isVisible: boolean): void
  • JMap.UI.setMainLayoutVisibility

    Set the main UI layout visibility.

    By default main UI layout is visible.

    throws

    if isVisible is not boolean value

    example
    
    // display main layout
    JMap.UI.setMainLayoutVisibility(true)
    
    // hide main layout
    JMap.UI.setMainLayoutVisibility(false)

    Parameters

    • isVisible: boolean

      false to hide, true to show

    Returns void