<?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: An issue when I click on the zoom button of my widget in ArcGIS Viewer for Flex Questions</title>
    <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128139#M4299</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Sorry for the bad code. Maybe the quickest way to test my idea is to center your map first and then to scale. This will cause the event to fire after the map is manipulated.&lt;BR /&gt;&lt;BR /&gt;As for the type error, I was wrong about the arguments needed for the extent change event. I would investigate the api at &lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/flex/apiref/index.html" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/webapi/flex/apiref/index.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi ploebus,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the code zoomToButton_clickHandler found in the PopUpRenderSkin.mxml and it worked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Jun 2012 20:38:02 GMT</pubDate>
    <dc:creator>AlaeddineSaadaoui</dc:creator>
    <dc:date>2012-06-20T20:38:02Z</dc:date>
    <item>
      <title>An issue when I click on the zoom button of my widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128133#M4293</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi all,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have an issue with the zoom button of my widget. When I click on the button, the widget goes a little bit far from my point. I am using the following code for zooming:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;var here:MapPoint = map.toMap(new Point(map.infoWindow.anchorX, map.infoWindow.anchorY));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;if (map.scale &amp;gt; zoomScale)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.scale = zoomScale;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;map.centerAt(here);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I would like to know how I could fix this problem.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 15:34:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128133#M4293</guid>
      <dc:creator>AlaeddineSaadaoui</dc:creator>
      <dc:date>2012-06-15T15:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: An issue when I click on the zoom button of my widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128134#M4294</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ploebus&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;In the older viewer, the infoPopup listens for the extent event and changes its location accordingly. When you set the map scale to the zoom scale, this fires the extent event, but than you further manipulate the map by setting its center which does not fire the event. Maybe this is why the infowindow is offset from the point?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 15 Jun 2012 23:34:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128134#M4294</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-06-15T23:34:30Z</dc:date>
    </item>
    <item>
      <title>Re: An issue when I click on the zoom button of my widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128135#M4295</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;In the older viewer, the infoPopup listens for the extent event and changes its location accordingly. When you set the map scale to the zoom scale, this fires the extent event, but than you further manipulate the map by setting its center which does not fire the event. Maybe this is why the infowindow is offset from the point?&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi ploebus,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;In this case, how could I change my code to fix this issue?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 12:33:19 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128135#M4295</guid>
      <dc:creator>AlaeddineSaadaoui</dc:creator>
      <dc:date>2012-06-18T12:33:19Z</dc:date>
    </item>
    <item>
      <title>Re: An issue when I click on the zoom button of my widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128136#M4296</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ploebus&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If this is the cause, I think you could center the map first and then zoom to new extent&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;you could manually dispatch the ExtentEvent.EXTENT_CHANGE to force infopopup to change location. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;map.dispatchEvent(new ExtentEvent(ExtentEvent.EXTENT_CHANGE));&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;-&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 20:07:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128136#M4296</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-06-18T20:07:43Z</dc:date>
    </item>
    <item>
      <title>Re: An issue when I click on the zoom button of my widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128137#M4297</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;If this is the cause, I think you could center the map first and then zoom to new extent&lt;BR /&gt; &lt;BR /&gt;or &lt;BR /&gt;&lt;BR /&gt;you could manually dispatch the ExtentEvent.EXTENT_CHANGE to force infopopup to change location. &lt;BR /&gt;&lt;BR /&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro"&gt;map.dispatchEvent(new ExtentEvent(ExtentEvent.EXTENT_CHANGE));&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;-&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi ploebus,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I have change my code to look like the following:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;protected function zoom_clickHandler(event:MouseEvent):void&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; var here:MapPoint = map.toMap(new Point(map.infoWindow.anchorX, map.infoWindow.anchorY));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (map.scale &amp;gt; zoomScale)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.scale = zoomScale;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; {&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.centerAt(here);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; map.dispatchEvent(new ExtentEvent(ExtentEvent.EXTENT_CHANGE));&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;But I got this error:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TypeError: Error #1009: Cannot access a property or method of a null object reference.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at com.esri.ags.tools::NavigationTool/extentChangeHandler()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at flash.events::EventDispatcher/dispatchEventFunction()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at flash.events::EventDispatcher/dispatchEvent()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at mx.core::UIComponent/dispatchEvent()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at widgets::StructureInfoWidget/zoom_clickHandler()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at widgets::StructureInfoWidget/__buttons_zoomToBtnClicked()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at flash.events::EventDispatcher/dispatchEventFunction()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at flash.events::EventDispatcher/dispatchEvent()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at mx.core::UIComponent/dispatchEvent()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at widgets::AttRelateInfoButtons/zoomToBtn_Click()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; at widgets::AttRelateInfoButtons/__zoomToBtn_click()&lt;C&gt;&lt;/C&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 21:36:51 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128137#M4297</guid>
      <dc:creator>AlaeddineSaadaoui</dc:creator>
      <dc:date>2012-06-18T21:36:51Z</dc:date>
    </item>
    <item>
      <title>Re: An issue when I click on the zoom button of my widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128138#M4298</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Original User: ploebus&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Sorry for the bad code. Maybe the quickest way to test my idea is to center your map first and then to scale. This will cause the event to fire after the map is manipulated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;As for the type error, I was wrong about the arguments needed for the extent change event. I would investigate the api at &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/webapi/flex/apiref/index.html"&gt;http://help.arcgis.com/en/webapi/flex/apiref/index.html&lt;/A&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 22:33:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128138#M4298</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2012-06-18T22:33:25Z</dc:date>
    </item>
    <item>
      <title>Re: An issue when I click on the zoom button of my widget</title>
      <link>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128139#M4299</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Sorry for the bad code. Maybe the quickest way to test my idea is to center your map first and then to scale. This will cause the event to fire after the map is manipulated.&lt;BR /&gt;&lt;BR /&gt;As for the type error, I was wrong about the arguments needed for the extent change event. I would investigate the api at &lt;A class="jive-link-external-small" href="http://help.arcgis.com/en/webapi/flex/apiref/index.html" rel="nofollow" target="_blank"&gt;http://help.arcgis.com/en/webapi/flex/apiref/index.html&lt;/A&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt;Hi ploebus,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I used the code zoomToButton_clickHandler found in the PopUpRenderSkin.mxml and it worked.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Thank you very much for your help.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Jun 2012 20:38:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-viewer-for-flex-questions/an-issue-when-i-click-on-the-zoom-button-of-my/m-p/128139#M4299</guid>
      <dc:creator>AlaeddineSaadaoui</dc:creator>
      <dc:date>2012-06-20T20:38:02Z</dc:date>
    </item>
  </channel>
</rss>

