|
POST
|
Hi, I have written a functionality where I use QueryTask to search for a road(Polyline).. I have been able to locate the road and highlight it using a graphiclayer and QueryTask.. I want to know how I can show the attribute RoadName on the polyline element parallel to the geometry....
... View more
09-06-2011
04:43 AM
|
0
|
1
|
478
|
|
POST
|
Hi, I had exported data from the server as oracle dump,, now I have imported the same into my new server all the tables are visible but I don't see my feature classes only the attribute table are available.. I am missing something here.. do I need to export the sde user also bcoz I missed that now I don't have tat data i only have the attribute table with shape field is there anything I can do to get my feature class back I am using ArcGIS Server 10 with Silverlight ad Oracle 11g with ArcSDE as database
... View more
08-22-2011
05:35 AM
|
0
|
1
|
720
|
|
POST
|
Hi thanks for your reply.. I have gone through the sample but it is same as the above code as it also iterates through every service My problem is that I have about 10 services running and iterating through 10 services takes more time so my identify tool works slow, populating the layername from the results into the combobox take a long time about2 seconds for each ltem my code goes like this private void QueryPoint_MouseClick(object sender, ESRI.ArcGIS.Client.Map.MouseEventArgs e)
{
// create identifyParams object
IdentifyParameters identifyParams = new IdentifyParameters()
{
Geometry = mapPoint,
//Tolerance = 50,
MapExtent = mainPage.map.Extent,
Width = (int)mainPage.map.ActualWidth,
Height = (int)mainPage.map.ActualHeight,
LayerOption = LayerOption.visible,
SpatialReference = mainPage.map.SpatialReference
};
// store all the available services in to myMapService stack
storeMapServices();
identifyTask.Url = myMapService.Pop();
identifyTask.ExecuteAsync(identifyParams, identifyParams);
} void identifyTask_ExecuteCompleted(object sender, IdentifyEventArgs e)
{
if (e.IdentifyResults != null && e.IdentifyResults.Count > 0)
{
boolNeedReset = false;
//get Layerkeyfield and add identify results to dictionary
ShowFeatures(e.IdentifyResults);
}
if (tempInt < 2)
{
identifyTask.Url = myMapService.Pop();
IdentifyParameters identifyParams = e.UserState as IdentifyParameters;
identifyTask.ExecuteAsync(identifyParams, identifyParams);
}
} public void ShowFeatures(List<IdentifyResult> results)
{
int intFeatureCount = 0;
//Get the Layer Key Field
DataAccessService.DataAccessServiceClient dataAccessServiceClient = new DataAccessService.DataAccessServiceClient();
dataAccessServiceClient.getLayerKeyIDAsync(results[0].LayerName);
dataAccessServiceClient.getLayerKeyIDCompleted += ((s, e) =>
{
if (e.Result != string.Empty && e.Result != null)
{
kvpLayerKeyField.Add(results[0].LayerName, e.Result);
foreach (IdentifyResult result in results)
{
if (!kvpIdentifyResults.Keys.Contains(Convert.ToInt32(results[intFeatureCount].Feature.Attributes[e.Result])))
{
kvpIdentifyResults.Add(Convert.ToInt32(results[intFeatureCount].Feature.Attributes[e.Result]), results[intFeatureCount].LayerName);
intFeatureCount++;
}
}
//add identified layernames to combobox
IdentifyComboBox.Items.Add(results[0].LayerName);
}
});
}
Is there any other way to get mouse map pointer clicked element attributes form other then Identifytask?
... View more
08-10-2011
09:46 PM
|
0
|
0
|
552
|
|
POST
|
Hey thank you soo much for the code it was of great help.. However as we are using multiple services the the iteration is more as it iterates completely for every service.. is there a way where I can reduce the time taken for execute the complete program?
... View more
08-05-2011
11:35 PM
|
0
|
0
|
1066
|
|
POST
|
thanx for the code it worked like a charm 🙂 Hi santoshf2, Which kind of projection are you using ? If you are using the "standard" projection of ArcGIS Server, the map is in WebMercator format. If you want to have a projection similar as Google or Bings, you must convert this format into WGS 84. There is a class on API to help you to make the convertion. See what I have do on my project : [PHP] private WebMercator webMercator = new WebMercator(); private void OnMapMouseMove(object sender, MouseEventArgs e) { if (Map == null) { return; } Point screenPoint = e.GetPosition(Map); MapPoint webMercatorMapPoint = Map.ScreenToMap(screenPoint); if (webMercatorMapPoint != null) { MapPoint wsg86MapPoint = (MapPoint)webMercator.ToGeographic(webMercatorMapPoint); Y = wsg86MapPoint.Y; // latitude in decimal X = wsg86MapPoint.X; // longitude in decimal } }[/PHP] If you wanted to show this result into degree/minute/second, you may easily find the good formula on google. Regards Jérôme
... View more
04-22-2011
04:52 AM
|
0
|
0
|
754
|
|
POST
|
HI, I implemented an eventhandler that shows map co-cordinates when mouse hovers on the map. I followed this tutorial http://resources.esri.com/help/9.3/a...tm#MouseCoords But I get numbers (example: X=1313829.334, Y=2801189.49) for coordinates instead . I looked at the web service where the map data is coming out of, and noticed that the big numbers seem to be representing the map extent?(XMin: 1315433.26465964 YMin: 280294.468654908 XMax: 1318786.62214751 YMax: 283455.239814947) but I want to show the lat/long in degree minutes and seconds I have seen read a few post but never manged to get it working.. Please to help me in this regards
... View more
04-21-2011
02:33 AM
|
0
|
3
|
1289
|
|
POST
|
Hi, I am using esri Legend component successfully but when I use QueryTask and return the geometry I assign a custom symbol. for eg private void QueryTask_ExecuteCompleted(object sender, ESRI.ArcGIS.Client.Tasks.QueryEventArgs args)
{
FeatureSet featureSet = args.FeatureSet;
if (featureSet != null && featureSet.Features.Count > 0)
{
Graphic selectedFeature = null;
for (int i = 0; i < featureSet.Features.Count; i++)
{
// Show selected feature attributes in DataGrid
selectedFeature = featureSet.Features;
selectedFeature.Symbol = ColorMarkerSymbol;
graphicsLayer.Graphics.Add(selectedFeature);
}
}
} now how do I just use the default symbol to be shown on the map please help also I have issues with Legend.LayerIDs it gives me a error when I give my featurelayer name Please do help
... View more
04-05-2011
04:42 AM
|
0
|
1
|
707
|
|
POST
|
well I tried the above code but it does not seem to work.. can you please be a little more elaborate thank you with little changes the code worked fine.. the code goes like this if (e.LayerItem.Layer.ID == "Districtsfl" && e.LayerItem.LegendItems != null)
{
var legendItemsToDelete = e.LayerItem.LegendItems.Where(item => item.Label != "Districtsfl").ToList();
foreach(var item in legendItemsToDelete)
if (item.Label != "Bagalkot")
{
e.LayerItem.LegendItems.Remove(item);
}
}
... View more
04-05-2011
02:35 AM
|
0
|
0
|
613
|
|
POST
|
The legend of a FeatureLayer doesn't contain any sub layers ==> we get the legend items (swatch+label) directly from the map layer item. So your code should be something like:
if (e.LayerItem.Layer.ID ="Points of Interest" && e.LayerItem.LegendItems != null)
{
var legendItemsToDelete = e.LayerItem.LegendItems.Where(item => item.Label != "WEBRIS.SPL_ROADS").ToList();
foreach(item in legendItemsToDelete)
e.LayerItem.LegendItems.Remove(item);
}
well I tried the above code but it does not seem to work.. can you please be a little more elaborate
... View more
04-01-2011
09:28 PM
|
0
|
0
|
613
|
|
POST
|
The legend is not taking care of the current 'Where' clause. You can do this by code. Hook up an handler to the 'Refreshed' legend event and in this handler remove the legend items you don't want to see in the legend control. Hi thnx for the reply I used the following code ESRI.ArcGIS.Client.Toolkit.Primitives.LayerItemViewModel removeLayerItemVM = null;
if (e.LayerItem.LayerItems != null)
{
foreach (ESRI.ArcGIS.Client.Toolkit.Primitives.LayerItemViewModel layerItemVM in e.LayerItem.LayerItems)
{
//if (layerItemVM.LegendItems != null && layerItemVM.LegendItems.Any())
// layerItemVM.ImageSource = layerItemVM.LegendItems.First().ImageSource;
e.LayerItem.LayerItems.Remove(removeLayerItemVM);
if (layerItemVM.IsExpanded)
layerItemVM.IsExpanded = false;
if (layerItemVM.Label != "WEBRIS.SPL_ROADS")
removeLayerItemVM = layerItemVM;
}
if (removeLayerItemVM != null)
e.LayerItem.LayerItems.Remove(removeLayerItemVM);
}
else
{
e.LayerItem.IsExpanded = false;
} I am able to get the layer name but I want to display only some subtype how do I do tat for eg under State I want to select/show only Alabama with symbol on the Legend am I missing something here?
... View more
04-01-2011
02:06 AM
|
0
|
0
|
613
|
|
POST
|
HI, I am using the legend referring the SampleLegend example but here the legend shows all the symbols from the service. I have used a where clause <esri:FeatureLayer ID="Points of Interest" Where="type ='2'"
Url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Fire/Sheep/MapServer/0" /> so I want the Legend to display the symbol of type 2 only is this possible.. how do I do this please guide
... View more
03-31-2011
04:03 AM
|
0
|
5
|
982
|
|
POST
|
HI, I have created an oracle view which I will be using to create an layer using MakeRouteEventLayer (Linear Referencing)from ArcToolBox but I see that I am unable to do this as the view is not getting registered with Geodatabase Is this because I don't have an column with objectid? if yes then what is the solution, should I create an sde view coz the syntax looks difficult and my oracle query to create the view is a bit complex please suggest/correct me on this
... View more
03-31-2011
01:58 AM
|
0
|
1
|
2759
|
|
POST
|
Hi I have created a layer in ArcMAP using Make Route Event Layer(ArcToolBox) from a view created in oracle but I am unsure if I am doing it right here.. I have created views in Oracle, is it tat I have to create a view of tables in ArcSDE called arcsde views as mentioned below http://webhelp.esri.com/arcgisdesktop/9.2/index.cfm?TopicName=Using_database_views Please guide...
... View more
03-08-2011
01:55 AM
|
0
|
1
|
754
|
|
POST
|
Thank you for replying I am drawing data form oracle database thro ArSDE (my 1st theory is I am using Oracle 11g R2 with ArcSDE 9.3.1, the document shows sde support only for Oralce 11gR1 as am using 32 bit OS) Is this the problem I am also not able to Create routes(add Measure values) the process keeps running no message displayed should I change my server from Oracle 11gR2 to Oralce 11gR1 or may be use ArcSDE 10?
... View more
03-03-2011
03:58 AM
|
0
|
0
|
1143
|
|
POST
|
HI, I have installed ArcGIS Server 10 on Oracle 11g R2 along with ArcSDE 9.3.1 I am experiencing trouble in create routes(Arc Toolbox) is my installation combination right? or do I need to use Oracle 11gR1 as database server also I am unable to find ArcSDE 10 download from www.customers.esri.com Please guide I am stuck here
... View more
03-03-2011
03:06 AM
|
0
|
1
|
654
|
| Online Status |
Offline
|
| Date Last Visited |
09-07-2025
09:04 AM
|