POST
|
Here is the code that I used to get it to work. Chris
private void TextBlock_MouseEnter(object sender, MouseEventArgs e)
{
QueryResultData HiLight = (QueryResultData)(sender as FrameworkElement).DataContext;
Graphic g = getGraphic(HiLight);
g.Symbol = SearchSelectedSymbol;
if (g != null)
{
g.Select();
g.SetZIndex(1);
}
}
private void TextBlock_MouseLeave(object sender, MouseEventArgs e)
{
QueryResultData HiLight = (QueryResultData)(sender as FrameworkElement).DataContext;
Graphic g = getGraphic(HiLight);
g.Symbol = SearchPictureSymbol;
if (g != null)
{
g.Select();
g.SetZIndex(0);
}
}
private Graphic getGraphic(QueryResultData HiLight)
{
GraphicsLayer layer = MyMap.Layers["MyGraphicsLayer"] as GraphicsLayer;
if (HiLight != null && layer != null)
{
foreach (Graphic g in layer.Graphics)
{
if (g.Geometry == HiLight.SHAPE)
{
return g;
}
}
}
return null;
}
... View more
10-29-2010
08:52 AM
|
0
|
0
|
388
|
POST
|
Hey, I have the results from a querytask in a drop down window. The locations are displayed with a graphic. I was wondering how to highlight or change the graphic when you mouse over the results in the dropdown window. I would like the user to know which graphic goes with the result. Thanks, Chris
... View more
10-15-2010
10:38 AM
|
0
|
4
|
2739
|
POST
|
Another way to do this is to prepare a theissen polygon layer first, put that in your service but don't draw it, and then you will only need one call to get the closest polygon ID with a simple query. You can make a theissen polygon directly if you have input points. Otherwise, you will need to use the feature to points command in Arcmap to turn the polygon vertices into points, then use the create theissen polygons with the all fields option. This will put a polygon around each point with the id of the polygon attached to each point. Next dissolve on the input fid to make one theissen polygon per input polygon (this is not really necessary, but will give a more generalized data set). Now you a data layer that allows you to click on the map and bring back the id of the closest polygon. Chris
... View more
09-09-2010
10:35 AM
|
0
|
0
|
1019
|
POST
|
Hey, Does VS 2010 include expression blend, or are they separate products. I thought that I saw somewhere that you no longer needed expression blend because visual studio 2010 had a visual interface for xaml. Any insight on this? Chris
... View more
09-01-2010
01:52 PM
|
0
|
8
|
6009
|
POST
|
I figured out how to extend the polylines within the polygon using IConstructCurve.ConstructExtended. Now I just have to figure out how to trim the polylines outside of the polygon. Chris
... View more
07-14-2010
11:10 AM
|
0
|
0
|
244
|
POST
|
Hey, I have some transect lines (polylines) going over a polygon. These lines can overrun or stop short of the polygon boundaries. I would like to snap them to the polygon boundaries. I can get it to work using the advanced editing tool for extend and trim, but I need to do this programatically. Does anybody know how to make these tool work programatically? I tried calling the command, but since you need a mouse click to get it to work in ArcMap, I couldn't figure out how to get it to function. Thanks, Chris
... View more
07-13-2010
01:24 PM
|
0
|
1
|
509
|
POST
|
Duncan, Thanks for the help. I am using C#, so it is a bit different from VB. I have to use the ICursor, but the rest was like yours.
ICursor pCursor;
pSelectionSet.Search(null, false, out pCursor);
IFeatureCursor pFeatureCursor = (IFeatureCursor)pCursor;
IFeature pFeature = pFeatureCursor.NextFeature();
inpolyline = (IPolyline)pFeature.Shape;
... View more
07-07-2010
11:02 AM
|
0
|
0
|
384
|
POST
|
Here is the website with the arcmap command guids. http://resources.esri.com/help/9.3/ArcGISDesktop/dotnet/858a508c-b771-467c-81e6-c6aa72d88f9c.htm The guids are only for the tools and buttons. You will have to create a command, and use the geoprocessor function to integrate the "make xy event layer" into a tool that has a guid. Check out this link: http://edndoc.esri.com/arcobjects/9.2/NET/0bf044f6-dbcd-4d04-836e-3b5e47204818.htm (this is 9.2, they probably have it in 9.3) Chris
... View more
06-18-2010
01:31 PM
|
0
|
0
|
366
|
POST
|
Hey, I am trying to use the construct offset example, which is basically a copy parallel command. I have a selected polyline feature and I am trying to use the selected feature as an Ipolyline input for the construct offset method. How do you cast the feature selection to a polyline? This is for a tool in ArcMap 9.3.1 Thanks, Chris
pFeatureSelection = (IFeatureSelection)pLayer;
pSelectionSet = pFeatureSelection.SelectionSet;
IPolyline inpolyline = null;
ICursor pCursor;
pSelectionSet.Search(null, false, out pCursor);
inpolyline = (IPolyline)pFeatureSelection; <== crashes here
ConstructOffset(inpolyline, offset);
... View more
06-18-2010
12:16 PM
|
0
|
2
|
999
|
POST
|
Hey, I am trying to add a pointcollection into a feature class using the IEnumVertex2 interface. When I try to instantiate the enumVertex, I get the loader lock error. Here are some code snippets: IMultipoint pMultiPoint; pMultiPoint = new MultipointClass(); IPointCollection5 pPointCollection; pPointCollection = (IPointCollection5)pMultiPoint; //I add some points to the point collection IGeometryBridge2 gBridge = new GeometryEnvironmentClass(); gBridge.AddPoints(pPointCollection, ref pPoint); // it dies here with a loader lock error -- the pIEnumVertex is null. IEnumVertex2 pIEnumVertex = (IEnumVertex2)pPointCollection.EnumVertices; IPoint queryVertex = new PointClass(); int pIndex; int vertIndex; IPoint outVertex; pIEnumVertex.Next(out outVertex, out pIndex, out vertIndex); Any ideas what is going wrong? What is the best way to place a point collection into a feature class? Thanks, Chris
... View more
06-09-2010
10:07 AM
|
0
|
0
|
489
|
POST
|
Ryan, I would try to get the services into a common projection. That will help the map to load faster, and run faster. If you can't do that, you could just project the map click point coordinates. That is fairly quick, and then run the identify with the projected coordinates. Chris
... View more
06-04-2010
03:02 PM
|
0
|
0
|
405
|
POST
|
Charlie, You can only have maptips with feature layers. And as you have discovered, the feature layers will duplicate the layers in your services. It is like making a layer file in ArcMap. I gave up on map tips and went with an identify function instead. Chris
... View more
06-03-2010
02:07 PM
|
0
|
0
|
559
|
POST
|
Hey, I am using the layerlist sample to list a couple of dynamic layers in a dropdown menu. I have the visiblity turned off, but the layers are visible when the app starts up. When I move the mouse into the dropdown button, the layers will turn off (I don't have to check the boxes, the layers just turn off by themselves) and work correctly from then on. Does anybody know what initiates the layer update when the mouse enter event for the dropdown menu is activated? Thanks, Chris
... View more
05-03-2010
11:16 AM
|
0
|
0
|
532
|
Title | Kudos | Posted |
---|---|---|
1 | 02-23-2012 01:10 PM | |
1 | 08-24-2011 09:27 AM | |
2 | 11-10-2014 10:02 AM | |
6 | 08-03-2012 10:39 AM | |
5 | 08-03-2012 10:39 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|