Sub Globals Dim popup As JSPopupWindow .... 'somewhere in your code to trigger popup Dim mapper As Map = mockData.Get(Position) 'create view content Dim viewContent As Panel viewContent.Initialize("") ...