Skip to main content

use add textmarkup in a workflow

Comments

3 comments

  • Permanently deleted user

    Hi Jeff,

    You would use a RunExternalCommand activity with the command "AddTextMarkup". The command parameter would be the geometry of the location where you want to place the text. This command will cause a dialog to pop up in the Viewer asking the user to enter the text to display. You cannot use this command to place pre-defined text on the map.

    -Victoria

    0
  • Permanently deleted user

    Hi Victoria,

     

    Is there a way to place pre-defined text on map then? Thanks

     

    regards,

     

    Jack

     

     
    0
  • Permanently deleted user

    Jack,

    In order to add Text markup without popup with the current released GVS, you need to code your own customModule where you can implement your own command, which you can call from the WF using 'RunExternalCommand' to execute

    For example, pass the geometry, where you want to put the text, and the text string to draw through the parameter to your own command.

    To make it fancy, you may pass the style values like Color, size of the graphic you want to draw the text too.

    On your implementation of your command, 

    (1) create a GraphicLayer

    (2) Set the Graphic for the location with SimpleMarkerSymbol

    (3) Set the TextSymbol object for the text

    (4) Add location graphic and  text symbol graphic to the GraphicLayer

    (5) Finally add your graphicLayer to Site.Map.Layers

    Check QuickStart project to learn how to create a custom module

     

     

    0

Please sign in to leave a comment.