POST
|
Hello everyone, I downloaded 3.0 api and started lots of problem. In 3.0 they removed lots of classes and members (http://resourcesbeta.arcgis.com/en/webapis/silverlight-api/concepts/#/What_s_new_in_3_0/0166000000m9000000/ refer remove items )which i was using and now i am not sure what to do? I want to use sceleunitbar,scalebar,uniquevaluerender.attribute,feature symbol for feature layer ,tool bar In api 3.0 I am not even able to write even simple marker symbol <esri:MarkerSymbol x:Key="ongoing" OffsetX="6.5" OffsetY="6.5"> <esri:MarkerSymbol.ControlTemplate> <ControlTemplate xmlns="http://schemas.microsoft.com/client/2007" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:vsm="clr-namespace:System.Windows;assembly=System.Windows"> <Grid RenderTransformOrigin="0.5,0.5"> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1" /> </TransformGroup> </Grid.RenderTransform> <Ellipse Width="13" Height="13" Stroke="White" StrokeThickness="2" Fill="#F6921E" HorizontalAlignment="Center" VerticalAlignment="Center" x:Name="Element" /> <VisualStateManager.VisualStateGroups> <VisualStateGroup x:Uid="SelectionStates" x:Name="SelectionStates"> <VisualState x:Uid="unselectedVs" x:Name="Unselected" > <Storyboard x:Uid="unselectedSb"> <ColorAnimation x:Uid="unselectColor" Storyboard.TargetName="Element" Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)" To="#F6921E" Duration="00:00:00.25"/> <ColorAnimation x:Uid="unselectColor1" Storyboard.TargetName="Element" Storyboard.TargetProperty="(Ellipse.Stroke).(SolidColorBrush.Color)" To="White" Duration="00:00:00.25"/> </Storyboard> </VisualState> <VisualState x:Uid="selectedVs" x:Name="Selected"> <Storyboard x:Uid="selectedSb"> <ColorAnimation x:Uid="selectedColor" Storyboard.TargetName="Element" Storyboard.TargetProperty="(Ellipse.Stroke).(SolidColorBrush.Color)" To="#FF1717" Duration="00:00:00.25"/> <ColorAnimation x:Uid="selectedColor1" Storyboard.TargetName="Element" Storyboard.TargetProperty="(Ellipse.Fill).(SolidColorBrush.Color)" To="#FFFF00" Duration="00:00:00.25"/> </Storyboard> </VisualState> </VisualStateGroup> </VisualStateManager.VisualStateGroups> </Grid> </ControlTemplate> </esri:MarkerSymbol.ControlTemplate> </esri:MarkerSymbol> Please help Thanks Foram
... View more
04-03-2012
02:01 PM
|
0
|
8
|
651
|
POST
|
Hello, I installed service pack and now everything is working fine. and i found why mymap.zoomtoresolution is not working its because i am using effect ESRI.PrototypeLab.ShyBasemap.TintShaderEffect effect = new ESRI.PrototypeLab.ShyBasemap.TintShaderEffect(); effect.TintColor = Color.FromArgb(255, 240, 240, 240); ArcGISTiledMapServiceLayer l = (ArcGISTiledMapServiceLayer)this.MyMap.Layers["BaseLayer"]; l.Effect = effect; so when i comment this code everything works fine in SL5 also but i want to give effect to basemap can you please help me?how to fix this bug?or any one know latest prototypelab's latest dll?which works on SL5 also? Please help, Thanks Foram
... View more
03-29-2012
10:53 AM
|
0
|
0
|
245
|
POST
|
Hello everyone, It may be silverlight problem not arcgis problem but if any one faces same problem please help me, I am working on silverlight arcgis application and application works gr8 on silverlight4 but i installed silverlight 5 and it started creating lots of problem 1) in silverlight 4 zoom in to location was working but in silverlight 5 if i try to aoom in to location it gives me some weird error Error: Unhandled Error in Silverlight Application Code: 1001 Category: RuntimeError Message: AG_E_UNKNOWN_ERROR MethodName: 2) Safari :- in silverlight 4 it was working perfectly fine in safari but in silverlight 5 i am not even able to view my page. you can check http://pipelineforthefuture.org and if you click on pipeline project data base it will work in IE but it will not work on safari. and also if you click any point (feature) on the map and click on zoom in to location you will see blank page it was working fine in silverlight 4 but what if client use silverlight 5? -------------------------------------------------------------------------------------- in visual studio i notice below problems. I installed silverlight 5 and silverlight dev run time 5 and i am able to debug it but 1) in project properties targetsilverlightversion it still says 4 not 5. 2) i am not able to view design window earlier if i click on design i can see my controls but now i am getting weird error in all pages System.NullReferenceException Object reference not set to an instance of an object. at Microsoft.Windows.Design.Platform.SilverlightMetadataContext.SilverlightXamlExtensionImplementations.<GetXmlNamespaceCompatibilityMappings>d__8.MoveNext() at MS.Internal.Design.Metadata.ReflectionProjectNode.BuildSubsumption() at MS.Internal.Design.Metadata.ReflectionProjectNode.SubsumingNamespace(Identifier identifier) at MS.Internal.Design.Markup.XmlElement.BuildScope(PrefixScope parentScope, IParseContext context.... 3) in my xmal page i am not able to see expand/Collapse widget any more i tried toggle outlining expansion and all but no luck. Please help, Thanks Foram
... View more
03-28-2012
01:15 PM
|
0
|
4
|
992
|
POST
|
hello every one, panning and zoom controls are disable while drawing the features.is there any way to activate it while drawing the features? Please help, Thanks Foram
... View more
03-22-2012
04:17 PM
|
0
|
1
|
2269
|
POST
|
Thanks jennifer no mode is specified in the feature layer. Thanks
... View more
02-28-2012
02:00 PM
|
0
|
0
|
223
|
POST
|
Hello everyone, How to reset full extend of feature layer? here is my situation i have written like fl.Geometry = fl.FullExtent; and it works fine but on one another click i have to set its extend like fl.Geometry = mapextend but again user click on home it should set back to fl.Geometry = fl.FullExtent; but it seems like it set as last geometry? can any one tell me how to reset feature layer to its full extend?means it should see all graphics of that layer. any help will be appropriated!!! Thanks Foram
... View more
02-27-2012
08:42 AM
|
0
|
2
|
760
|
POST
|
Hello everyone i am having trouble with map tip. <esri:GraphicsLayer ID="gpoly" MinimumResolution="0" MaximumResolution="10" > <esri:GraphicsLayer.MapTip > <Border BorderBrush="DarkGray" CornerRadius="1" BorderThickness="10" Background="White" Margin="0" > <StackPanel Orientation="Vertical"> <TextBlock Margin="0,0,0,0" Text="{Binding [LOCNAME]}" FontWeight="Bold" FontSize="14"></TextBlock> <TextBlock Margin="0,15,5,5"> <Run Text="No. of projects: "/> <Run Text="{Binding [CNT]}" FontWeight="Bold"/> </TextBlock> </StackPanel> </Border> </esri:GraphicsLayer.MapTip> </esri:GraphicsLayer> It is working fine all the time but whenever i do spacial search it s stop appearing in text search it is working fine. Please let me know where i am making mistake here is code of that graphics if (graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.Type"].ToString().ToUpper() == "P") { gsearchpoint.Opacity = 1; gsearch = new Graphic(); gsearch = fpoint.Graphics.FirstOrDefault(gtt => gtt.Attributes["LOCATION_ID"] != null && (int)gtt.Attributes["LOCATION_ID"] == int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString())); gglseach = new Graphic(); if (gsearch != null) { gglseach.Geometry = gsearch.Geometry; gglseach.Attributes.Add("LOCATION_ID", int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString())); gglseach.Symbol = layoutroot.Resources["searchpoint"] as ESRI.ArcGIS.Client.Symbols.MarkerSymbol; gsearchpoint.Graphics.Add(gglseach); } } else { gsearchline.Opacity = 1; gsearch = new Graphic(); gsearch = fline.Graphics.FirstOrDefault(gtt => gtt.Attributes["LOCATION_ID"] != null && (int)gtt.Attributes["LOCATION_ID"] == int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString())); gglseach = new Graphic(); if (gsearch != null) { gglseach.Geometry = gsearch.Geometry; gglseach.Attributes.Add("LOCATION_ID", int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString())); gglseach.Symbol = layoutroot.Resources["searchline"] as ESRI.ArcGIS.Client.Symbols.SimpleLineSymbol; gsearchline.Graphics.Add(gglseach); } } cnt = totalfeature.Features.Count(gtt => gtt.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"] != null && (int)gtt.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"] == int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString())); gglseach.Attributes.Add("CNT", cnt); gglseach.Attributes.Add("LOCNAME", graphic.Attributes["GIC4.DBO.LOCATION_INFO.LOC_NAME"].ToString().ToUpper()); gglseach.Attributes.Add("LOCADDRESS", graphic.Attributes["GIC4.DBO.LOCATION_INFO.LOC_ADDY"].ToString().ToUpper()); gglseach.Attributes.Add("LOCCITY", graphic.Attributes["GIC4.DBO.LOCATION_INFO.LOC_CITY"].ToString().ToUpper()); gglseach.Attributes.Add("LOCSTATE", graphic.Attributes["GIC4.DBO.LOCATION_INFO.LOC_STATE"].ToString().ToUpper()); gglseach.Attributes.Add("LOCZIP", graphic.Attributes["GIC4.DBO.LOCATION_INFO.LOC_ZIP"].ToString()); It is working fine if i am not updating my feature layer's geometry but it stop working if i update my feature layer's geometry.and feature layer is different than my graphical layer. Please help, Thanks Foram
... View more
02-27-2012
08:39 AM
|
0
|
1
|
360
|
POST
|
Hello everyone, I am not sure that it is arcgis server's error or something related to my server but everytime in the morning whenever i try to add any feature point or line i am getting error and after that i am able to add feature i checked the log file and i found this error Method failed.HRESULT = 0x80041538 : This is a FACILITY_ITF error that is specific to the interface that returned this error. See the documentation of the interface that returned this error for information about this HRESULT. Please help me how can i solve it? any service or anything else which is automatically set off?and once i try to add feature it turns on? Thanks
... View more
02-22-2012
01:03 PM
|
0
|
1
|
428
|
POST
|
Hello i have couple of questions. 1) Multiple unique value renderer assign runtime on graphical layer:- I have one graphical layer as gpoly and i assign unique value render as Renderer="{StaticResource polyrender}" but now i have toggle button between two fields means if user click on project status then i want to use unique value render as projstatusrendere and if user select type then i want uniquevaluerendere as typerendere.so how to assing renderer value in code means runtime? i tried gpoly.Renderer = this.Resources["polyrender"] as ESRI.ArcGIS.Client.UniqueValueRenderer; but it is not working so do you know how i can set renderer value runtime? 2) Line symbol buffer:- i have points and line on the graphical layer and i set simplelinesymbol but the line is so tiny that user can not see it properly so do you is there any way to set buffer area around the line or something?so that user can see it properly?I know we can change width but it will not look good and i know we can set effect of graphical layer but i want something that even the line is tiny it should be easily viewable. 3) Distinct count :- I used joint query everything is working fine but i want to know the distinct (column name) number from the features means i have cnt = totalfeature.Features.Count(gtt => gtt.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"] != null && (int)gtt.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"] == int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString())); if (cnt > 1) { cnt=totalfeature.Features.Distinct( so in cnt it will return me the count of projects are available for the same location_id so i get count properly but now i want like if the count is one then i want to know the distinct project status means if location id is 1 and it has two projects p1 and p2.then in cnt i will get 2 but now i want to check if p1 and p2 both are having same project status or not?if p1's project status is onqueue and p2's status is also onquque then it should give me one but if p1's status is onqueue and p2's status is completed then it should give me 2 do you know how can i use distinct of projectstatus location wise? Please help, Thanks
... View more
02-09-2012
10:48 AM
|
0
|
2
|
2497
|
POST
|
I am using join two tables and everything is working fine but to access any filed i have to write the whole filed name means like suppose gic1 is my database name then i have to write like GIC1.DBO.PROJECT_INFO.PROJSTAT my join service is http://pipelineforthefuture.org/ArcGIS/rest/services/GIC4/polyjoint/MapServer/1 so in my code i have to write like g.Attributes["GIC4.DBO.PROJECT_INFO.PROJECT_ID"].ToString() is there any way that i can write only filed name?or tablename.fieldname? I am making any mistake in join? Please help, Thanks
... View more
02-08-2012
02:26 PM
|
0
|
0
|
950
|
POST
|
Hello everyone i have 5 tables in my database three are spacial tables and two are data tables i want something like user will draw polygon and then center point will create and then user will insert some location information so that all information will save in location table and then it will take location id from location table and then that polygon will save in polygon table with location id point will save in point table everything is working fine but i am just curious to know the method i am using is correct or there is better way to implement this? to insert data in location table which is data table not spacial table i am using wcf service.so i was thinking if i create feature service of location table and then i add it as feature?but i am gettting error I tried this FeatureLayer fl = new FeatureLayer(); fl = MyMap.Layers["lfl"] as FeatureLayer; if (fl.IsInitialized == true) { fl.EndSaveEdits += new EventHandler<ESRI.ArcGIS.Client.Tasks.EndEditEventArgs>(fl_EndSaveEdits); fl.SaveEditsFailed += new EventHandler<ESRI.ArcGIS.Client.Tasks.TaskFailedEventArgs>(fl_SaveEditsFailed); Graphic g = new Graphic(); g.Attributes.Add("OWNER_ID", 1); g.Attributes.Add("PROJ_TYPE ", "PUB"); g.Attributes.Add("LOC_NAME", "just testingggg"); fl.Graphics.Add(g); fl.SaveEdits(); } here feature layer is i have set it as location feature.so this graphic contains only data information not geometry or anything?also i haven't pass location_id as it is auto increment field in my sql table. Please let me know to insert , update , delete in data table which is better way to write wcf service or create feature service and then insert ,update ,delete? also if it is possible to insert update delete data as feature then any way to upload the documents?
... View more
02-08-2012
01:23 PM
|
0
|
0
|
433
|
POST
|
Hello everyone one small thing is making me crazy please help me.everything is working fine on button event but same thing is not working on page load or even i have written the same thing on featurelayer_inizialized but it is not working. Here is xmal code, <Grid > <Grid.Resources> <esri:SimpleMarkerSymbol x:Key="DefaultpointSymbol" Color="Green" Style="Circle" Size="12" > </esri:SimpleMarkerSymbol> <esri:SimpleLineSymbol x:Key="DefaultLineSymbol" Color="Red" Width="2" /> <esri:SimpleFillSymbol x:Key="DefaultPolygonSymbol" Fill="Green" BorderBrush="Blue" BorderThickness="2" /> <esri:SimpleFillSymbol x:Key="DefaultFillSymbol" Fill="Red" BorderBrush="Red" BorderThickness="2" /> <esri:SimpleFillSymbol x:Key="DefaultBufferSymbol" Fill="Yellow" BorderBrush="Yellow" BorderThickness="2" /> <esri:SimpleFillSymbol x:Key="blackfill" Fill="Black" BorderBrush="Black" BorderThickness="2" /> <esri:SimpleFillSymbol x:Key="multifill" Fill="Purple" BorderBrush="Purple" BorderThickness="2" /> <esri:MarkerSymbol x:Key="esriDefaultMarker_40" OffsetX="6.5" OffsetY="6.5"> <esri:MarkerSymbol.ControlTemplate> <ControlTemplate> <Grid RenderTransformOrigin="0.5,0.5"> <Grid.RenderTransform> <TransformGroup> <ScaleTransform ScaleX="1" ScaleY="1" /> </TransformGroup> </Grid.RenderTransform> <Ellipse Width="13" Height="13" Stroke="Green" StrokeThickness="2" Fill="Red" HorizontalAlignment="Center" VerticalAlignment="Center" /> </Grid> </ControlTemplate> </esri:MarkerSymbol.ControlTemplate> </esri:MarkerSymbol> <esri:UniqueValueRenderer x:Name="MyUniqueValueRenderer" Attribute="PROJSTAT" > <esri:UniqueValueRenderer.Infos> <esri:UniqueValueInfo Value="P" Label="Process" Symbol="{StaticResource DefaultPolygonSymbol}" /> <esri:UniqueValueInfo Value="C" Label="Completed" Symbol="{StaticResource DefaultFillSymbol}" /> <esri:UniqueValueInfo Value="F" Label="Funded" Symbol="{StaticResource DefaultBufferSymbol}" /> <esri:UniqueValueInfo Value="O" Label="Ongoing" Symbol="{StaticResource blackfill}" /> <esri:UniqueValueInfo Value="M" Label="Multiple" Symbol="{StaticResource multifill}" /> </esri:UniqueValueRenderer.Infos> </esri:UniqueValueRenderer> </Grid.Resources> <esri:Map x:Name="MyMap" Extent="-13249239.0000,3982263.0000,-13087512.0000,4087355.0000" > <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" /> <esri:FeatureLayer ID="polygonlayer" Initialized="FeatureLayer_Initialized" Url="http://pipelineforthefuture.org/ArcGIS/rest/services/GIC4/Poly1/MapServer/0" OutFields="*" /> <esri:GraphicsLayer ID="glayer" Renderer="{StaticResource MyUniqueValueRenderer}"></esri:GraphicsLayer> </esri:Map> <Button Content="Button" Height="36" HorizontalAlignment="Left" Margin="28,46,0,0" Name="button1" VerticalAlignment="Top" Width="193" Click="button1_Click" /> </Grid> ------ here is code behind public partial class About : Page { public About() { InitializeComponent(); QueryTask queryTask = new QueryTask("http://pipelineforthefuture.org/ArcGIS/rest/services/GIC4/polyjoint/MapServer/1"); queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted; ESRI.ArcGIS.Client.Tasks.Query query = new ESRI.ArcGIS.Client.Tasks.Query(); query.Where = "1=1"; query.OutFields.Add("*"); queryTask.ExecuteAsync(query); } // Executes when the user navigates to this page. protected override void OnNavigatedTo(NavigationEventArgs e) { } private void FeatureLayer_Initialized(object sender, EventArgs e) { MessageBox.Show((sender as FeatureLayer).Graphics.Count.ToString()); QueryTask queryTask = new QueryTask("http://pipelineforthefuture.org/ArcGIS/rest/services/GIC4/polyjoint/MapServer/1"); queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted; ESRI.ArcGIS.Client.Tasks.Query query = new ESRI.ArcGIS.Client.Tasks.Query(); query.Where = "1=1"; query.OutFields.Add("*"); queryTask.ExecuteAsync(query); } void QueryTask_ExecuteCompleted(object sender, ESRI.ArcGIS.Client.Tasks.QueryEventArgs args) { FeatureSet featureSet = args.FeatureSet; Graphic g; Graphic ggl; if (featureSet != null && featureSet.Features.Count > 0) { IList<Graphic> gsort = featureSet.Features.OrderBy(x => x.Attributes["GIC4.DBO.PROJECT_INFO.PROJ_NAME"]).ToList(); featureSet.Features.Clear(); foreach (var g11 in gsort) { featureSet.Features.Add(g11); } GraphicsLayer gl = MyMap.Layers["glayer"] as GraphicsLayer; foreach (Graphic graphic in args.FeatureSet.Features) { g = new Graphic(); FeatureLayer fl = MyMap.Layers["polygonlayer"] as FeatureLayer; g = fl.Graphics.FirstOrDefault(gtt => gtt.Attributes["LOCATION_ID"] != null && (int)gtt.Attributes["LOCATION_ID"] == int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString())); ggl = new Graphic(); if (g != null) { ggl.Geometry = g.Geometry; ggl.Attributes.Add("PROJSTAT", graphic.Attributes["GIC4.DBO.PROJECT_INFO.PROJSTAT"].ToString()); gl.Graphics.Add(ggl); } } } else MessageBox.Show("No features returned from query"); } private void button1_Click(object sender, RoutedEventArgs e) { QueryTask queryTask = new QueryTask("http://pipelineforthefuture.org/ArcGIS/rest/services/GIC4/polyjoint/MapServer/1"); queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted; ESRI.ArcGIS.Client.Tasks.Query query = new ESRI.ArcGIS.Client.Tasks.Query(); query.Where = "1=1"; query.OutFields.Add("*"); queryTask.ExecuteAsync(query); } } --------- please help, here if you click on button you will see graphical layer but same thing is not working on page load or on featurelayer_inizialize event or even on page load i want everything on page load. Thanks Foram
... View more
02-01-2012
10:21 AM
|
0
|
2
|
500
|
POST
|
I don't know why but i write everything again and check everything again now i am using query and everything is working fine on button click event but on page load I am not getting any features below is my xmal code <esri:Map x:Name="MyMap" WrapAround="True" Extent="-13249239.0000,3982263.0000,-13087512.0000,4087355.0000" ExtentChanged="MyMap_ExtentChanged"> <esri:ArcGISTiledMapServiceLayer ID="StreetMapLayer" Url="http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer" /> <esri:FeatureLayer ID="DynamicLayer" Opacity="0.01" Url="http://pipelineforthefuture.org/ArcGIS/rest/services/GIC4/Point/MapServer/0" /> <esri:FeatureLayer ID="polygonlayer" AutoSave="False" Opacity="1.0" Initialized="FeatureLayer_Initialized" Url="http://pipelineforthefuture.org/ArcGIS/rest/services/GIC4/Poly1/MapServer/0" OutFields="*" Visible="True" Where="FLAG='Y'" /> <esri:GraphicsLayer ID="glayer" Renderer="{StaticResource MyUniqueValueRenderer}"></esri:GraphicsLayer> </esri:Map> on ------------------------------- private void FeatureLayer_Initialized(object sender, EventArgs e) { MessageBox.Show((sender as FeatureLayer).Graphics.Count.ToString()); QueryTask queryTask = new QueryTask("http://pipelineforthefuture.org/ArcGIS/rest/services/GIC4/polyjoint/MapServer/1"); queryTask.ExecuteCompleted += QueryTask_ExecuteCompleted; queryTask.Failed += QueryTask_Failed; ESRI.ArcGIS.Client.Tasks.Query query = new ESRI.ArcGIS.Client.Tasks.Query(); //query.Where = "GIC4.DBO.PROJECT_INFO.PROJECT_ID > 275"; query.Where = "1=1"; query.OutFields.Add("*"); queryTask.ExecuteAsync(query); } ----------------------------------------------- FeatureSet featureSet = args.FeatureSet; Graphic g; Graphic ggl; if (featureSet != null && featureSet.Features.Count > 0) { //QueryDetailsDataGrid.ItemsSource = featureSet.Features; //_pagedProductsView = new PagedCollectionView(featureSet.Features.ToList()); //_pagedProductsView.GroupDescriptions.Add(new PropertyGroupDescription("GIC4.DBO.PROJECT_INFO.PROJSTAT")); //QueryDetailsDataGrid.ItemsSource = _pagedProductsView; PagedCollectionView itemListView = new PagedCollectionView(featureSet); itemListView.SortDescriptions.Add(new System.ComponentModel.SortDescription("Attributes[GIC4.DBO.PROJECT_INFO.PROJ_NAME]", System.ComponentModel.ListSortDirection.Ascending)); //itemListView.GroupDescriptions.Add(new PropertyGroupDescription("Attributes[GIC4.DBO.PROJECT_INFO.PROJSTAT]")); QueryDetailsDataGrid.ItemsSource = itemListView; IList<Graphic> gsort = featureSet.Features.OrderBy(x => x.Attributes["GIC4.DBO.PROJECT_INFO.PROJ_NAME"]).ToList(); featureSet.Features.Clear(); foreach (var g11 in gsort) { featureSet.Features.Add(g11); } GraphicsLayer gl = MyMap.Layers["glayer"] as GraphicsLayer; foreach (Graphic graphic in args.FeatureSet.Features) { g = new Graphic(); g.Symbol = LayoutRoot.Resources["DefaultpointSymbol"] as SimpleMarkerSymbol; FeatureLayer fl = MyMap.Layers["polygonlayer"] as FeatureLayer; string a = graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString(); int k = featureSet.Features.Count(gtt => gtt.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"] != null && (int)gtt.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"] == int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString())); k = featureSet.Features.Count(gtt => gtt.Attributes["GIC4.dbo.RFP.Project_Id"] != null && (int)gtt.Attributes["GIC4.dbo.RFP.Project_Id"] == 291); g = fl.Graphics.FirstOrDefault(gtt => gtt.Attributes["LOCATION_ID"] != null && (int)gtt.Attributes["LOCATION_ID"] == int.Parse(graphic.Attributes["GIC4.DBO.PROJECT_LOCATION_POLY.LOCATION_ID"].ToString())); ggl = new Graphic(); if (g != null) { ggl.Geometry = g.Geometry; if(k >1) ggl.Attributes.Add("PROJSTAT", "M"); else ggl.Attributes.Add("PROJSTAT", graphic.Attributes["GIC4.DBO.PROJECT_INFO.PROJSTAT"].ToString()); gl.Graphics.Add(ggl); } } } else MessageBox.Show("No features returned from query"); } Please help me,even on featurelayer_initialized i am getting 0 count. where i am writing wrong? Please help, Foram
... View more
02-01-2012
09:47 AM
|
0
|
0
|
315
|
POST
|
Thanks but I am using datagrid not featured data grid.So how can i do filter? i tried QueryDetailsDataGrid.ItemsSource = featureSet.Features.Where(g11 => g11.Geometry.Extent.Intersects(MyMap.Extent)); but I am getting error. or can i change style of featuredatagrid as datagrid also i don' t want any paging or dropdownlist in datagrid it should simple[ATTACH=CONFIG]11611[/ATTACH] so can i make featuredatagird like this example? Please help, Thanks
... View more
02-01-2012
09:24 AM
|
0
|
0
|
258
|
Title | Kudos | Posted |
---|---|---|
2 | 04-09-2012 01:14 PM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|