<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: ArcGIS JavaScript Extension for Microsoft Virtual Earth Bug: Cannot Dynamically Draw Polyline or Polygon in Internet Explorer 7</title>
	<atom:link href="http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/</link>
	<description>spatially and technically enabled</description>
	<lastBuildDate>Tue, 29 Jun 2010 19:33:52 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Nate</title>
		<link>http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/comment-page-1/#comment-467</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Fri, 07 Aug 2009 15:17:56 +0000</pubDate>
		<guid isPermaLink="false">http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/#comment-467</guid>
		<description>Hi Brian, sorry I haven&#039;t been able to take a look at this. If you are still following this post, I just wanted to let you know that I have reported another related bug to ESRI. Performing an identify task using the ESRI Virtual Earth JavaScript API messes with the VEShape class and causes this bug to rear its ugly head again. I&#039;ll followup with more information once the bug is fixed.

They have been able to reproduce, so I am hoping to hear something back from them in the near future.</description>
		<content:encoded><![CDATA[<p>Hi Brian, sorry I haven&#8217;t been able to take a look at this. If you are still following this post, I just wanted to let you know that I have reported another related bug to ESRI. Performing an identify task using the ESRI Virtual Earth JavaScript API messes with the VEShape class and causes this bug to rear its ugly head again. I&#8217;ll followup with more information once the bug is fixed.</p>
<p>They have been able to reproduce, so I am hoping to hear something back from them in the near future.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Behling</title>
		<link>http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/comment-page-1/#comment-425</link>
		<dc:creator>Brian Behling</dc:creator>
		<pubDate>Tue, 02 Jun 2009 13:45:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/#comment-425</guid>
		<description>Hello sir. I have found another issue with dynamic drawing and now with identifying a feature. After I click on a feature to identify something, the shape will not draw. The IE explorer icon keeps spinning and nothing gets drawn. Similar to version 1.2. If I pan the map by dragging it, the line will then draw. This code works fine in firefox though. Can you still take a look at this? If this is a bug, I will submit it to ESRI. Javascript code below:

        var pointsArray = [];
        var sCorporateUrl = &quot;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/ESRI_LandBase_WebMercator/MapServer&quot;;
        var map = null;
        var agisve_services = null;
        var parcleIdentifyTolerance = 1; // in pixels
        var sCoprIdentifyTolerance = 16;
        var ident = false;
        
        function OnPageLoad() {
            var centerat = new VELatLong(40.01, -110.567);
            map = new VEMap(&#039;mapDiv&#039;);
            map.SetDashboardSize(VEDashboardSize.Small);
            var mapOptions = new VEMapOptions();

            map.LoadMap(centerat, 4, VEMapStyle.Hybrid, false, VEMapMode.Mode2D, false, 0, mapOptions);

            map.AttachEvent(&quot;onclick&quot;, getPoint);

            agisve_services = new ESRI.ArcGIS.VE.ArcGISLayerFactory();
            agisve_services.CreateLayer(sCorporateUrl, &quot;sCorporate&quot;, sCorpGetMap);

            //set up parameters and functions for identify task on sCorporate layer
            var sCorporateParams = { &quot;LayerOption&quot;: &quot;top&quot;, &quot;LayerIds&quot;: [0, 1, 2, 3, 4], &quot;Tolerance&quot;: sCoprIdentifyTolerance };
            sCorporateIdentParams = new ESRI.ArcGIS.VE.IdentifyParameters(sCorporateParams);
            sCorporateIdentTask = new ESRI.ArcGIS.VE.IdentifyTask();
            sCorporateIdentTask.Url = sCorporateUrl;

            map.AttachEvent(&quot;onclick&quot;, getPoint);
        }
        
        function getPoint(e) {
            var clickPnt = null;

            var clickPixel = new VEPixel(e.mapX, e.mapY);
            clickPnt = map.PixelToLatLong(clickPixel);

            if (ident == true) {
                document.getElementById(&quot;mapDiv&quot;).childNodes[0].style.cursor = &quot;wait&quot;;
                var pushpoint = new VEShape(VEShapeType.Pushpin, clickPnt);
                map.DeleteAllShapes();
                var mapDiv2 = $get(&quot;mapDiv&quot;);

                //identify sCorporate layer
                sCorporateIdentParams.Geometry = pushpoint;
                sCorporateIdentParams.Width = mapDiv2.clientWidth;
                sCorporateIdentParams.height = mapDiv2.clientHeight;
                sCorporateIdentParams.MapExtent = map.GetMapView();
                sCorporateIdentTask.Execute(sCorporateIdentParams, corporateIdentAddShapes);
            }
            else {
                drawLine(clickPnt);
            }
        }

        function corporateIdentAddShapes(IdentifyResult) {
                var results = IdentifyResult.Results;
                var shape = IdentifyResult.InputGeometry;
                if (IdentifyResult.Results != &quot;&quot;) {                 
                    var layer = IdentifyResult.ToVEShapeLayer();
                    map.AddShapeLayer(layer);                   
                }
                document.getElementById(&quot;mapDiv&quot;).childNodes[0].style.cursor = &quot;pointer&quot;;
        }

        function Identify() {

            if (ident == false) {
                document.getElementById(&quot;mapDiv&quot;).childNodes[0].style.cursor = &quot;pointer&quot;;
                ident = true;
                document.getElementById(&quot;btnIdentify&quot;).style.background = &quot;#D1EEEE&quot;;
                document.getElementById(&quot;btnIdentify&quot;).blur();
                document.getElementById(&quot;btnIdentify&quot;).value = &quot;Pan&quot;;
            }
            else {
                ident = false;
                document.getElementById(&quot;mapDiv&quot;).childNodes[0].style.cursor = &quot;default&quot;;
                document.getElementById(&quot;btnIdentify&quot;).style.background = &quot;white&quot;;
                document.getElementById(&quot;btnIdentify&quot;).blur();
                document.getElementById(&quot;btnIdentify&quot;).value = &quot;Identify&quot;;
            }
        }
        
        function drawLine(clickPnt) {
            pointsArray.push(clickPnt);
            if (pointsArray.length &gt; 1) {
                var line = new VEShape(VEShapeType.Polyline, pointsArray);
                map.AddShape(line);
            }
        }

        function sCorpGetMap(tileSourceSpec, resourceInfo) {
            tileSourceSpec.Opacity = 1;
            map.AddTileLayer(tileSourceSpec, true);
        }</description>
		<content:encoded><![CDATA[<p>Hello sir. I have found another issue with dynamic drawing and now with identifying a feature. After I click on a feature to identify something, the shape will not draw. The IE explorer icon keeps spinning and nothing gets drawn. Similar to version 1.2. If I pan the map by dragging it, the line will then draw. This code works fine in firefox though. Can you still take a look at this? If this is a bug, I will submit it to ESRI. Javascript code below:</p>
<p>        var pointsArray = [];<br />
        var sCorporateUrl = &#8220;http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Portland/ESRI_LandBase_WebMercator/MapServer&#8221;;<br />
        var map = null;<br />
        var agisve_services = null;<br />
        var parcleIdentifyTolerance = 1; // in pixels<br />
        var sCoprIdentifyTolerance = 16;<br />
        var ident = false;</p>
<p>        function OnPageLoad() {<br />
            var centerat = new VELatLong(40.01, -110.567);<br />
            map = new VEMap(&#8216;mapDiv&#8217;);<br />
            map.SetDashboardSize(VEDashboardSize.Small);<br />
            var mapOptions = new VEMapOptions();</p>
<p>            map.LoadMap(centerat, 4, VEMapStyle.Hybrid, false, VEMapMode.Mode2D, false, 0, mapOptions);</p>
<p>            map.AttachEvent(&#8220;onclick&#8221;, getPoint);</p>
<p>            agisve_services = new ESRI.ArcGIS.VE.ArcGISLayerFactory();<br />
            agisve_services.CreateLayer(sCorporateUrl, &#8220;sCorporate&#8221;, sCorpGetMap);</p>
<p>            //set up parameters and functions for identify task on sCorporate layer<br />
            var sCorporateParams = { &#8220;LayerOption&#8221;: &#8220;top&#8221;, &#8220;LayerIds&#8221;: [0, 1, 2, 3, 4], &#8220;Tolerance&#8221;: sCoprIdentifyTolerance };<br />
            sCorporateIdentParams = new ESRI.ArcGIS.VE.IdentifyParameters(sCorporateParams);<br />
            sCorporateIdentTask = new ESRI.ArcGIS.VE.IdentifyTask();<br />
            sCorporateIdentTask.Url = sCorporateUrl;</p>
<p>            map.AttachEvent(&#8220;onclick&#8221;, getPoint);<br />
        }</p>
<p>        function getPoint(e) {<br />
            var clickPnt = null;</p>
<p>            var clickPixel = new VEPixel(e.mapX, e.mapY);<br />
            clickPnt = map.PixelToLatLong(clickPixel);</p>
<p>            if (ident == true) {<br />
                document.getElementById(&#8220;mapDiv&#8221;).childNodes[0].style.cursor = &#8220;wait&#8221;;<br />
                var pushpoint = new VEShape(VEShapeType.Pushpin, clickPnt);<br />
                map.DeleteAllShapes();<br />
                var mapDiv2 = $get(&#8220;mapDiv&#8221;);</p>
<p>                //identify sCorporate layer<br />
                sCorporateIdentParams.Geometry = pushpoint;<br />
                sCorporateIdentParams.Width = mapDiv2.clientWidth;<br />
                sCorporateIdentParams.height = mapDiv2.clientHeight;<br />
                sCorporateIdentParams.MapExtent = map.GetMapView();<br />
                sCorporateIdentTask.Execute(sCorporateIdentParams, corporateIdentAddShapes);<br />
            }<br />
            else {<br />
                drawLine(clickPnt);<br />
            }<br />
        }</p>
<p>        function corporateIdentAddShapes(IdentifyResult) {<br />
                var results = IdentifyResult.Results;<br />
                var shape = IdentifyResult.InputGeometry;<br />
                if (IdentifyResult.Results != &#8220;&#8221;) {<br />
                    var layer = IdentifyResult.ToVEShapeLayer();<br />
                    map.AddShapeLayer(layer);<br />
                }<br />
                document.getElementById(&#8220;mapDiv&#8221;).childNodes[0].style.cursor = &#8220;pointer&#8221;;<br />
        }</p>
<p>        function Identify() {</p>
<p>            if (ident == false) {<br />
                document.getElementById(&#8220;mapDiv&#8221;).childNodes[0].style.cursor = &#8220;pointer&#8221;;<br />
                ident = true;<br />
                document.getElementById(&#8220;btnIdentify&#8221;).style.background = &#8220;#D1EEEE&#8221;;<br />
                document.getElementById(&#8220;btnIdentify&#8221;).blur();<br />
                document.getElementById(&#8220;btnIdentify&#8221;).value = &#8220;Pan&#8221;;<br />
            }<br />
            else {<br />
                ident = false;<br />
                document.getElementById(&#8220;mapDiv&#8221;).childNodes[0].style.cursor = &#8220;default&#8221;;<br />
                document.getElementById(&#8220;btnIdentify&#8221;).style.background = &#8220;white&#8221;;<br />
                document.getElementById(&#8220;btnIdentify&#8221;).blur();<br />
                document.getElementById(&#8220;btnIdentify&#8221;).value = &#8220;Identify&#8221;;<br />
            }<br />
        }</p>
<p>        function drawLine(clickPnt) {<br />
            pointsArray.push(clickPnt);<br />
            if (pointsArray.length &gt; 1) {<br />
                var line = new VEShape(VEShapeType.Polyline, pointsArray);<br />
                map.AddShape(line);<br />
            }<br />
        }</p>
<p>        function sCorpGetMap(tileSourceSpec, resourceInfo) {<br />
            tileSourceSpec.Opacity = 1;<br />
            map.AddTileLayer(tileSourceSpec, true);<br />
        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Behling</title>
		<link>http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/comment-page-1/#comment-421</link>
		<dc:creator>Brian Behling</dc:creator>
		<pubDate>Sun, 31 May 2009 13:57:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/#comment-421</guid>
		<description>I checked this again with a test web app and I found that there isn&#039;t a problem with panning. I have a button that the users click to enable measuring and there was some problems with that code. Thanks for the help.</description>
		<content:encoded><![CDATA[<p>I checked this again with a test web app and I found that there isn&#8217;t a problem with panning. I have a button that the users click to enable measuring and there was some problems with that code. Thanks for the help.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate</title>
		<link>http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/comment-page-1/#comment-416</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Thu, 28 May 2009 16:22:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/#comment-416</guid>
		<description>I believe you have to have a support account. If you do, go to &lt;a href=&quot;http://support.esri.com&quot; rel=&quot;nofollow&quot;&gt;http://support.esri.com&lt;/a&gt;, login, and you can submit your bug.

If you don&#039;t have a support account, I might be able to help you out. Can you post a code sample that I can use to reproduce the issue (post the code between the code tags to make it more readable)? I&#039;m not seeing the same issue that you are seeing.</description>
		<content:encoded><![CDATA[<p>I believe you have to have a support account. If you do, go to <a href="http://support.esri.com" rel="nofollow">http://support.esri.com</a>, login, and you can submit your bug.</p>
<p>If you don&#8217;t have a support account, I might be able to help you out. Can you post a code sample that I can use to reproduce the issue (post the code between the code tags to make it more readable)? I&#8217;m not seeing the same issue that you are seeing.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Behling</title>
		<link>http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/comment-page-1/#comment-415</link>
		<dc:creator>Brian Behling</dc:creator>
		<pubDate>Thu, 28 May 2009 14:44:16 +0000</pubDate>
		<guid isPermaLink="false">http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/#comment-415</guid>
		<description>Nate, I just found another bug with this. In IE after drawing the shape then panning, the shape will disapear, the loading icon will keep spinning and you cannot draw another shape on the map. I tried deleting the shape and clearing out the points array, but that still doesnt work.

How did you report this as a bug?</description>
		<content:encoded><![CDATA[<p>Nate, I just found another bug with this. In IE after drawing the shape then panning, the shape will disapear, the loading icon will keep spinning and you cannot draw another shape on the map. I tried deleting the shape and clearing out the points array, but that still doesnt work.</p>
<p>How did you report this as a bug?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nate</title>
		<link>http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/comment-page-1/#comment-414</link>
		<dc:creator>Nate</dc:creator>
		<pubDate>Thu, 28 May 2009 14:28:04 +0000</pubDate>
		<guid isPermaLink="false">http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/#comment-414</guid>
		<description>Glad I could help...</description>
		<content:encoded><![CDATA[<p>Glad I could help&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Behling</title>
		<link>http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/comment-page-1/#comment-410</link>
		<dc:creator>Brian Behling</dc:creator>
		<pubDate>Thu, 28 May 2009 03:48:53 +0000</pubDate>
		<guid isPermaLink="false">http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/#comment-410</guid>
		<description>To reply to my own post, it seems with 1.3 you have to add the service layer after loading the MS map. 

Cant wait till ESRI gets around to updating theier documentation. .</description>
		<content:encoded><![CDATA[<p>To reply to my own post, it seems with 1.3 you have to add the service layer after loading the MS map. </p>
<p>Cant wait till ESRI gets around to updating theier documentation. .</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian Behling</title>
		<link>http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/comment-page-1/#comment-409</link>
		<dc:creator>Brian Behling</dc:creator>
		<pubDate>Thu, 28 May 2009 03:04:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.nateirwin.net/2009/01/22/arcgis-javascript-extension-for-microsoft-virtual-earth-bug-cannot-dynamically-draw-polyline-or-polygon-in-internet-explorer-7/#comment-409</guid>
		<description>Yeah I&#039;m having a problem with this. I actualy came up with the exact same code logic as you have.

But anyways, I changed the the src path from 1.2 to 1.3 

http://serverapi.arcgisonline.com/jsapi/ve/?v=1.3

and my map will not load, but the path is valid. Have you gotten this to work yet?</description>
		<content:encoded><![CDATA[<p>Yeah I&#8217;m having a problem with this. I actualy came up with the exact same code logic as you have.</p>
<p>But anyways, I changed the the src path from 1.2 to 1.3 </p>
<p><a href="http://serverapi.arcgisonline.com/jsapi/ve/?v=1.3" rel="nofollow">http://serverapi.arcgisonline.com/jsapi/ve/?v=1.3</a></p>
<p>and my map will not load, but the path is valid. Have you gotten this to work yet?</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Dynamic Page Served (once) in 0.308 seconds -->
