AnsweredAssumed Answered

Create Dialog Box Dynamically,Get user input values and Add Text Graphics on Map ?

Question asked by Mayur_Dodiya on Apr 24, 2019
Latest reply on Apr 25, 2019 by rscheitlin

Hi,

I have requirement to add text graphics on Map. User will click on Draw tool and then click on Map, When user click on Map open the dialog window like below.

 

 

User will enter text and chose color(Red, Black) from drop down and when click on save button get values of textbox and drop down selected value and add text on Map.

I am able to add text Graphics on Map without dialog box, but I am not getting how to create Dialog dynamically like above screenshot, fire event of Save button and when you click on save button add text graphics on Map.

Below is my code to add text graphic without dialog box.

drawText: function () {
var drawTextClickHanlder = this.map.on('click', lang.hitch(this, function (evt, override) {
var textSymbol = new TextSymbol(
"Text",
this.textFont,
this.textColor
);
var textGraphic = new Graphic(evt.mapPoint, textSymbol);
this.textGraphics.add(textGraphic);
this.connectMapClick();
drawTextClickHanlder.remove();
}));
}

 

Thanks,

Outcomes