I am trying to create a map where I can create a selection area, and get info of all graphic pointers under it, I tried to modify with following example, but they are using web service and queries, and I want it with json or array.
Thats the example I am following
I want to get email addresses of pointers after selection. Here is a fiddle to start with.
Code Snippet from the fiddle:
var map;
require([
"esri/map",
"esri/geometry/Point",
"esri/symbols/SimpleMarkerSymbol",
"esri/graphic",
"esri/layers/GraphicsLayer",
"dojo/domReady!"
], function(
Map, Point, SimpleMarkerSymbol, Graphic, GraphicsLayer
) {
map = new Map("map", {
basemap: "streets",
center: [-88.21,42.21],
zoom: 10
});
map.on("load", function() {
var content = '[email protected]';
var gl = new GraphicsLayer();
var p = new Point(-88.380801, 42.10560);
var s = new SimpleMarkerSymbol().setSize(20);
var g = new Graphic(p, s,{ 'title': 'Title', 'content': content }, new esri.InfoTemplate('${title}', '${content}'));
gl.add(g);
map.addLayer(gl);
});
});