<?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 Displaying a static graphic in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572670#M12889</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like to display a box on the map that remains stationary as the user pans around.&amp;nbsp; The box represents different print templates, and the user will often pan the map a little to get their desired extent within their desired template.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that I can't figure out how to keep the box stationary.&amp;nbsp; By creating a rectangle within a graphics layer, the rectangle initially appears on the map in the center as expected.&amp;nbsp; However, if I pan the map the rectangle goes with it, which is not the desired effect.&amp;nbsp; I would like for the rectangle to stay in the center of the map the whole time.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried using the clear() method as well as deleting the graphic layer and then recreating it, then re-adding the new graphic layer to the map with the new rectangle.&amp;nbsp; The result is always the same.&amp;nbsp; It appears as though the parameters for the viewable map area get set at each scale and those values are fixed until the user changes scale by zoom event. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is an example of how I am using the graphics layer.&amp;nbsp; This code snippet is in my PAN_END event handler and notice that although I have the x &amp;amp; y value set to 0,0 the rectangle actually appears at a location relative to the last extent NOT THE CURRENT EXTENT.&amp;nbsp; UGH!&amp;nbsp; Anyone have any experience with doing something similar or insight into how to pull this off?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected function map_panEndHandler(event:Event):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (this.mapGraphicsLyr){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [INDENT]mapGraphicsLyr.clear();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; _map.removeLayer(mapGraphicsLyr);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mapGraphicsLyr=null;[/INDENT]}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mapGraphicsLyr = new GraphicsLayer();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mapGraphicsLyr.graphics.lineStyle(3,0x00FF00);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mapGraphicsLyr.graphics.drawRect(0, 0, 500, 500); //x, y, width, height&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_map.addLayer(mapGraphicsLyr,-1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for reading.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chuck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 24 Jan 2013 22:44:55 GMT</pubDate>
    <dc:creator>CharlesTilly</dc:creator>
    <dc:date>2013-01-24T22:44:55Z</dc:date>
    <item>
      <title>Displaying a static graphic</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572670#M12889</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would like to display a box on the map that remains stationary as the user pans around.&amp;nbsp; The box represents different print templates, and the user will often pan the map a little to get their desired extent within their desired template.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The problem is that I can't figure out how to keep the box stationary.&amp;nbsp; By creating a rectangle within a graphics layer, the rectangle initially appears on the map in the center as expected.&amp;nbsp; However, if I pan the map the rectangle goes with it, which is not the desired effect.&amp;nbsp; I would like for the rectangle to stay in the center of the map the whole time.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried using the clear() method as well as deleting the graphic layer and then recreating it, then re-adding the new graphic layer to the map with the new rectangle.&amp;nbsp; The result is always the same.&amp;nbsp; It appears as though the parameters for the viewable map area get set at each scale and those values are fixed until the user changes scale by zoom event. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is an example of how I am using the graphics layer.&amp;nbsp; This code snippet is in my PAN_END event handler and notice that although I have the x &amp;amp; y value set to 0,0 the rectangle actually appears at a location relative to the last extent NOT THE CURRENT EXTENT.&amp;nbsp; UGH!&amp;nbsp; Anyone have any experience with doing something similar or insight into how to pull this off?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;protected function map_panEndHandler(event:Event):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;{&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (this.mapGraphicsLyr){&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; [INDENT]mapGraphicsLyr.clear();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; _map.removeLayer(mapGraphicsLyr);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; mapGraphicsLyr=null;[/INDENT]}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mapGraphicsLyr = new GraphicsLayer();&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mapGraphicsLyr.graphics.lineStyle(3,0x00FF00);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mapGraphicsLyr.graphics.drawRect(0, 0, 500, 500); //x, y, width, height&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;_map.addLayer(mapGraphicsLyr,-1);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;[/INDENT]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;}&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for reading.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chuck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2013 22:44:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572670#M12889</guid>
      <dc:creator>CharlesTilly</dc:creator>
      <dc:date>2013-01-24T22:44:55Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying a static graphic</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572671#M12890</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Chuck,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; Here is a thread that should help:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A class="jive-link-external-small" href="http://forums.arcgis.com/threads/12356-Movable-scaled-print-area-graphic?highlight=staticlayer" rel="nofollow" target="_blank"&gt;http://forums.arcgis.com/threads/12356-Movable-scaled-print-area-graphic?highlight=staticlayer&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 01:19:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572671#M12890</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2013-01-25T01:19:26Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying a static graphic</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572672#M12891</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Robert, &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;That is in fact what I was looking for.&amp;nbsp; Follow up question though. While scouring the documentation looking for the right method or object that would do what I needed, I naturally kept gravitating to staticLayer but the [read only] attribute led me to believe it was &lt;/SPAN&gt;&lt;STRONG style="text-decoration: underline;"&gt;read only&lt;/STRONG&gt;&lt;SPAN&gt;.&amp;nbsp; Furthermore the description makes it seem like it is for adding already existing graphics like legends to the map.&amp;nbsp; What is the disconnect here?&amp;nbsp; Why does the documentation say it is read only when in fact you can add additional graphics layers to it?&amp;nbsp; I can't find anything in the documentation that discusses the use of the Map.staticLayer.addElement.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you again!&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Chuck&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 03:16:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572672#M12891</guid>
      <dc:creator>CharlesTilly</dc:creator>
      <dc:date>2013-01-25T03:16:41Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying a static graphic</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572673#M12892</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Chuck,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; There are several undocumented areas of the API because the team does not really intend for people to use them (does not mean you can't though). It is called static because that layer does not move when the map is paned. It is for things like the scalebar, esri logo, and the new map attribution.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Don't forget to &lt;/SPAN&gt;&lt;STRONG&gt;click the Mark as answer check&lt;/STRONG&gt;&lt;SPAN&gt; on this post and to &lt;/SPAN&gt;&lt;STRONG&gt;click the top arrow (promote)&lt;/STRONG&gt;&lt;SPAN&gt;.&lt;/SPAN&gt;&lt;BR /&gt;&lt;STRONG&gt;Follow these steps&lt;/STRONG&gt;&lt;SPAN&gt; as shown in the below graphic:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;IMG src="http://gis.calhouncounty.org/FlexViewer3.0/Answer.jpg" /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 11:06:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572673#M12892</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2013-01-25T11:06:20Z</dc:date>
    </item>
    <item>
      <title>Re: Displaying a static graphic</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572674#M12893</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Chuck,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The staticLayer is marked as [read-only] as you cannot change the actual reference to it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But this doesn't mean that its properties/functions are not accessible.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Indeed the API use the static layer to add components to it like the logos, legend, etc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Feel free to use it to add your own components in it.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Yann&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2013 14:36:37 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/displaying-a-static-graphic/m-p/572674#M12893</guid>
      <dc:creator>YannCabon</dc:creator>
      <dc:date>2013-01-25T14:36:37Z</dc:date>
    </item>
  </channel>
</rss>

