Hide Table of Contents
esri/dijit/util
esri/layer/pixelFilters
esri/process
esri/support
esri/workers
Class: BookmarkItem

require(["esri/dijit/BookmarkItem"], function(BookmarkItem) { /* code goes here */ });

Description

(Added at v2.5)
Defines a bookmark for use in the Bookmark widget.

Samples

Search for samples that use this class.

Constructors

NameSummary
new BookmarkItem(params?)Creates a new BookmarkItem.

CSS

esri/dijit/BookmarkItem | Download source

Constructor Details

new BookmarkItem(params?)

Creates a new BookmarkItem.
Parameters:
<Object> params Optional See options list for parameters.
params properties:
<Extent> extent Optional The extent for the specified bookmark item.
<String> name Optional The name for the bookmark item.
Sample:
require([
  "esri/map", "esri/dijit/Bookmark", "dojo/dom", ... 
], function(Map, Bookmark, dom, ... ) {
  var map = new Map( ... );
  var bookmark = new Bookmark({
    map: map,
    bookmarks: bookmarks
  }, dom.byId("bookmark")); 
  ...
});

Bookmark items can also be created by defining a json object with the following format:

var bookmarks = [{
  "extent": {
    "spatialReference": {
      "wkid": 102100
    },
    "xmax": -10983636.8866296,
    "xmin": -14411372.5423473,
    "ymax": 5109691.46502651,
    "ymin": 2707598.58754309
  },
  "name": "Sonara"
}];
Show Modal