<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.esri.com/Dev/utility/FeedStylesheets/atom.xsl" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"><title type="html">Applications Prototype Lab Blog</title><subtitle type="html" /><id>http://blogs.esri.com/Dev/blogs/apl/atom.aspx</id><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/default.aspx" /><link rel="self" type="application/atom+xml" href="http://blogs.esri.com/Dev/blogs/apl/atom.aspx" /><generator uri="http://communityserver.org" version="2.1.61120.2">Community Server</generator><updated>2009-07-01T17:28:00Z</updated><entry><title>New Lens Dijit for the ArcGIS API for JavaScript</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/10/20/New-Lens-Dijit-for-the-ArcGIS-API-for-JavaScript.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/10/20/New-Lens-Dijit-for-the-ArcGIS-API-for-JavaScript.aspx</id><published>2009-10-20T16:49:00Z</published><updated>2009-10-20T16:49:00Z</updated><content type="html">&lt;P&gt;Yesterday I added a new dijit to the &lt;A title="ArcGIS API for JavaScript Code Gallery" href="http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGallery"&gt;ArcGIS API for JavaScript Code Gallery&lt;/A&gt;: the &lt;A title="Lens Dijit" href="http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16633"&gt;Lens Dijit&lt;/A&gt;. It could also be called an X-Ray dijit. Here's a screen shot:&lt;/P&gt;
&lt;P&gt;&lt;IMG src="http://blogs.esri.com/Dev/photos/apl/images/9204/original.aspx"&gt;&lt;/P&gt;
&lt;P&gt;Everything you need to get started using it is in the ReadMe.txt included in the download but, if you just want to take it for a spin, you can try it here:&amp;nbsp; &lt;A title="Lens Dijit Demo" href="http://maps.esri.com/Labs4/AGSJS_Demos/Lens/lens_wgs84.html"&gt;lens dijit demo&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;Please leave any feedback in the comments here or at the resource center.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Contributed by Derek Swingley.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=9201" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="ArcGIS API for Javascript" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ArcGIS+API+for+Javascript/default.aspx" /><category term="Dojo" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Dojo/default.aspx" /><category term="Javascript" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Javascript/default.aspx" /><category term="X-Ray" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/X-Ray/default.aspx" /><category term="Lens" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Lens/default.aspx" /><category term="Dijit" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Dijit/default.aspx" /></entry><entry><title>More Microsoft Surface Videos</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/10/07/More-Microsoft-Surface-Videos.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/10/07/More-Microsoft-Surface-Videos.aspx</id><published>2009-10-07T21:53:47Z</published><updated>2009-10-07T21:53:47Z</updated><content type="html">&lt;p&gt;This week we have four new videos of proof-of-concepts developed on the &lt;a href="http://www.microsoft.com/surface/"&gt;Microsoft Surface&lt;/a&gt; with &lt;a href="http://www.esri.com/"&gt;ESRI&lt;/a&gt;’s &lt;a href="http://resources.esri.com/arcgisserver/apis/silverlight/"&gt;ArcGIS API for WPF&lt;/a&gt;.&lt;/p&gt;  &lt;h5&gt;ArcPhoto for Microsoft Surface&lt;/h5&gt;  &lt;p&gt;This application demonstrates how photographs can be automatically downloaded from a camera to the Surface using &lt;a href="http://en.wikipedia.org/wiki/Bluetooth"&gt;Bluetooth&lt;/a&gt; connectivity and &lt;a href="http://en.wikipedia.org/wiki/Georeference"&gt;georeferenced&lt;/a&gt;.&amp;#160; Georeferencing is the process of assigning a physical real-world position to an object, namely a photograph.&amp;#160; In this demonstration, the photographs were taken using device that included a &lt;a href="http://en.wikipedia.org/wiki/Global_Positioning_System"&gt;GPS&lt;/a&gt; receiver and could tag photographs with their geographic position. &lt;/p&gt;  &lt;p&gt;&lt;embed src="http://www.youtube.com/v/zkrrbgzjuS0" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt; &lt;/p&gt;  &lt;h5&gt;Greenprint Priority for Microsoft Surface&lt;/h5&gt;  &lt;p&gt;The following demonstration uses the Surface to display a map of an area and instructs a remote mapping server to perform intensive suitability analysis.&amp;#160; The parameters for the analysis are on the right hand side of the screen and the results are displayed on the left.&amp;#160; This demonstrates how the Surface can be used to perform “what if” environmental analysis.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/UzeMjVkyZj8" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;h5&gt;Map Analysis with Tagged Objects for Microsoft Surface&lt;/h5&gt;  &lt;p&gt;This demonstration uses Surface-specific tags as inputs to drive time and viewing geoprocessing operations.&amp;#160; The geoprocessing analysis is being performed on a remote &lt;a href="http://www.esri.com/software/arcgis/arcgisserver/index.html"&gt;ArcGIS Server&lt;/a&gt;.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/z8xAHGGHe-M" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;h5&gt;Tag Map Magnifier for Microsoft Surface&lt;/h5&gt;  &lt;p&gt;The application utilizes Surface-specific &lt;a href="http://www.infusion.com/surfaceblog/index.php/tags-and-object-recognition-with-microsoft-surface-part-1/"&gt;tags&lt;/a&gt; to act as virtual map magnifiers.&amp;#160; Tags are made up of a collection of domino-like black dots and are uniquely identified by the Surface device.&amp;#160; Developers can retrieve the tag position, identifier code and orientation.&lt;/p&gt;  &lt;p&gt;The lab used the tags to add an additional &lt;a href="http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/apiref/api_start.htm"&gt;Map&lt;/a&gt; &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.uielement.aspx"&gt;UIElements&lt;/a&gt; to the display.&amp;#160; As the user manipulates the tag, the magnifier map is repositioned and its map extent updated.&amp;#160; The map insets initially have same scale as the base map, a small scrollbar is provided to allow the user to magnify the map (or “zoom in”).&lt;/p&gt;  &lt;p&gt;Because tags are uniquely identified, if a user removes a tag and then places it back on the table, we are able to restore previous settings such as the map magnifier’s size and relative scale.&lt;/p&gt;  &lt;p&gt;&lt;embed src="http://www.youtube.com/v/a8LUqJ47g4o" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Contributed by Richie C.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=8904" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="ArcGIS API for WPF" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ArcGIS+API+for+WPF/default.aspx" /><category term="Microsoft Surface" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Microsoft+Surface/default.aspx" /></entry><entry><title>Dynamic Charting for ArcGIS Desktop</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/09/29/Dynamic-Charting-for-ArcGIS-Desktop.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/09/29/Dynamic-Charting-for-ArcGIS-Desktop.aspx</id><published>2009-09-29T22:26:00Z</published><updated>2009-09-29T22:26:00Z</updated><content type="html">&lt;p&gt;This post describes a new sample published by &lt;a href="http://www.esri.com/"&gt;ESRI&lt;/a&gt;’s &lt;a href="http://blogs.esri.com/Dev/blogs/apl/"&gt;Application Prototype Lab&lt;/a&gt; and inspired by &lt;a href="http://www.esri.com/company/about/jack_dangermond.html"&gt;Jack Dangermond&lt;/a&gt;’s &lt;a href="http://www.esri.com/events/uc/images/plenary/3vision.html"&gt;geodesign presentation&lt;/a&gt; at the 2009 ESRI &lt;a href="http://www.esri.com/events/uc/index.html"&gt;International User Conference&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://resources.esri.com/arcgisdesktop/dotnet/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16568"&gt;Dynamic Charting for ArcGIS Desktop&lt;/a&gt; is a free sample (with source code) available from the ESRI &lt;a href="http://resources.esri.com/arcgisdesktop/dotnet/index.cfm?fa=codeGallery"&gt;code gallery&lt;/a&gt;.&amp;nbsp; The sample summarizes a layer’s features based on length or area and grouped by unique values from the renderer.&amp;nbsp; The differentiating factor between this sample and the out-of-the-box &lt;a href="http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Creating_a_graph"&gt;charting tools&lt;/a&gt; is that these charts update dynamically, even during editing operations.&lt;/p&gt;  &lt;p&gt;The screenshot below demonstrates the Dynamic Charting tool in use during an active edit session.&amp;nbsp; As the user digitizes landuse lines and polygons, pie charts summarizing these two layers are automatically updated.&amp;nbsp; The benefit of this sample is that it allows the ArcMap user to view the proportion of features, for example, major roads versus minor roads, easily and dynamically.&lt;/p&gt;  &lt;p&gt;&lt;img width="549" height="486" src="http://blogs.esri.com/Dev/photos/apl/images/8283/original.aspx"&gt; &lt;/p&gt;  &lt;p&gt;&lt;b&gt;Installation Prerequisites&lt;/b&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Microsoft .NET 3.5 SP1     &lt;br&gt;&lt;i&gt;Installer will direct you to the Microsoft download website if this is missing.&lt;/i&gt;&lt;/li&gt;    &lt;li&gt;ESRI ArcGIS Desktop 9.2/9.3/9.3.1&lt;/li&gt;    &lt;li&gt;ESRI .NET Support     &lt;br&gt;&lt;a href="http://mrrichie.spaces.live.com/blog/cns!DD16C3F34F4D913E!582.entry"&gt;&lt;i&gt;http://mrrichie.spaces.live.com/blog/cns!DD16C3F34F4D913E!582.entry&lt;/i&gt;&lt;/a&gt;&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;b&gt;How to install?&lt;/b&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Download the contribution from ArcGIS Desktop code gallery,&lt;/li&gt;    &lt;li&gt;Unzip the download,&lt;/li&gt;    &lt;li&gt;Double click on the setup program (.msi) and following the installation instructions.&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;b&gt;How to use?&lt;/b&gt;&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Start ArcMap,&lt;/li&gt;    &lt;li&gt;Add a feature layer     &lt;br&gt;&lt;i&gt;eg shapefile, geodatabase feature class&lt;/i&gt;&lt;/li&gt;    &lt;li&gt;Select a unique value renderer     &lt;br&gt;&lt;i&gt;- Right click on a layer, select properties,       &lt;br&gt;- Click the Symbology tab,        &lt;br&gt;- Click Categories &amp;gt; Unique Values        &lt;br&gt;- Select a Value Field,        &lt;br&gt;- Enter values or click "Add All Values"        &lt;br&gt;- Click ok.&lt;/i&gt;&lt;/li&gt;    &lt;li&gt;Display the Dynamic Charts toolbar     &lt;br&gt;&lt;i&gt;- Click View &amp;gt; Toolbars &amp;gt; Dynamic Charting&lt;/i&gt;&lt;/li&gt;    &lt;li&gt;Click the first (and only button) on the toolbar,&lt;/li&gt;    &lt;li&gt;Drag and drop a layer to the Dynamic Charting dialog,&lt;/li&gt;    &lt;li&gt;Modify the refresh rate (if necessary)&lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;b&gt;Where to download?&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;Dynamic Charting for ArcGIS Desktop can be download from &lt;a href="http://resources.esri.com/arcgisdesktop/dotnet/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16568"&gt;here&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;i&gt;Contributed by Richie C.&lt;/i&gt;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=8734" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="Geodesign" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Geodesign/default.aspx" /><category term="WPF" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/WPF/default.aspx" /><category term="ArcGIS Desktop" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ArcGIS+Desktop/default.aspx" /></entry><entry><title>Site Suitability for Microsoft Surface</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/08/25/Site-Suitability-for-Microsoft-Surface.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/08/25/Site-Suitability-for-Microsoft-Surface.aspx</id><published>2009-08-25T23:02:29Z</published><updated>2009-08-25T23:02:29Z</updated><content type="html">&lt;p&gt;During the 2009 &lt;a href="http://www.esri.com/"&gt;ESRI&lt;/a&gt; &lt;a href="http://www.esri.com/events/uc/index.html"&gt;International User Conference&lt;/a&gt;, &lt;a href="http://www.esri.com/company/about/jack_dangermond.html"&gt;Jack Dangermond&lt;/a&gt; introduced his vision of geographic design or “&lt;a href="http://www.esri.com/news/arcwatch/0609/feature.html"&gt;geodesign&lt;/a&gt;”.&amp;#160; Click &lt;a href="http://www.esri.com/events/uc/images/plenary/3vision.html"&gt;here&lt;/a&gt; to view Jack’s presentation of his &lt;a href="http://en.wikipedia.org/wiki/GeoDesign"&gt;geodesign&lt;/a&gt; vision.&amp;#160; To assist Jack’s presentation, a few demonstrations were created to help illustrate this vision.&amp;#160; One such demonstration used a &lt;a href="http://www.microsoft.com/surface/"&gt;Microsoft Surface&lt;/a&gt; device to sketch planning areas on an interactive map.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/VZpVTUXa4lA" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;p&gt;This application was developed using the &lt;a href="http://resources.esri.com/arcgisserver/apis/silverlight/"&gt;ArcGIS API for WPF&lt;/a&gt; by the &lt;a href="http://blogs.esri.com/Dev/blogs/apl/"&gt;Applications Prototype Lab&lt;/a&gt;.&amp;#160; The base map is from &lt;a href="http://www.arcgisonline.com"&gt;ArcGIS Online&lt;/a&gt; and the overlaid &lt;a href="http://en.wikipedia.org/wiki/Suitability_analysis"&gt;suitability maps&lt;/a&gt; were sourced from a local &lt;a href="http://www.esri.com/software/arcgis/arcgisserver/index.html"&gt;ArcGIS Server&lt;/a&gt;.&amp;#160; In summary, this application demonstrates the interactivity of a multi-user/multi-touch device for &lt;a href="http://en.wikipedia.org/wiki/Land_use_planning"&gt;planning&lt;/a&gt; and communal &lt;a href="http://en.wikipedia.org/wiki/Urban_design"&gt;design&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Contributed by Richie C.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=7877" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="ESRI" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ESRI/default.aspx" /><category term="ArcGIS API for WPF" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ArcGIS+API+for+WPF/default.aspx" /><category term="Microsoft Surface" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Microsoft+Surface/default.aspx" /><category term="Geodesign" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Geodesign/default.aspx" /></entry><entry><title>Point Data, ArcGIS Server Base Maps and KISS</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/08/24/Point-Data_2C00_-ArcGIS-Server-Base-Maps-and-KISS.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/08/24/Point-Data_2C00_-ArcGIS-Server-Base-Maps-and-KISS.aspx</id><published>2009-08-24T23:15:00Z</published><updated>2009-08-24T23:15:00Z</updated><content type="html">&lt;P&gt;One of the most common requests for a web mapping application is to simply display points on a map. I won’t go on and on about the general concept as we’ve all probably seen countless examples of these maps. The basic idea is point data are represented by icons that are clickable. When you click a point, you get info about what’s happening there. It’s just simple points on a map.&lt;/P&gt;
&lt;P&gt;A few months back, a couple of us in the lab were tasked with developing a simple workflow that we could publish as a quick and easy way for non-developers to display some of their data on ArcGIS Online (or any other ArcGIS Server) base maps. &lt;A href="http://en.wikipedia.org/wiki/KISS_principle"&gt;KISS&lt;/A&gt; was definitely the theme of this mini-project. We quickly came up with a solution, and eventually uploaded it to the &lt;A href="http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGallery"&gt;ArcGIS API for JavaScript code gallery&lt;/A&gt; under the title “&lt;A href="http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16365"&gt;Mapping Point Data&lt;/A&gt;.” See the &lt;A title="Live demo of how to simply display point data using the ArcGIS API for JavaScript." href="http://maps.esri.com/Labs4/AGSJS_Demos/SimplePoints/SimplePoints.html"&gt;default, dead simple, points on a map app here&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;There are two applications bundled in that sample but both serve the same purpose. For this post, I’ll only go into detail for the app that deals with data that already have x and y coordinates. The apps come with detailed “How To” documents that serve as a step-by-step walkthrough to get the app running with your data. &lt;/P&gt;
&lt;P&gt;When working with data that already have associated x and y coordinates, the basic workflow is:&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;download and unzip the file from the &lt;A href="http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16365"&gt;code gallery page for this app&lt;/A&gt; &lt;/LI&gt;
&lt;LI&gt;edit the app’s configuration file, appConfig.js, to reference your data and the necessary fields &lt;/LI&gt;
&lt;LI&gt;copy the edited configuration file, your data file and the html file from the original .zip file to your web server &lt;/LI&gt;&lt;/UL&gt;
&lt;P&gt;That’s it! Navigate to the html file on your server and you should see your data displayed on a base map. The default configuration will display your data on top of the &lt;A href="http://server.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"&gt;ArcGIS Online (AGOL) street map&lt;/A&gt; but you can easily change this by editing the configuration file to point to a different AGOL map service or a map service of your own. Below is a screen shot displaying some of the sample data included with the code.&lt;/P&gt;
&lt;P&gt;&lt;IMG style="WIDTH:409px;HEIGHT:491px;" src="http://blogs.esri.com/Dev/photos/apl/images/7845/original.aspx" width=409 height=491&gt;&lt;/P&gt;
&lt;P&gt;Of course, you can get into more complex scenarios. One that’s covered in the “How To” doc is using/displaying data from multiple files. And there might be some pre-processing required to make sure your data uses the correct coordinates. If you just need to do a simple conversion from WGS84 to Web Mercator (or vice versa), check out &lt;A href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jsapi/namespace_geometry.htm#geographicToWebMercator"&gt;geographicToWebMercator()&lt;/A&gt; or &lt;A href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jsapi/namespace_geometry.htm#webMercatorToGeographic"&gt;webMercatorToGeographic()&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;If you run into any issues using these apps and/or have questions, please let us know in the comments.&lt;/P&gt;
&lt;P&gt;&lt;EM&gt;Contributed by Derek Swingley.&lt;/EM&gt;&lt;/P&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=7846" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="ESRI" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ESRI/default.aspx" /><category term="ArcGIS API for Javascript" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ArcGIS+API+for+Javascript/default.aspx" /><category term="point data" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/point+data/default.aspx" /><category term="KISS" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/KISS/default.aspx" /></entry><entry><title>No Download Required: View Data.gov Shapefiles Directly In Your Browser</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/08/10/No-Download-Required_3A00_-View-Data.gov-Shapefiles-Directly-In-Your-Browser.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/08/10/No-Download-Required_3A00_-View-Data.gov-Shapefiles-Directly-In-Your-Browser.aspx</id><published>2009-08-10T18:33:00Z</published><updated>2009-08-10T18:33:00Z</updated><content type="html">&lt;P&gt;We recently submitted the &lt;A href="http://sfviewer.esri.com/DataViewer/ShapefileViewer.html"&gt;Shapefile Viewer&lt;/A&gt; application to the &lt;A href="http://sunlightlabs.com/contests/appsforamerica2/"&gt;Apps for America 2: The DATA.gov Challenge&lt;/A&gt; contest, a project of the &lt;A href="http://sunlightfoundation.com/"&gt;Sunlight Foundation&lt;/A&gt;. We believe &lt;A href="http://www.data.gov/"&gt;DATA.gov&lt;/A&gt; is a great resource of publicly available government data. With the recent addition of the &lt;A href="http://gos2.geodata.gov/wps/portal/gos"&gt;geodata.gov&lt;/A&gt; references to the DATA.gov site, we now have over 100,000 geospatial datasets and services available for searching, browsing and/or download.&lt;/P&gt;
&lt;P&gt;In the ‘Raw Data Catalog’ and ‘Geodata Catalog’ sections there are many zipped data files available for direct download, including many Shapefile datasets. Typically, if you want to use these Shapefile datasets, you first need to download the zip file, unzip the contents to your local machine, and then finally view the Shapefile dataset with your favorite GIS. Unfortunately, there are times when the metadata associated with each entry does not provide enough information for you to decide if a particular Shapefile dataset is the one you’re really looking for. We also realize that not all DATA.gov users have a GIS application that supports the Shapefile format, but they’re still interested in the data.&lt;/P&gt;
&lt;P&gt;Ideally you’d want to look at the Shapefile dataset before you decide to download it to your local machine. This is where the Shapefile Viewer application comes in: it allows you to visualize and query these Shapefile datasets directly in your web browser, allowing you to decide if a particular Shapefile dataset is the one you’re looking for.&lt;/P&gt;
&lt;P&gt;The Shapefile Viewer web application relies on a &lt;A href="http://webhelp.esri.com/arcgisserver/9.3.1/dotNet/index.htm#geoprocessing/an_ove-2102662086.htm"&gt;Geoprocessing Service&lt;/A&gt; to do the hard work. The web application simply sends the URL of the user selected zip file as an input parameter to the Geoprocessing Service. The Geoprocessing Service is responsible for downloading the zip file remotely, unzipping the contents, fixing the Shapefile datasets, creating a map document, creating and rendering layers, and publishing a map service. Once the map service is created on the server, the Geoprocessing Service sends back the URL of the new map service to the web application. In the final step in the process, the web application adds the new map service to the map and allows the user to query the Shapefile dataset by identifying features on the map.&lt;/P&gt;
&lt;P&gt;&lt;I&gt;Contributed by John G.&lt;/I&gt;&lt;/P&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=7479" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="ESRI" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ESRI/default.aspx" /><category term="ArcGIS API for Javascript" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ArcGIS+API+for+Javascript/default.aspx" /><category term="Sunlight Foundation" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Sunlight+Foundation/default.aspx" /><category term="shapefile" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/shapefile/default.aspx" /><category term="Data.gov" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Data.gov/default.aspx" /><category term="geoprocessing" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/geoprocessing/default.aspx" /><category term="catalog" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/catalog/default.aspx" /><category term="geodata.gov" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/geodata.gov/default.aspx" /><category term="Apps for America 2" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Apps+for+America+2/default.aspx" /></entry><entry><title>Custom Objects in dojo.ItemFileReadStore: Using a Type Map</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/08/06/Custom-Objects-in-dojo.ItemFileReadStore_3A00_-Using-a-Type-Map.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/08/06/Custom-Objects-in-dojo.ItemFileReadStore_3A00_-Using-a-Type-Map.aspx</id><published>2009-08-06T17:34:00Z</published><updated>2009-08-06T17:34:00Z</updated><content type="html">&lt;P&gt;The &lt;A href="http://geochalkboard.wordpress.com/"&gt;GeoChalkboard Blog&lt;/A&gt; recently published a post about &lt;A href="http://geochalkboard.wordpress.com/2009/08/03/reading-json-data-with-dojo/"&gt;using the dojo.ItemFileReadStore&lt;/A&gt; (IFRS). That post does a good job of introducing and discussing basic usage of the ItemFileReadStore, but it leaves out one important aspect, the &lt;A href="http://docs.dojocampus.org/dojo/data/ItemFileReadStore#general-case-type-map"&gt;Type Map&lt;/A&gt;. &lt;/P&gt;
&lt;P&gt;Natively, an IFRS allows you to store primitive JavaScript types such as strings and numbers. If you want to store custom objects within an IFRS, geometry for instance, then you need to tell dojo a little about the objects and provide some extra info in your JSON file. &lt;/P&gt;
&lt;P&gt;You tell dojo about your custom objects through a Type Map. The &lt;A href="http://docs.dojocampus.org/dojo/data/ItemFileReadStore#custom-types"&gt;documentation about Type Map&lt;/A&gt; is comprehensive and does a good job of explaining the various options. I recommend sticking with the simplified form. The Type Map itself is a property of an object that is passed into the IFSR constructor. In its simplest form, the value for Type Map is an object that contains custom type names as properties and constructor functions as values. Simple, right? The following example should clear up any confusion. &lt;/P&gt;
&lt;P&gt;Here’s some code I used in a dijit I built to &lt;A href="http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16323"&gt;zoom to a specific state and/or county&lt;/A&gt;:&lt;/P&gt;&lt;PRE style="FONT-SIZE:10pt;" class=code&gt;&lt;SPAN style="COLOR:blue;"&gt;this&lt;/SPAN&gt;.stateStore = &lt;SPAN style="COLOR:blue;"&gt;new &lt;/SPAN&gt;dojo.data.ItemFileReadStore({&lt;BR&gt;    url: dojo.moduleUrl(&lt;SPAN style="COLOR:darkred;"&gt;"apl.dijit.ZoomTo"&lt;/SPAN&gt;, &lt;SPAN style="COLOR:darkred;"&gt;"data/states_wgs84.json"&lt;/SPAN&gt;),&lt;BR&gt;    typeMap: { &lt;SPAN style="COLOR:darkred;"&gt;"Extent"&lt;/SPAN&gt;: esri.geometry.Extent }&lt;BR&gt;});&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;The code above is setting up an ItemFileReadStore from which you can retrieve extents. It would be nice if all you had to do was specify the Type Map, but, unfortunately, it’s not that simple. To successfully use custom types in an IFRS, you also need to specify the object type within your JSON. Each custom object needs two specific properties: &lt;FONT face="Courier New"&gt;_type&lt;/FONT&gt; and &lt;FONT face="Courier New"&gt;_value&lt;/FONT&gt;. &lt;FONT face="Courier New"&gt;_type&lt;/FONT&gt; has to match a property name in the Type Map object and &lt;FONT face="Courier New"&gt;_value&lt;/FONT&gt; is passed to the custom type constructor function. Here’s an excerpt from states_wgs84.json file: &lt;/P&gt;&lt;PRE style="FONT-SIZE:10pt;" class=code&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;{&lt;BR&gt;  &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"identifier"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"name"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;,&lt;BR&gt;  &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"label"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"name"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;,&lt;BR&gt;  &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"items"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:[{&lt;BR&gt;    &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"name"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"Alabama"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;,&lt;BR&gt;    &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"abbr"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"AL"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;,&lt;BR&gt;    &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"fips"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"01"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;,&lt;BR&gt;    &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"extent"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:{&lt;BR&gt;      &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"_type"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"Extent"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;,&lt;BR&gt;      &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"_value"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:{&lt;BR&gt;        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"xmin"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:steelblue;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;-88.4729522509999&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;,&lt;BR&gt;        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"ymin"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:steelblue;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;30.2336047200001&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;,&lt;BR&gt;        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"xmax"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:steelblue;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;-84.8940162469999&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;,&lt;BR&gt;        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"ymax"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:steelblue;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;35.0160337240001&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;,&lt;BR&gt;        &lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"spatialReference"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:{&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:forestgreen;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;"wkid"&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;:&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;COLOR:steelblue;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;4326&lt;/SPAN&gt;&lt;SPAN style="BACKGROUND:white;-moz-background-clip:-moz-initial;-moz-background-origin:-moz-initial;-moz-background-inline-policy:-moz-initial;"&gt;}&lt;BR&gt;      }&lt;BR&gt;    }&lt;BR&gt;  }&lt;BR&gt;} &lt;BR&gt;&lt;/SPAN&gt;&lt;/PRE&gt;
&lt;P&gt;Notice that the value for &lt;FONT face="Courier New"&gt;_type&lt;/FONT&gt; from the JSON file matches a property of the &lt;FONT face="Courier New"&gt;typeMap&lt;/FONT&gt; used in the IFRS constructor. Once you have custom types defined in a Type Map, and set the proper values for &lt;FONT face="Courier New"&gt;_type&lt;/FONT&gt; and &lt;FONT face="Courier New"&gt;_value&lt;/FONT&gt;, you can retrieve and use custom types like any other type coming from an ItemFileReadStore. The code below retrieves a single extent from the store using fetchByIdentity:&lt;/P&gt;&lt;PRE style="FONT-SIZE:10pt;" class=code&gt;&lt;SPAN style="COLOR:blue;"&gt;this&lt;/SPAN&gt;.stateStore.fetchItemByIdentity({&lt;BR&gt;    identity: placeName, onItem: &lt;SPAN style="COLOR:blue;"&gt;this&lt;/SPAN&gt;.handleExtent, onError: &lt;SPAN style="COLOR:blue;"&gt;this&lt;/SPAN&gt;.oops&lt;BR&gt;});&lt;/PRE&gt;
&lt;P&gt;To see a complete working example of creating and using custom types in an ItemFileReadStore, see the ZoomTo.js file that is a part of the &lt;A href="http://resources.esri.com/arcgisserver/apis/javascript/arcgis/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16323"&gt;Zoom To State/County Dijit&lt;/A&gt;. &lt;/P&gt;
&lt;P style="LINE-HEIGHT:normal;MARGIN:0in 0in 0pt;" class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;
&lt;P style="LINE-HEIGHT:normal;MARGIN:0in 0in 0pt;" class=MsoNormal&gt;&lt;I&gt;Contributed by Derek Swingley.&lt;/I&gt;&lt;/P&gt;
&lt;P style="LINE-HEIGHT:normal;MARGIN:0in 0in 0pt;" class=MsoNormal&gt;&amp;nbsp;&lt;/P&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=7403" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="ArcGIS API for Javascript" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ArcGIS+API+for+Javascript/default.aspx" /><category term="Dojo" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Dojo/default.aspx" /><category term="ItemFileReadStore" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ItemFileReadStore/default.aspx" /><category term="Javascript" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Javascript/default.aspx" /></entry><entry><title>Cross Country Mobility for Microsoft Surface</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/20/Cross-Country-Mobility-for-Microsoft-Surface.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/20/Cross-Country-Mobility-for-Microsoft-Surface.aspx</id><published>2009-07-20T17:00:18Z</published><updated>2009-07-20T17:00:18Z</updated><content type="html">&lt;p&gt;This &lt;a href="http://www.microsoft.com/surface/"&gt;Surface&lt;/a&gt; application is built with &lt;a href="http://www.esri.com/"&gt;ESRI&lt;/a&gt;’s &lt;a href="http://resources.esri.com/arcgisserver/apis/silverlight/"&gt;ArcGIS API for WPF&lt;/a&gt; and references map and &lt;a href="http://edndoc.esri.com/arcobjects/9.2/net/shared/geoprocessing/geoprocessing/what_is_geoprocessing_qst_.htm"&gt;geoprocessing&lt;/a&gt; services from &lt;a href="http://www.esri.com/software/arcgis/arcgisserver/index.html"&gt;ArcGIS Server&lt;/a&gt;.&amp;#160; Cross country mobility is the name giving to an exercise of determining the most efficient path between two locations.&amp;#160; Depending on the data (and parameters) the end user can find a route that is the fastest, shortest, most fuel efficient, avoids urban areas, flattest or any other condition.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/5f6A7ENsE0o" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;p&gt;The first step illustrated in the video is the rating of three geographic layers: slope, vegetation and transportation.&amp;#160; The user can assign a preference to weight one more than others.&amp;#160; For example, slope could be a larger consideration (e.g. if moving heavy equipment) than the vegetation type.&amp;#160; Secondly, items within each layer can also be rated.&amp;#160; For example, the user can indicate that low slope is preferable to steep slopes and that grades great than 40° are “no go” (or impossible to traverse).&lt;/p&gt;  &lt;p&gt;The next step is to indicate the intended target location for the three flagged vehicles/people/units.&amp;#160; In the demonstration video the target is represented by a bulls-eye button than can dragged into position.&lt;/p&gt;  &lt;p&gt;After the three geographic layer have been rated and the target placed into position, a request is sent to ArcGIS Server to perform a &lt;a href="http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=weighted_overlay"&gt;weighted overlay&lt;/a&gt; using the user defined parameters.&amp;#160; The result is a new geographic layer called a cost surface.&amp;#160; A cost surface is like an image where each pixel contains a cost value, that is, the cost for an object to traverse it.&lt;/p&gt;  &lt;p&gt;The next step, uses the cost surface to find the least cost path from the three flagged objects to the target.&lt;/p&gt;  &lt;p&gt;The final step is the creation of a cost corridor.&amp;#160; A cost corridor is an area around the least cost path with a plus or minus one, two and three percent variation.&amp;#160; Basically, what alternative path could the three flagged objects take by sacrificing one to three percent cost (in time, money, fuel etc).&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Contributed by Richie C.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=7160" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="ESRI" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ESRI/default.aspx" /><category term="ArcGIS API for WPF" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ArcGIS+API+for+WPF/default.aspx" /><category term="Microsoft Surface" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Microsoft+Surface/default.aspx" /></entry><entry><title>Police Dispatcher on Microsoft Surface</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/20/Police-Dispatcher-on-Microsoft-Surface.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/20/Police-Dispatcher-on-Microsoft-Surface.aspx</id><published>2009-07-20T16:36:54Z</published><updated>2009-07-20T16:36:54Z</updated><content type="html">&lt;p&gt;In &lt;a href="http://en.wikipedia.org/wiki/2009#May"&gt;May&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/2009"&gt;2009&lt;/a&gt;, the Applications Prototype Lab &lt;a href="http://kiwigis.blogspot.com/2009/05/police-dispatcher-demo-arcgis-api-for.html"&gt;published&lt;/a&gt; a web application called “&lt;a href="http://maps.esri.com/Police/default.aspx"&gt;Police Dispatcher&lt;/a&gt;”.&amp;#160; The application simulated a &lt;a href="http://en.wikipedia.org/wiki/Police_dispatcher"&gt;police dispatch&lt;/a&gt; system with real time incidents and the tracking of police vehicles.&amp;#160; The application was built using &lt;a href="http://silverlight.net/"&gt;Silverlight&lt;/a&gt; 2 and the &lt;a href="http://www.esri.com/getting_started/developers/silverlight.html"&gt;ArcGIS API for Silverlight&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.esri.com/Dev/photos/apl/images/7158/original.aspx"&gt;&lt;img src="http://blogs.esri.com/Dev/photos/apl/images/7158/original.aspx" width="234" height="188" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;The police dispatcher demonstration was recently ported to the &lt;a href="http://www.microsoft.com/surface/"&gt;Microsoft Surface&lt;/a&gt; as a Surface application.&amp;#160; Surface applications are similar to standard &lt;a href="http://en.wikipedia.org/wiki/Windows_Presentation_Foundation"&gt;WPF&lt;/a&gt; application except that they target the &lt;a href="http://en.wikipedia.org/wiki/Microsoft_Surface"&gt;Surface&lt;/a&gt; hardware and include references to a few extra libraries.&amp;#160; The transition was relatively trivial, for example, the application references the &lt;a href="http://resources.esri.com/arcgisserver/apis/silverlight/"&gt;ArcGIS API for WPF&lt;/a&gt; rather than the &lt;a href="http://resources.esri.com/arcgisserver/apis/silverlight/"&gt;ArcGIS API for Silverlight&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;In the Surface application we took advantage of some the goodness of WPF such as &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.effects.dropshadowbitmapeffect.aspx"&gt;drop shadows&lt;/a&gt; and &lt;a href="http://msdn.microsoft.com/en-us/library/system.windows.media.effects.outerglowbitmapeffect.aspx"&gt;glow&lt;/a&gt; &lt;a href="http://msdn.microsoft.com/en-us/library/ms743435.aspx"&gt;bitmap effects&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/UtK2Gna0JJA" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;  &lt;p&gt;&lt;em&gt;Contributed by Richie C.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=7159" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="ESRI" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ESRI/default.aspx" /><category term="ArcGIS API for WPF" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ArcGIS+API+for+WPF/default.aspx" /><category term="Microsoft Surface" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Microsoft+Surface/default.aspx" /></entry><entry><title>Reading Remote XML Data Stores in .NET</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/17/Reading-Remote-XML-Data-Stores-in-.NET.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/17/Reading-Remote-XML-Data-Stores-in-.NET.aspx</id><published>2009-07-17T18:43:08Z</published><updated>2009-07-17T18:43:08Z</updated><content type="html">&lt;p&gt;I’d like to talk about difficulties you may encounter when retrieving and using &lt;a href="http://www.georss.org"&gt;GeoRSS&lt;/a&gt; (or in fact any &lt;a href="http://en.wikipedia.org/wiki/XML"&gt;XML&lt;/a&gt; data) in an application built on the &lt;a href="http://msdn.microsoft.com/en-us/netframework/default.aspx"&gt;.NET framework&lt;/a&gt;—including those built with the new &lt;a href="http://resources.esri.com/arcgisserver/apis/silverlight/"&gt;ArcGIS API for Silverlight/WPF&lt;/a&gt;. The basics of using XML feeds involve:&lt;/p&gt;  &lt;ol&gt;   &lt;li&gt;Constructing a URL pointing to the data location; &lt;/li&gt;    &lt;li&gt;Using a .NET framework object, such as &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.webclient.aspx"&gt;WebClient&lt;/a&gt;, to read the data; &lt;/li&gt;    &lt;li&gt;Decoding the XML data and doing something with it &lt;/li&gt; &lt;/ol&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Using the ESRI Proxy Page&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;The first roadblock you’ll run into is that of cross-domain security—that is, when your base map data is on one server (e.g. ArcGIS Online) but the XML data you want is on another. This is considered a security risk and is generally forbidden by web browsers and network-access object models such as those in Microsoft’s Silverlight or Adobe’s Flex.&lt;/p&gt;  &lt;p&gt;A couple of solutions are:&lt;/p&gt;  &lt;ul&gt;   &lt;li&gt;Add an access policy file on the XML server as documented near the bottom of &lt;a href="http://resources.esri.com/help/9.3/arcgisserver/apis/silverlight/help/Getting_Started.htm"&gt;this page&lt;/a&gt;. &lt;/li&gt;    &lt;li&gt;Use a proxy page to access the data, as documented &lt;a href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp/ags_proxy.htm"&gt;here&lt;/a&gt;. &lt;/li&gt; &lt;/ul&gt;  &lt;p&gt;The policy file is the easier solution, but it is not normally under your control as a developer. Setting up a proxy page involves downloading it and installing it into the web directory of your solution:&lt;/p&gt;  &lt;p&gt;&lt;img src="http://blogs.esri.com/Dev/photos/apl/images/7127/original.aspx" /&gt; &lt;/p&gt;  &lt;p&gt;To use it, use its local URL along with a query string parameter for the remote web page containing the XML data you want; for example: &lt;b&gt;http://localhost/GeoNetworkCatalog.Web/proxy.ashx?http://geonetwork3.fao.org/geonetwork/srv/en/rss.search?georss=gml&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;There are two question-mark parameter delimiters here; the first one is used by the proxy page to determine the real location of the XML feed. The second question mark is interpreted by the server hosting the XML data. This will trick the web browser into thinking the data you want is on the local web server, not on a remote and insecure domain.&lt;/p&gt;  &lt;p&gt;How do we use the proxy page to get data? .NET provides an object for this, called &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.webclient(VS.90).aspx"&gt;WebClient&lt;/a&gt;&lt;a href="http://msdn.microsoft.com/en-us/library/system.net.webclient(VS.90).aspx)"&gt;&lt;/a&gt;. Setting up the download involves just a few preparatory lines of code:&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:green;font-size:10pt;mso-no-proof:yes;"&gt;// sURL is the proxy page plus URL for the remote GeoRSS feed &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:#2b91af;font-size:10pt;mso-no-proof:yes;"&gt;Uri&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt; uriGeoRSS = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Uri&lt;/span&gt;(sURL, &lt;span style="color:#2b91af;"&gt;UriKind&lt;/span&gt;.Absolute); &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:#2b91af;font-size:10pt;mso-no-proof:yes;"&gt;WebClient&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt; wcGeoRSS = &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;WebClient&lt;/span&gt;(); &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:green;font-size:10pt;mso-no-proof:yes;"&gt;// grss_HandleString is an event handler called when the data is available &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;text-indent:-0.25in;margin:0in 0in 0pt 0.25in;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;wcGeoRSS.DownloadStringCompleted += &lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;DownloadStringCompletedEventHandler&lt;/span&gt;(grss_HandleString); &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; &lt;span style="line-height:115%;font-family:'Courier New';font-size:10pt;mso-no-proof:yes;mso-fareast-font-family:calibri;mso-ansi-language:en-us;mso-fareast-language:en-us;mso-bidi-language:ar-sa;"&gt;wcGeoRSS.DownloadStringAsync(uriGeoRSS);&lt;/span&gt;   &lt;p&gt;What you do with the downloaded GeoRSS data is up to you. Your event handler will receive the feed data as XML, so you can use standard .NET XML objects to break it into usable bits:&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:blue;font-size:10pt;mso-no-proof:yes;"&gt;private&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt; &lt;span style="color:blue;"&gt;void&lt;/span&gt; grss_HandleString(&lt;span style="color:blue;"&gt;object&lt;/span&gt; sender, &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:#2b91af;font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160; &lt;/span&gt;DownloadStringCompletedEventArgs&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt; args) { &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:blue;"&gt;if&lt;/span&gt; (args.Error == &lt;span style="color:blue;"&gt;null&lt;/span&gt;) { &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;XElement&lt;/span&gt; xdocGeoRSS = &lt;span style="color:#2b91af;"&gt;XDocument&lt;/span&gt;.Load( &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:blue;font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:blue;"&gt;new &lt;/span&gt;&lt;span style="color:#2b91af;"&gt;StringReader&lt;/span&gt;(args.Result)).Root.Element(&lt;span style="color:#a31515;"&gt;&amp;quot;channel&amp;quot;&lt;/span&gt;); &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;&lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&amp;#160;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:green;"&gt;// Display header info &lt;/span&gt;&lt;/span&gt;    &lt;p&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;hlPageLinkMain.Content = (&lt;span style="color:blue;"&gt;string&lt;/span&gt;)xdocGeoRSS.Element(&lt;span style="color:#a31515;"&gt;&amp;quot;title&amp;quot;&lt;/span&gt;); &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;hlPageLinkMain.NavigateUri = &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:blue;"&gt;new&lt;/span&gt; &lt;span style="color:#2b91af;"&gt;Uri&lt;/span&gt;((&lt;span style="color:blue;"&gt;string&lt;/span&gt;)xdocGeoRSS.Element(&lt;span style="color:#a31515;"&gt;&amp;quot;link&amp;quot;&lt;/span&gt;)); &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-spacerun:yes;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;&lt;span style="color:green;"&gt;// Etc... &lt;/span&gt;&lt;/span&gt;    &lt;p&gt;&lt;/p&gt; &lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;There’s a problem, however: the proxy page often fails to properly download XML data. So you may need to modify the page to handle GeoRSS XML properly.&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Modifying the ESRI Proxy Page&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;If you’ve decided you need a proxy page to get XML data for your application, you may have downloaded and tried the ESRI &lt;a href="http://resources.esri.com/help/9.3/arcgisserver/apis/javascript/arcgis/help/jshelp/ags_proxy.htm"&gt;proxy page&lt;/a&gt;.&lt;/p&gt;  &lt;p&gt;There’s a problem with the page as it’s implemented, and it’s in the one line that does all the work of the proxy page:&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:blue;font-size:10pt;mso-no-proof:yes;"&gt;byte&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;[] outb = br.ReadBytes((&lt;span style="color:blue;"&gt;int&lt;/span&gt;)serverResponse.ContentLength); &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The &lt;a href="http://msdn.microsoft.com/en-us/library/system.net.httpwebrequest.contentlength.aspx"&gt;ContentLength&lt;/a&gt; property returns the value of the HTTP “Content-Length” header; but a quick &lt;a href="http://www.bing.com/search?q=content-length+missing&amp;amp;form=QBLH&amp;amp;qs=n&amp;amp;adlt=strict"&gt;web search&lt;/a&gt; shows that this property is commonly incorrect or missing. A more robust approach is to read data from the response stream until there’s none left:&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';color:blue;font-size:10pt;mso-no-proof:yes;"&gt;while&lt;/span&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt; ((array = reader.ReadBytes(4096)).Length &amp;gt; 0) { &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;&lt;span style="mso-tab-count:1;"&gt;&amp;#160;&amp;#160;&amp;#160;&amp;#160;&amp;#160; &lt;/span&gt;// Append this 4K chunk to the previously read chunks &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p style="line-height:normal;margin-bottom:0pt;mso-layout-grid-align:none;" class="MsoNormal"&gt;&lt;span style="font-family:'Courier New';font-size:10pt;mso-no-proof:yes;"&gt;} &lt;/span&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;&lt;/p&gt;  &lt;p&gt;The resulting modified is available &lt;a href="http://resources.esri.com/arcgisserver/adf/dotnet/index.cfm?fa=codeGalleryDetails&amp;amp;scriptID=16476"&gt;here&lt;/a&gt; on &lt;a href="http://arcscripts.esri.com/"&gt;ArcScripts&lt;/a&gt;..&lt;/p&gt;  &lt;p&gt;&lt;b&gt;&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;&lt;b&gt;Local data and absolute URLs&lt;/b&gt;&lt;/p&gt;  &lt;p&gt;While developing your application, you’ll probably read your target XML data source many, many times; but you probably won’t need the latest data. You might want to temporarily use a static local snapshot of the data in order to avoid putting a heavy load on the remote server.&lt;/p&gt;  &lt;p&gt;&lt;img src="http://blogs.esri.com/Dev/photos/apl/images/7128/original.aspx" /&gt;&lt;/p&gt;  &lt;p&gt;The snag is that the WebClient methods need an absolute URL path, not a relative one. You could just hardcode the XML file’s web server location in your call to WebClient.&lt;a href="http://msdn.microsoft.com/en-us/library/system.net.webclient.downloadstringasync.aspx"&gt;DownloadStringAsync&lt;/a&gt;; or you could add a little code to convert a relative file path to an absolute URL location. There’s a short, useful &lt;a href="http://timstall.dotnetdevelopersjournal.com/silverlight_20_convert_relative_url_paths_to_absolute.htm"&gt;blog entry&lt;/a&gt; on just this subject at the .NET Developer’s Journal website.&lt;/p&gt;  &lt;p&gt;This small routine will convert a local “file://” reference to an “http://” style reference. With this approach, it’s easy to use a local file in the same manner as a remote XML feed. And using conditional compilation statements, switching between local and remote sources is as simple as changing your project configuration from the &lt;a href="http://msdn.microsoft.com/en-us/vstudio/default.aspx"&gt;Visual Studio&lt;/a&gt; dropdown list.&lt;/p&gt;  &lt;p&gt;&lt;img src="http://blogs.esri.com/Dev/photos/apl/images/7129/original.aspx" width="586" height="307" /&gt;&lt;/p&gt;  &lt;p&gt;There is, of course, much more involved in effectively accessing and using XML data in your .NET application. But hopefully these tips will help route you around some of the trickier snags in the process.&lt;/p&gt;  &lt;p&gt;&lt;em&gt;Contributed by Mark D.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=7131" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term=".NET" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/.NET/default.aspx" /><category term="ASP.NET" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ASP.NET/default.aspx" /><category term="Proxy" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Proxy/default.aspx" /><category term="GeoRSS" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/GeoRSS/default.aspx" /></entry><entry><title>What would happen if the Earth stopped spinning?</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/17/What-would-happen-if-the-Earth-stop-spinning_3F00_.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/17/What-would-happen-if-the-Earth-stop-spinning_3F00_.aspx</id><published>2009-07-17T18:12:38Z</published><updated>2009-07-17T18:12:38Z</updated><content type="html">&lt;p&gt;This &lt;a href="http://www.esri.com/software/arcgis/"&gt;map&lt;/a&gt; illustrates (the very impossible, but intellectually exciting) scenario of the &lt;a href="http://en.wikipedia.org/wiki/Earth"&gt;Earth&lt;/a&gt; standing still.&amp;#160; If the Earth stopped spinning, the only remaining force that could affect our &lt;a href="http://en.wikipedia.org/wiki/Oceans"&gt;oceans&lt;/a&gt; is &lt;a href="http://en.wikipedia.org/wiki/Gravity"&gt;gravity&lt;/a&gt;.&amp;#160; Oceanic water would migrate to the &lt;a href="http://en.wikipedia.org/wiki/Polar_region"&gt;polar regions&lt;/a&gt; where the Earth’s gravitation forces are strongest create two large polar oceans.&amp;#160; In a few areas, such as the &lt;a href="http://en.wikipedia.org/wiki/Gulf_of_Mexico"&gt;Gulf of Mexico&lt;/a&gt;, the ocean’s water would pool to form giant inland seas.&lt;/p&gt;  &lt;p&gt;Following the global ocean shift, a new and enormous continent would form around the equatorial region.&amp;#160; The red line in the image below represents the global divide in &lt;a href="http://en.wikipedia.org/wiki/Hemisphere"&gt;hemispherical&lt;/a&gt; &lt;a href="http://en.wikipedia.org/wiki/Watershed"&gt;watersheds&lt;/a&gt; of the two great oceans.&lt;/p&gt;  &lt;p&gt;&lt;a href="http://blogs.esri.com/Dev/photos/apl/images/7126/original.aspx"&gt;&lt;img src="http://blogs.esri.com/Dev/photos/apl/images/7126/original.aspx" width="587" height="296" /&gt;&lt;/a&gt; &lt;/p&gt;  &lt;p&gt;&lt;em&gt;Contributed by Witold F.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=7130" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="Ocean Currents" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Ocean+Currents/default.aspx" /><category term="Gravity" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Gravity/default.aspx" /></entry><entry><title>Microsoft Surface Videos</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/02/Test.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/02/Test.aspx</id><published>2009-07-02T17:53:46Z</published><updated>2009-07-02T17:53:46Z</updated><content type="html">&lt;p&gt;The &lt;a href="http://blogs.esri.com/Dev/blogs/apl/"&gt;Applications Prototype Lab&lt;/a&gt; at &lt;a href="http://www.esri.com/"&gt;ESRI&lt;/a&gt; received a &lt;a href="http://www.microsoft.com/surface/"&gt;Microsoft Surface&lt;/a&gt; a few months ago.&amp;#160; The Surface is a vertical mounted &lt;a href="http://en.wikipedia.org/wiki/Multi-touch"&gt;multi-touch&lt;/a&gt; (and multi-user) screen.&amp;#160; Below are a list of recent prototypes developed for the Surface using (with one exception) the &lt;a href="http://resources.esri.com/arcgisserver/apis/silverlight/"&gt;ArcGIS API for WPF&lt;/a&gt;.&lt;/p&gt;  &lt;h4&gt;GeoEye Imagery Explorer&lt;/h4&gt;  &lt;p&gt;This video demonstrates an application built for the Microsoft Surface using the ArcGIS API for WPF. Background map content is provided by &lt;a href="http://www.esri.com/software/arcgis/arcgisonline/index.html"&gt;ArcGIS Online&lt;/a&gt;. The application displays footprints from &lt;a href="http://www.geoeye.com"&gt;GeoEye's&lt;/a&gt; satellite image catalog. The presenter demonstrates how to select and manipulate thumbnails of GeoEye imagery.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/zbnfsk2lesU" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;h4&gt;Terrain Profile Computation&lt;/h4&gt;  &lt;p align="justify"&gt;This video demonstrates an application built for the Microsoft Surface using the ArcGIS API for WPF. Background map content is provided by ArcGIS Online. This application display the terrain profile of a line drawn by the presenter on the surface. The terrain analysis is done using a remote &lt;a href="http://edndoc.esri.com/arcobjects/9.2/net/shared/geoprocessing/geoprocessing/what_is_geoprocessing_qst_.htm"&gt;geoprocessing&lt;/a&gt; service hosted by ArcGIS Server.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/iYrCYjMYxYU" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;&amp;lt;   &lt;h4&gt;Message in a Bottle&lt;/h4&gt;  &lt;p&gt;This video demonstrates an application built for the Microsoft Surface using the ArcGIS API for WPF. Background map content is provided by ArcGIS Online. When the presenter touches a location on the ocean, a line drawn that displays where a object in the sea would travel in 365 days based on &lt;a href="http://en.wikipedia.org/wiki/Ocean_current"&gt;ocean currents&lt;/a&gt;. The analysis is being performed by a remote geoprocessing service hosted by ArcGIS Server.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/pvjUWvC5pZ0" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;h4&gt;ArcGIS Engine Globe Control&lt;/h4&gt;  &lt;p&gt;This video demonstrations an &lt;a href="http://msdn.microsoft.com/en-us/xna/default.aspx"&gt;XNA&lt;/a&gt; application build for the Microsoft Surface using the &lt;a href="http://www.esri.com/software/arcgis/arcgisengine/index.html"&gt;ArcGIS Engine&lt;/a&gt; &lt;a href="http://edndoc.esri.com/arcobjects/9.2/ComponentHelp/esricontrols/GlobeControl.htm"&gt;Globe control&lt;/a&gt;. The presenter shows how the Surface API has been used to control globe navigation and the use tagged values to change globes appearance or behavior.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/curRl8RysVI" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;h4&gt;Drive Time Geoprocessing&lt;/h4&gt;  &lt;p&gt;This video demonstrates an application built for the Microsoft Surface using the ArcGIS API for WPF. Background map content is provided by ArcGIS Online. When the presenter touches the surface a request is sent a remote server running &lt;a href="http://www.esri.com/software/arcgis/arcgisserver/index.html"&gt;ArcGIS Server&lt;/a&gt; to perform drive time analysis. The results are then returned to (and displayed) on the Surface.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/nWiRCMp05ZE" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;h4&gt;CCM Analysis&lt;/h4&gt;  &lt;p&gt;This video demonstrates an application built for the Microsoft Surface using the ArcGIS API for WPF. In this example, the presenter is showing a geographic operation called &amp;quot;cross country mobility&amp;quot; with the aid of tagged objects. The objects represent parameters of units ability to traverse the cost surface.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/U30NhUPn2fQ" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;h4&gt;CalTrans Traffic Viewer&lt;/h4&gt;  &lt;p&gt;This video demonstrates an application built for the Microsoft Surface using the ArcGIS API for WPF. Background map content is provided by ArcGIS Online. The map displays push pins for &lt;a href="http://www.dot.ca.gov/"&gt;CalTrans&lt;/a&gt; traffic cameras, when pressed, live camera images are displayed on the Surface.&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/8I3yFH1Uu4k" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;h4&gt;USGS Earthquake GeoRSS Feed&lt;/h4&gt;  &lt;p&gt;This video demonstrates an application built for the Microsoft Surface using the ArcGIS API for WPF. Background map content is provided by ArcGIS Online. The Surface map is displaying icons for recent earthquakes. The earthquake information is provide by a &lt;a href="http://georss.org"&gt;GeoRSS&lt;/a&gt; feed published by the &lt;a href="http://www.usgs.gov/"&gt;USGS&lt;/a&gt;. When the presenter clicks on a earthquake icon, a request is sent to a remote geoprocessing service running on ArcGIS Server. The service returns the number of people within a hundred miles radio of the earthquake.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/C3fChE08vRs" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;   &lt;p&gt;&lt;/p&gt;  &lt;h4&gt;ArcGIS Online&lt;/h4&gt;  &lt;p&gt;This video demonstrates an application built for the Microsoft Surface using the ArcGIS API for WPF. Background map content is provided by ArcGIS Online. The presenter shows how the multi-touch surface can be used to navigate around the map. The presenter also shows an innovative &amp;quot;virtual magnifying glass&amp;quot; for revealing more detail.&lt;/p&gt;  &lt;p&gt;&lt;/p&gt; &lt;embed src="http://www.youtube.com/v/32lTdmXox1E" type="application/x-shockwave-flash" width="425" height="355"&gt;&lt;/embed&gt;  &lt;p&gt;&lt;em&gt;Contributed by John G.&lt;/em&gt;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=6739" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="ArcGIS API for WPF" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ArcGIS+API+for+WPF/default.aspx" /><category term="Microsoft Surface" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Microsoft+Surface/default.aspx" /></entry><entry><title>Welcome to the Applications Prototype Lab Blog!</title><link rel="alternate" type="text/html" href="http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/01/Welcome-to-the-Applications-Prototype-Lab-Blog_2100_.aspx" /><id>http://blogs.esri.com/Dev/blogs/apl/archive/2009/07/01/Welcome-to-the-Applications-Prototype-Lab-Blog_2100_.aspx</id><published>2009-07-02T00:28:00Z</published><updated>2009-07-02T00:28:00Z</updated><content type="html">&lt;p&gt;The Applications Prototype Lab is a group working at ESRI's headquarters in Redlands, California.  The group is tasked with winning competitive software competitions, conducting applied research and creating innovative proof-of-concepts.  This blog will contain a variety of posts ranging from tips and tricks to recently completed prototypes.  Overall we hope that the contents of this blog will be interesting, thought provoking and educational.&lt;/p&gt;&lt;p&gt;&amp;nbsp;&lt;/p&gt;&lt;img src="http://blogs.esri.com/Dev/aggbug.aspx?PostID=6713" width="1" height="1"&gt;</content><author><name>apl2009</name><uri>http://blogs.esri.com/Dev/members/apl2009.aspx</uri></author><category term="Prototype Lab" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/Prototype+Lab/default.aspx" /><category term="ESRI" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/ESRI/default.aspx" /><category term="GIS" scheme="http://blogs.esri.com/Dev/blogs/apl/archive/tags/GIS/default.aspx" /></entry></feed>