Adding Multiple Context Menu Entries

To include multiple entries, return an array of ContextMenuEntry objects and, if using TypeScript, set the return type to ContextMenuEntryInterface[] by running:

// SampleContextMenuEntryLayer.ts
// ...
  public onContextMenu(pos: MouseEventCoordinatesInterface): ContextMenuEntryInterface[]
  {
    //return the ContextMenuEntryInterface
    return [{
      name: "Go to Navvis",
      icon: "fa-globe",
      callback: () =>
      {
        window.open("https://www.navvis.com")
      }
    },
    {
      name: "Go to NavVis Developer Forum",
      icon: "fa-quote-left",
      callback: () =>
      {
        window.open("https://support.navvis.com/forums/")
      }
    }]
  }
// ...