<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Dynamically created layers and labels? in ArcGIS API for Silverlight Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272572#M7115</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Pretty annoying that there is no labeling available for wpf solutions. It's not like it's a completely new feature I'm looking for, labeling is a quite basic operation...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a client API, which means its primarily a light-weight client to ArcGIS Server, which does full-blown labelling.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The trick I often use to create a label with a background, is two textblocks on top of each other. The top one is black foreground, the back one is white with a blur effect added to it. That way you get a white "halo" around the text.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can see this in action here: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ShowCoordinatesBehavior"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ShowCoordinatesBehavior&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;The effect is subtle on this basemap, but if you move the mousecursor outside the map area to the green background, you can easier see it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See my two examples of this in this forum post: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/22169-Custom-Marker-Symbol-with-Labels?p=73298&amp;amp;posted=1#post73298"&gt;http://forums.arcgis.com/threads/22169-Custom-Marker-Symbol-with-Labels?p=73298&amp;amp;posted=1#post73298&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 31 Jan 2011 16:57:35 GMT</pubDate>
    <dc:creator>dotMorten_esri</dc:creator>
    <dc:date>2011-01-31T16:57:35Z</dc:date>
    <item>
      <title>Dynamically created layers and labels?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272567#M7110</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have a question about labels.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a wpf-browser-application where layers are created dynamically/runtime by the user. For example, the user imports a text file with coordinates that is displayed in a new layer. The layers are created in the code/c# (not in the xaml) and should not be saved or anything, they only exists as long as the user runs the program.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;My question is: how do I display labels for the objects in these layers?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Currently the layers are graphic layers, but I cannot find any way to show labels for graphiclayers. It feels like I'm using the wrong kind of layer or something... it shouldn't be this hard to display simple labels?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions how to solve this? All help appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 05:31:31 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272567#M7110</guid>
      <dc:creator>KenAdams</dc:creator>
      <dc:date>2011-01-19T05:31:31Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically created layers and labels?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272568#M7111</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If the Geometry of your objects is 'Points', you can use a TextSymbol or a custom symbol including a TextBlock and bind the text property to an attribute of your graphics.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is a sample of TextSymbol here : &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphicsXAML"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphicsXAML&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;If the geometry is Polyline or Polygon, you can create a new graphicslayer for your labels but you will have to define the label position either by a geometry service (such as LabelPoints) or by a calculation at the client side (such as geometry.Extent.GetCenter()).&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jan 2011 12:21:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272568#M7111</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-01-19T12:21:28Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically created layers and labels?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272569#M7112</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If the Geometry of your objects is 'Points', you can use a TextSymbol or a custom symbol including a TextBlock and bind the text property to an attribute of your graphics.&lt;BR /&gt;There is a sample of TextSymbol here : &lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphicsXAML"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#AddGraphicsXAML&lt;/A&gt;&lt;BR /&gt; &lt;BR /&gt;If the geometry is Polyline or Polygon, you can create a new graphicslayer for your labels but you will have to define the label position either by a geometry service (such as LabelPoints) or by a calculation at the client side (such as geometry.Extent.GetCenter()).&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Right now I only have points, so the label position is not the problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is there no better way than to create text objects? I need non overlapping labels or at least being able to set text background color (cannot find a way to do that on text objects). That makes text objects unusable if you have points close to each other.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Is feature layer a better alternative? Is it possible to create feature layers dynamically? And is "real" labelling possible in feature layers? Any other solutions available?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;All help is appreciated!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 08:00:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272569#M7112</guid>
      <dc:creator>KenAdams</dc:creator>
      <dc:date>2011-01-31T08:00:38Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically created layers and labels?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272570#M7113</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;BR /&gt;Is there no better way than to create text objects?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;I don't think so.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I need non overlapping labels&lt;/BLOCKQUOTE&gt;&lt;SPAN&gt;There is no built-in methods to avoid overlapping labels -&amp;gt; this would need specific development.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;&lt;BR /&gt;or at least being able to set text background color (cannot find a way to do that on text objects). That makes text objects unusable if you have points close to each other.&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;A textblock has no background but you can surround it with any panels which has background.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;BR /&gt;Is feature layer a better alternative?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;There is no big difference with graphicslayer because, in your case, you are not requesting a feature service (basically a featurelayer is a graphicslayer which is querying a feature rest end point for you).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;BR /&gt;Is it possible to create feature layers dynamically? &lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Sure : you can instantiate a featurelayer, set the url and call initialize or add it to the map.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt; &lt;BR /&gt;And is "real" labelling possible in feature layers? Any other solutions available?&lt;BR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;At this time, there is nothing more for the labelling in feature layers.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 08:44:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272570#M7113</guid>
      <dc:creator>DominiqueBroux</dc:creator>
      <dc:date>2011-01-31T08:44:59Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically created layers and labels?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272571#M7114</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;*sigh*&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Pretty annoying that there is no labeling available for wpf solutions. It's not like it's a completely new feature I'm looking for, labeling is a quite basic operation...&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyway, thanx Dominique for taking your time answering my noob questions!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 09:05:08 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272571#M7114</guid>
      <dc:creator>KenAdams</dc:creator>
      <dc:date>2011-01-31T09:05:08Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically created layers and labels?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272572#M7115</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Pretty annoying that there is no labeling available for wpf solutions. It's not like it's a completely new feature I'm looking for, labeling is a quite basic operation...&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This is a client API, which means its primarily a light-weight client to ArcGIS Server, which does full-blown labelling.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The trick I often use to create a label with a background, is two textblocks on top of each other. The top one is black foreground, the back one is white with a blur effect added to it. That way you get a white "halo" around the text.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;You can see this in action here: &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ShowCoordinatesBehavior"&gt;http://help.arcgis.com/en/webapi/silverlight/samples/start.htm#ShowCoordinatesBehavior&lt;/A&gt;&lt;BR /&gt;&lt;SPAN&gt;The effect is subtle on this basemap, but if you move the mousecursor outside the map area to the green background, you can easier see it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;See my two examples of this in this forum post: &lt;/SPAN&gt;&lt;A href="http://forums.arcgis.com/threads/22169-Custom-Marker-Symbol-with-Labels?p=73298&amp;amp;posted=1#post73298"&gt;http://forums.arcgis.com/threads/22169-Custom-Marker-Symbol-with-Labels?p=73298&amp;amp;posted=1#post73298&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 31 Jan 2011 16:57:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272572#M7115</guid>
      <dc:creator>dotMorten_esri</dc:creator>
      <dc:date>2011-01-31T16:57:35Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically created layers and labels?</title>
      <link>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272573#M7116</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@kenadams - I found this post when trying to find information on "create map service dynamically".&amp;nbsp; It looks like you are successfully doing what i need to do (create an SDE table, create map service for that table, add that map service to your Silverlight app).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have successfully used a Geoprocessing task to create the sde feature layer that i need.&amp;nbsp; However, I am stuck when it comes to creating a a map service on ArcServer dynamically.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If anyone could lend a hand or some source code, it would be much appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jun 2011 12:15:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-silverlight-questions/dynamically-created-layers-and-labels/m-p/272573#M7116</guid>
      <dc:creator>EvanBossett</dc:creator>
      <dc:date>2011-06-14T12:15:16Z</dc:date>
    </item>
  </channel>
</rss>

