Hi
A default popup appear when i click on vertice of polygon. As i m also using markers with popup in my app, but they also appear on my vertices with default body.
The line in bold shows my popup, but it should not work for polygon vertices.
// 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;
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) {
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();
// view.popup.open({features: [result.graphic], location: result.graphic.geometry});
} else if(markersketchViewModel!== 'active' ){
markersketchViewModel.cancel();
view.popup.open({features: [result.graphic], location: result.graphic.geometry});
}
});
});
});
}//End setUpGraphicClickHandler