Currently I'm using an ArcGISDynamicMapServiceLayer along with an InfoTemplate assigned to it, so when I single click on any portion of my map, it returns the InfoTemplate that includes a few fields from whichever parcel I clicked on.
var infoTemplate = new InfoTemplate("${PIN_DSP}","<b>${OWNER_NAME}</b>");
var parcelsLayer = new ArcGISDynamicMapServiceLayer("http://172.27.8.54/okaloosagis/rest/services/PropertyApp/ParcelService/MapServer", {
"id": "Parcels",
"visible": true,
disableClientCaching: true,
useMapImage: true
});
parcelsLayer.setInfoTemplates({
14: {infoTemplate: infoTemplate}
})
I was moving on to the next step, which would be using some sort of Draw feature to select more than one location at a time, and return the same information for every parcel the geometry included. Right now I have a rectangle drawing on screen using the Draw Toolbar option, but I'm trying to find some more information on taking this geometry and using it to return said data. Can anyone direct me to an example, or anything that might help me learn more? I'm pretty new at this, so reading the API Reference for both the InfoTemplates and Draw Toolbars didn't help me too much, but it could be that I don't fully understand it in the terminology they're using.
Here's my drawing routines, just for some more info.
function initToolbar() {
tb = new Draw(map);
tb.on("draw-end", addSpatialInfoTemplate);
// event delegation so a click handler is not
// needed for each individual button
on(dom.byId("doExtent"), "click", function(evt) {
if ( evt.target.id === "doExtent" ) {
return;
}
map.disableMapNavigation();
tb.activate(Draw.EXTENT);
});
}
function addSpatialInfoTemplate(evt) {
//deactivate the toolbar and clear existing graphics
tb.deactivate();
map.enableMapNavigation();
//trigger infoTemplate here
}
Thank you!