<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic createBookmark method is not available in BookmarksViewModel in ArcGIS JavaScript Maps SDK Questions</title>
    <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/createbookmark-method-is-not-available-in/m-p/174038#M16144</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create my own Bookmark widget using &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html"&gt;BookmarksViewModel&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However I&amp;nbsp; can not create a bookmark&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;And that's simply because the function&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html#createBookmark" style="color: #0079c1; background-color: #ffffff; font-weight: 300; text-decoration: none;"&gt;createBookmark&lt;/A&gt;&amp;nbsp;is not available.&lt;/P&gt;&lt;P&gt;I basically create a bookmarkviewmodel instance using this line:&amp;nbsp;&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.8pt;"&gt;&lt;SPAN style="color: #cc7832;"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="color: #9876aa;"&gt;bookmarksViewModel &lt;/SPAN&gt;= &lt;SPAN style="color: #cc7832;"&gt;new &lt;/SPAN&gt;BookmarksViewModel({&lt;SPAN style="color: #9876aa;"&gt;view&lt;/SPAN&gt;: &lt;SPAN style="color: #cc7832;"&gt;this&lt;/SPAN&gt;._mapWidgetModel.&lt;SPAN style="color: #9876aa;"&gt;view&lt;/SPAN&gt;})&lt;SPAN style="color: #cc7832;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I was then trying to use this code snippet from the documentation:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN class="" style="color: #006a00;"&gt;// Creates new bookmark from current view extent&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;this.bookmarksViewModel.createBookmark().then(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;&lt;SPAN class="" style="color: #aa0d91; font-weight: bold;"&gt;function&lt;/SPAN&gt;(&lt;SPAN class="" style="color: #5c2699;"&gt;bookmark&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;{ &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #006a00;"&gt;// Give the bookmark a name&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;bookmark.name = &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"New Bookmark"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #006a00;"&gt;// Add to bookmarks list&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;this.bookmarksViewModel.bookmarks.add(bookmark); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, the createBookmark function is not available either in BookmarksViewModel nor in map view object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 06 Dec 2019 14:31:58 GMT</pubDate>
    <dc:creator>Alaa_Bakry_AbdelazizABDELFATTA</dc:creator>
    <dc:date>2019-12-06T14:31:58Z</dc:date>
    <item>
      <title>createBookmark method is not available in BookmarksViewModel</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/createbookmark-method-is-not-available-in/m-p/174038#M16144</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to create my own Bookmark widget using &lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html"&gt;BookmarksViewModel&lt;/A&gt;&lt;/P&gt;&lt;P&gt;However I&amp;nbsp; can not create a bookmark&amp;nbsp;&lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;P&gt;And that's simply because the function&amp;nbsp;&lt;A href="https://developers.arcgis.com/javascript/latest/api-reference/esri-widgets-Bookmarks-BookmarksViewModel.html#createBookmark" style="color: #0079c1; background-color: #ffffff; font-weight: 300; text-decoration: none;"&gt;createBookmark&lt;/A&gt;&amp;nbsp;is not available.&lt;/P&gt;&lt;P&gt;I basically create a bookmarkviewmodel instance using this line:&amp;nbsp;&lt;/P&gt;&lt;PRE style="color: #a9b7c6; background-color: #2b2b2b; font-size: 9.8pt;"&gt;&lt;SPAN style="color: #cc7832;"&gt;this&lt;/SPAN&gt;.&lt;SPAN style="color: #9876aa;"&gt;bookmarksViewModel &lt;/SPAN&gt;= &lt;SPAN style="color: #cc7832;"&gt;new &lt;/SPAN&gt;BookmarksViewModel({&lt;SPAN style="color: #9876aa;"&gt;view&lt;/SPAN&gt;: &lt;SPAN style="color: #cc7832;"&gt;this&lt;/SPAN&gt;._mapWidgetModel.&lt;SPAN style="color: #9876aa;"&gt;view&lt;/SPAN&gt;})&lt;SPAN style="color: #cc7832;"&gt;;&lt;/SPAN&gt;&lt;/PRE&gt;&lt;P&gt;I was then trying to use this code snippet from the documentation:&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;SPAN class="" style="color: #006a00;"&gt;// Creates new bookmark from current view extent&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;this.bookmarksViewModel.createBookmark().then(&lt;/SPAN&gt;&lt;SPAN class="" style="color: #595959;"&gt;&lt;SPAN class="" style="color: #aa0d91; font-weight: bold;"&gt;function&lt;/SPAN&gt;(&lt;SPAN class="" style="color: #5c2699;"&gt;bookmark&lt;/SPAN&gt;)&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;{ &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #006a00;"&gt;// Give the bookmark a name&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;bookmark.name = &lt;/SPAN&gt;&lt;SPAN class="" style="color: #c41a16;"&gt;"New Bookmark"&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="" style="color: #006a00;"&gt;// Add to bookmarks list&lt;/SPAN&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;this.bookmarksViewModel.bookmarks.add(bookmark); &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #595959; background-color: #f8f8f8;"&gt;});&lt;/SPAN&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;However, the createBookmark function is not available either in BookmarksViewModel nor in map view object.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Dec 2019 14:31:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/createbookmark-method-is-not-available-in/m-p/174038#M16144</guid>
      <dc:creator>Alaa_Bakry_AbdelazizABDELFATTA</dc:creator>
      <dc:date>2019-12-06T14:31:58Z</dc:date>
    </item>
    <item>
      <title>Re: createBookmark method is not available in BookmarksViewModel</title>
      <link>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/createbookmark-method-is-not-available-in/m-p/174039#M16145</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The createBookmark() method seems to work with the BookmarksViewModel class. Here's a simple case with the method wired up to a button:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;sample&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://codepen.io/noash/pen/eYmpWrP" title="https://codepen.io/noash/pen/eYmpWrP"&gt;https://codepen.io/noash/pen/eYmpWrP&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Dec 2019 21:07:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-javascript-maps-sdk-questions/createbookmark-method-is-not-available-in/m-p/174039#M16145</guid>
      <dc:creator>Noah-Sager</dc:creator>
      <dc:date>2019-12-06T21:07:16Z</dc:date>
    </item>
  </channel>
</rss>

