• JMap.Application.Panel.add

    Adds a custom panel for a given panel definition to JMap Cloud NG.

    Parameters

    • panel: JAppPanel

      an object that is the definition of the new panel

    Returns void

    Throws

    if panel format is not correct

    Example

    const customPanelId = "custom-panel"
    // will add the new panel, here an empty panel just for the example
    JMap.Application.Panel.add({
    id: customPanelId,
    // Can be an image encoded as a base64 url or an svg tag as a string.
    // For an svg string a viewbox need to be specified for the icon to appear and if no fill attribute is specified, the icon will follow the app theme.
    icon: "http://url-to-my-image/custom-icon.png",
    iconTooltip: "My custom panel tooltip display when mouse is hover the icon",
    title: "Custom panel"
    })
    // The panel has been created but not displayed, if you want to display it:
    JMap.Applcation.activate(customPanelId)