<?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: Magnifying glass widget for FlexViewer 2.1 in ArcGIS API for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302123#M7162</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was able to get this widget working by tweaking which events are passed to the dynamic layer's addEventListener method.&amp;nbsp; It seems that dynamic layers no longer fire the Event.COMPLETE event, but rather a combination of LayerEvent.LOAD and LayerEvent.UPDATE_END.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is how I modified this widget to get it working:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) I changed all Event.COMPLETE events to LayerEvent.LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) I added an additional addEventListener method call to capture the LayerEvent.UPDATE_END events in the config method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a snippet from the config method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for each(var oLayer:Layer in oMap.layers)
{
 if (oLayer is ArcGISDynamicMapServiceLayer){
&amp;nbsp; var dyn:ArcGISDynamicMapServiceLayer = oLayer as ArcGISDynamicMapServiceLayer;
&amp;nbsp; var cLayer:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(dyn.url);
&amp;nbsp; cLayer.id = dyn.id;
&amp;nbsp; cLayer.addEventListener(LayerEvent.LOAD,onLoadDone);
&amp;nbsp; cLayer.addEventListener(LayerEvent.UPDATE_END,onLoadDone);
&amp;nbsp; map.addLayer(cLayer);
 } else if (oLayer is ArcGISTiledMapServiceLayer) {
&amp;nbsp; var tLayer:ArcGISTiledMapServiceLayer = oLayer as ArcGISTiledMapServiceLayer;
&amp;nbsp; var cLayer2:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(tLayer.url);
&amp;nbsp; cLayer2.id = tLayer.id;
&amp;nbsp; cLayer2.imageFormat = "jpg";
&amp;nbsp; cLayer2.addEventListener(LayerEvent.LOAD,onLoadDone);
&amp;nbsp; cLayer2.addEventListener(LayerEvent.UPDATE_END,onLoadDone);
&amp;nbsp; map.addLayer(cLayer2);
 } else if (oLayer is GraphicsLayer) {
&amp;nbsp; /* var gLayer:GraphicsLayer = deepClone(oLayer) as GraphicsLayer;
&amp;nbsp; map.addLayer(gLayer); */
 }
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 14:29:26 GMT</pubDate>
    <dc:creator>MichaelHaggerty</dc:creator>
    <dc:date>2021-12-11T14:29:26Z</dc:date>
    <item>
      <title>Magnifying glass widget for FlexViewer 2.1</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302120#M7159</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Greetings,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Did anyone had any luck with following widget in FlexViewer 2.1/2.2? &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16360"&gt;http://resources.esri.com/arcgisserver/apis/flex/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16360&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was able to make appropriate changes for 2.1 api but the zoom in magnifying glass does not work at all. Any help is appreciated. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 03:10:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302120#M7159</guid>
      <dc:creator>AbhaySingh</dc:creator>
      <dc:date>2010-12-23T03:10:09Z</dc:date>
    </item>
    <item>
      <title>Re: Magnifying glass widget for FlexViewer 2.1</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302121#M7160</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I don't have a widget, but I did make a Magnify component for my projects that could pretty easily be turned into a widget.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the Skinnable Component&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://gist.github.com/753059"&gt;https://gist.github.com/753059&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This is the TitleWindow with some methods to pass the MagnifyWindow when you move it around the screen.&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="https://gist.github.com/753061"&gt;https://gist.github.com/753061&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;It basically accepts your main map as the source map to know the current location of the window on the screen. You add a "Detailed" layer, in my case I use some high resolution imagery we have in-house. You can then add "Operational" layers to view on top of your "Detailed" layer.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;All layers have to be Dynamic so that you can zoom in as far as you want.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'll clean it up and add it to my FlexMapTools library at some point, but pretty busy this time of year.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope that helps.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 12:48:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302121#M7160</guid>
      <dc:creator>ReneRubalcava</dc:creator>
      <dc:date>2010-12-23T12:48:17Z</dc:date>
    </item>
    <item>
      <title>Re: Magnifying glass widget for FlexViewer 2.1</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302122#M7161</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot Rene...that definitely helps!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Dec 2010 13:38:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302122#M7161</guid>
      <dc:creator>AbhaySingh</dc:creator>
      <dc:date>2010-12-23T13:38:18Z</dc:date>
    </item>
    <item>
      <title>Re: Magnifying glass widget for FlexViewer 2.1</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302123#M7162</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I was able to get this widget working by tweaking which events are passed to the dynamic layer's addEventListener method.&amp;nbsp; It seems that dynamic layers no longer fire the Event.COMPLETE event, but rather a combination of LayerEvent.LOAD and LayerEvent.UPDATE_END.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is how I modified this widget to get it working:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1) I changed all Event.COMPLETE events to LayerEvent.LOAD&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2) I added an additional addEventListener method call to capture the LayerEvent.UPDATE_END events in the config method.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here is a snippet from the config method:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;for each(var oLayer:Layer in oMap.layers)
{
 if (oLayer is ArcGISDynamicMapServiceLayer){
&amp;nbsp; var dyn:ArcGISDynamicMapServiceLayer = oLayer as ArcGISDynamicMapServiceLayer;
&amp;nbsp; var cLayer:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(dyn.url);
&amp;nbsp; cLayer.id = dyn.id;
&amp;nbsp; cLayer.addEventListener(LayerEvent.LOAD,onLoadDone);
&amp;nbsp; cLayer.addEventListener(LayerEvent.UPDATE_END,onLoadDone);
&amp;nbsp; map.addLayer(cLayer);
 } else if (oLayer is ArcGISTiledMapServiceLayer) {
&amp;nbsp; var tLayer:ArcGISTiledMapServiceLayer = oLayer as ArcGISTiledMapServiceLayer;
&amp;nbsp; var cLayer2:ArcGISDynamicMapServiceLayer = new ArcGISDynamicMapServiceLayer(tLayer.url);
&amp;nbsp; cLayer2.id = tLayer.id;
&amp;nbsp; cLayer2.imageFormat = "jpg";
&amp;nbsp; cLayer2.addEventListener(LayerEvent.LOAD,onLoadDone);
&amp;nbsp; cLayer2.addEventListener(LayerEvent.UPDATE_END,onLoadDone);
&amp;nbsp; map.addLayer(cLayer2);
 } else if (oLayer is GraphicsLayer) {
&amp;nbsp; /* var gLayer:GraphicsLayer = deepClone(oLayer) as GraphicsLayer;
&amp;nbsp; map.addLayer(gLayer); */
 }
}&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 14:29:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302123#M7162</guid>
      <dc:creator>MichaelHaggerty</dc:creator>
      <dc:date>2021-12-11T14:29:26Z</dc:date>
    </item>
    <item>
      <title>Re: Magnifying glass widget for FlexViewer 2.1</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302124#M7163</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks a lot Michael .. appreciate the time you took to make the widget work and the explanation and code snippet you provided. Much appreciated....I've just started ArcGIS programming with Flex and I can use all help this community can provide... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Good day.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 29 Dec 2010 20:12:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302124#M7163</guid>
      <dc:creator>AbhaySingh</dc:creator>
      <dc:date>2010-12-29T20:12:14Z</dc:date>
    </item>
    <item>
      <title>Re: Magnifying glass widget for FlexViewer 2.1</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302125#M7164</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Michael,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Would you mind attaching the source code of modified widget? I am still getting some exceptions after modifying the code. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Abhay&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 18:53:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302125#M7164</guid>
      <dc:creator>AbhaySingh</dc:creator>
      <dc:date>2010-12-30T18:53:02Z</dc:date>
    </item>
    <item>
      <title>Re: Magnifying glass widget for FlexViewer 2.1</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302126#M7165</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Abhay,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; I produced this widget a long time ago as really a proof of concept. It is more of a "All show" and potentially have some memory consumption issues. As the developer I hate to say that you probably don't want to use this on your site for daily use.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 19:21:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302126#M7165</guid>
      <dc:creator>RobertScheitlin__GISP</dc:creator>
      <dc:date>2010-12-30T19:21:16Z</dc:date>
    </item>
    <item>
      <title>Re: Magnifying glass widget for FlexViewer 2.1</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302127#M7166</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks for clarification Robert. I suppose I will use Rene's solution in that case... &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Abhay&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Dec 2010 21:58:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302127#M7166</guid>
      <dc:creator>AbhaySingh</dc:creator>
      <dc:date>2010-12-30T21:58:32Z</dc:date>
    </item>
    <item>
      <title>Re: Magnifying glass widget for FlexViewer 2.1</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302128#M7167</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Michael,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am currently working on flex Viewer and developing a magnifying galss widget for my application. i was going through the code snippet which you have provided int his thread. could you explain me how you modified this widget and made it workig for your case. &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I am new to flex environment.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks for the help in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;jj_178&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Apr 2011 06:37:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302128#M7167</guid>
      <dc:creator>jyotsnajoshi</dc:creator>
      <dc:date>2011-04-08T06:37:14Z</dc:date>
    </item>
    <item>
      <title>Re: Magnifying glass widget for FlexViewer 2.1</title>
      <link>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302129#M7168</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;@jj_178 -- I would recommend following Robert's advice above and using Rene's code.&amp;nbsp; I too have found the magnify widget to be a bit unstable.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;@Abhay -- Have you turned Rene's code into a widget that you could share?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Apr 2011 14:52:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-flex-questions/magnifying-glass-widget-for-flexviewer-2-1/m-p/302129#M7168</guid>
      <dc:creator>MichaelHaggerty</dc:creator>
      <dc:date>2011-04-15T14:52:26Z</dc:date>
    </item>
  </channel>
</rss>

