HI
I have been working with 2 sketchviewmodels, my marker plced on markersketchviewmodel, do not show markers popup when polygon below them are in editable mode. However some nearby markers that come under that markersketchviewmodel polygon also not show popup when zoom out.
// This function is called when a user clicks on the view.
function setUpGraphicClickHandler() {
view.on("click", function(event) {
view.hitTest(event).then(function(response) {
var results = response.results;
console.log(results);
if(results.length === 0){
sketchViewModel.complete();
markersketchViewModel.complete();
}
// Check if the new development graphic and temp graphics with attribute named newDevelopment was clicked and pass
// the graphic to sketchViewModel.update() with reshape tool.
results.forEach(function(result) {
//console.log(result);
if (
result.graphic.layer === sketchViewModel.layer &&
result.graphic.attributes &&
result.graphic.attributes.newDevelopment
) {
sketchViewModel.update([result.graphic], { tool: "reshape" });
} else if(
result.graphic.layer === markersketchViewModel.layer &&
result.graphic.attributes &&
result.graphic.attributes.newDevelopment){
markersketchViewModel.update([result.graphic], { tool: "reshape" });
}
else if(sketchViewModel.state !== 'active'){
sketchViewModel.cancel();
if( result.graphic.attributes &&
result.graphic.attributes.newDevelopment){
view.popup.open({features: [result.graphic], location: result.graphic.geometry});
}
} else if(markersketchViewModel.state!== 'active'){
markersketchViewModel.cancel();
if( result.graphic.attributes &&
result.graphic.attributes.newDevelopment){
view.popup.open({features: [result.graphic], location: result.graphic.geometry});
}
}
});
});
});
}//End setUpGraphicClickHandler