Print Custom Text Symbols

3250
5
06-26-2015 01:42 AM
RyanSmith1
New Contributor III

Hi Guys,

I have a tool which allows users to add text to the map. It works fine but when they try to do a print with the text they added to the map, the font size changes and so does the color of the text. How can i keep the selected the selected font size and color on the printout?

Regards,

Ryan

Tags (1)
0 Kudos
5 Replies
thejuskambi
Occasional Contributor III

There some information here

Text Symbol to Export Web Map

BjornSvensson
Esri Regular Contributor

Ryan Smith​ Which version of the API are you using?  Could you share some code on how you're creating the TextSymbol?

0 Kudos
RyanSmith1
New Contributor III

Hi Bjorn,

I used the following example - Working with TextSymbol in the ArcGIS JavaScript API | ArcGIS Blog

I'm using api version 3.13 and the code i used to create the text symbol is:

map.on("click", function (evt) {

                        map.graphics.add(

                            new Graphic(

                                 new Point(evt.mapPoint.x, evt.mapPoint.y, map.spatialReference),

                                 new TextSymbol(dojo.byId("title").value).setColor(

                                 new Color(mapTextColor)).setFont(

                                 new Font(parseInt(dijit.byId("titlesize").value)).setWeight(Font["WEIGHT_BOLD"]))

                             ));

                    });

Regards,

Ryan

0 Kudos
SergioFernandez1
New Contributor II

Hello Ryan,

Thanks for the code.  How are you printing the map after adding the text? With ExportWebMap? If so, how do you add the text to the ExportWebMap call?

0 Kudos
RobertScheitlin__GISP
MVP Emeritus

Sergio,

   All graphics on the map get added to the print export unless there is some error/issue that prevents this from occurring.

0 Kudos