Saturday 25 February 2017

arcgis javascript api - JS API Toggle Pop-Up On & Off


I am attempting to allow for the pop-up to be toggled on and off by pressing a checkbox. Here are some snippets of the code:


var clickHandler

function popupOn(evt){
var query = new esri.tasks.Query();
query.geometry = pointToExtent(map,evt.mapPoint,10);
var deferred = featureLayer.selectFeatures(query,esri.layers.FeatureLayer.SELECTION_NEW);
map.infoWindow.setFeatures([deferred]);
map.infoWindow.show(evt.mapPoint);

}

function clickConnect(connect){
if(connect){
//perform the identify task on click
clickHandler = dojo.connect(map, "onClick", popupOn);
}
else{
//disconnect the click handler
dojo.disconnect(clickHandler);

clickHandler = null;
}
}




No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...