Visually Located

XAML and GIS

2012 Developer Summit must watch videos

If you haven’t heard, the videos for the 2012 ArcGIS Developer Summit are now finally available. The day one plenary was available the very next day so I have no idea why it took a month to get the session videos out. The videos I’m going to recommend are from the perspective of someone who has worked with ArcGIS Server for more than 4 years. My team built the very first custom Server Object Extension (SOE). I helped redesign the Telvent Silverlight SDK, and and I see a strong need for more mobile apps. These videos are ordered. Sesions I attended Building Web Editing Applications with ArcGIS 10.1 for Server-by Gary MacDougall and Ismael Chivite Hands down the best session in terms of content. I was floored to see all of the new editing functionality within ArcGIS Server. I had been working with ArcGIS Server 10.1 the first week that Beta 1 went out, but I had never been able to test or investigate the new editing. ArcGIS Server for Administrators-by Ismael Chivite and Jay Theo... [More]

Using extension methods to iterate ArcGIS COM collections

I’m a big fan of .Net and all the glory that it offers. So when I’m developing against ArcGIS COM objects I cry a little inside. Working with COM objects in .Net is not fun. C# 4.0 made this a little better by improving the code generated by interop. Example code to get an indexed property within .Net from a COM object with VS2008 int fieldIndex = 2; IRow row = cursor.NextRow(); object value = row.get_Value(fieldIndex); Example code to get an indexed property within .Net from a COM object with VS2010 int fieldIndex = 2; IRow row = cursor.NextRow(); object value = row.Value[fieldIndex]; Notice the difference? It’s in the last line where we get the value for the field. Not only do you not need the get_XXX prefix, but you use square brackets. It’s actually an indexed property now! Small things like this make working with ArcObjects a little better, but there is still a lot more that can be done. One area that always ... [More]

Managing Extents within the ArcGIS WPF/Silverlight/etc. APIs

Managing extents within the ArcGIS .Net client API’s is pretty simple. Esri has an example on the resources page. I implemented one for the ArcFM Silverlight SDK sample. Oddly enough, they are quite similar. I don’t remember copying theirs, but you never know. Like most things we as developers do, after a couple of years you look back and wonder “What was I thinking?” I look back at my original code and wonder why did I implement the Extents class the way that I did. I originally used one List to hold all of the Extents. This made some of the code pretty ugly. I’ve created a different implementation that utilizes two stacks. I have one class that manages all of the extents: 1: public class Extents 2: { 3: private readonly Stack<Envelope> _backStack = new Stack<Envelope>(); 4: private readonly Stack<Envelope> _forwardStack = new Stack<Envelope>(); 5:  6: public bool HasPrevi... [More]

Using the Silverlight 5 PivotViewer with ArcGIS Silverlight

Pivot was originally released as a demonstration project that was a separate download from Silverlight itself. At version 5, Pivot becomes part of the Silverlight family. Pivot allows users the ability to visualize their data. Puts the power of filtering and grouping their data without the need to learn complex SQL statements. The original version of Pivot required you to have an XML representation of the data, and images that it would display. This required extra work for the developer, or web administrator to create this data from their data store. With Silverlight 5, you now have the ability to bind to any property that your class has. It also allows you the ability to create what’s known as trading cards with XAML. These cards replace the images you previously needed. You can even define at what stage you want a trading card to display. By defining different trading cards at different levels, you can give the user more information the more they filter down their data. When I... [More]