April 16, 2008
One of the very common operations programmers do in ArcObjects is adding a layer to the Map. To do this there are two ways, one using IMap.AddLayer or IMapLayers.AddLayer.
IMap.AddLayer adds the new layer on the top of all the layers in the map. This is not very useful as we normally want the point layers at the top followed by polyline followed by polygon layers. Adding polygon layers at the top would mask all other layers below.
IMapLayers.AddLayer is preferable because it has an option to autoArrange the newly added layer in the table of contents. If autoArrange is set to TRUE, the layer is added in the proper position as by its weight specified via ILayerPosition::LayerWeight. By default, this means that the layers are sorted by layer type - Annotation layers on top, followed by Point geometry layers, Polyline geometry layers, and at the bottom Polygon geometry layers.
No Comments » |
.Net, GIS | Tagged: ESRI |
Permalink
Posted by Amit
October 26, 2007
A common scenario that ArcObjects developers come across is creating a button or tool in ArcMap whose image changes when clicked.
Example: Say you wish to create a “LogOn” button whose bitmap needs to change to “LogOff” bitmap once the user has logged in.
Just setting base.m_bitmap to the new bitmap does not update the bitmap in ArcMap. Instead you need to use the BaseCommand.UpdateBitmap method.
Per ESRI .Net documentation:
UpdateBitmap changes the Bitmap for the command. Call this method to update the icon used for the command at runtime, after the command has already been instantiated.
No Comments » |
.Net, GIS |
Permalink
Posted by Amit
December 5, 2006
Microsoft has changed the name of Expression to “Blend”. This is the third name I ‘ve heard of the product, initial being Sparkle, then Expression, now Blend.
Also, Expressions is out of beta now.
No Comments » |
.Net |
Permalink
Posted by Amit