I am trying to use the bookmarks widgets for my web application which has recently been released with version 4.8. The trouble is although I have given my collection of bookmark but when I intialise the widget object it makes the bookmarks collection to null. It seems like the widget only works if the view is based on a webmap with predefined bookmarks. If I have my own collection <bookmark> of bookmark objects and the widget bookmarks is empty.
for (let item of _config.bookmarksOptions) {
let bk = new Bookmark({
extent: item.extent,
name: item.name
})
bcollection.add(bk)
}
//length of bcollection is 4
let bookmarkWidget = new Bookmarks({
view: vw,
bookmarks: bcollection
});
//length of bookmarkWidget.bookmarks is 0
Can anyone shed light on this issue.
Regards,
Omair