All,
Is there a way to activate edit widget when you zoom to a feature from your query result set ? I love using the enhanced search. Thank you so much Robert! You save me a lot of time and headache.
I've doing some readings and look like ESRI doesn't make query and edit widgets "talk" to each other yet.
Can anyone help me to locate chunk of codes to call the edit widget from query or enhanced search widgets ? I really need to make it happen for my project.
Thanks,
Solved! Go to Solution.
Hoang Yen Ha,
In that case in the _onResultsTableClicked function update my changes to:
/*RJS - start edits*/ //this.map.infoWindow.show(centerPoint); if (this.wManager) { var widgetCfg = this._getWidgetConfig('Edit'); if(widgetCfg){ this.wManager.triggerWidgetOpen(widgetCfg.id).then(lang.hitch(this, function(widget){ setTimeout(lang.hitch(this, function(){ var mpPt = feature.geometry; var scrPt = this.map.toScreen(mpPt); this.map.emit("click", { bubbles: true, cancelable: true, screenPoint: scrPt, mapPoint: mpPt }); }), 1000); })); } } /*RJS - end Edits*/
Hoang,
What theme are you working with in your app? It makes a difference when it comes to the code needed.
Right now I'm using Foldable theme. Thank you.
I forgot to mention it's the attribute edit that I need. With your modified codes, I could get the edit window popup to do geometry edit but I still can't get to the attributes. Clicking on the attributes button on Edit window doesn't populate the attribute edit table at all.
My bad for not being clear at the beginning.
Thank you
Hoang Yen Ha,
In that case in the _onResultsTableClicked function update my changes to:
/*RJS - start edits*/ //this.map.infoWindow.show(centerPoint); if (this.wManager) { var widgetCfg = this._getWidgetConfig('Edit'); if(widgetCfg){ this.wManager.triggerWidgetOpen(widgetCfg.id).then(lang.hitch(this, function(widget){ setTimeout(lang.hitch(this, function(){ var mpPt = feature.geometry; var scrPt = this.map.toScreen(mpPt); this.map.emit("click", { bubbles: true, cancelable: true, screenPoint: scrPt, mapPoint: mpPt }); }), 1000); })); } } /*RJS - end Edits*/
I got it! Thank you so very much Robert! I can't just thank you enough!
Is it possible for me to try the same thing with your Enhanced Search Robert ? or it's a lot more complicated than what you just did ?
Hoang Yen Ha,
This is not possible with the eSearch as the eSearch does not use the real graphic from the Map Service as the Query widget does. The eSearch creates a clientside FeatureLayer.
Don't forget to mark this question as answered by clicking on the "Correct Answer" link on the reply that answered your question.
Thank you Robert!