|
POST
|
you were correct!!! I had an additional conversion, I works great
... View more
05-16-2014
05:13 AM
|
0
|
0
|
2200
|
|
POST
|
I am not sure which kind of layer you are referring to, thanks for your answer, I know that I do not write that information in the post. Currently I'm using a Graphics layer, where the objects are created an the symbol is set. I tried to crop the image, to set the max values, but the result is the same, the image is too big. i'm not familiar with ImageSource class. I must peek in the github code about the legend control, trying to understant when, and how this image is created.
... View more
05-16-2014
05:12 AM
|
0
|
0
|
1320
|
|
POST
|
Hi!!! I'm using a rectangle defined by the user: [ATTACH=CONFIG]33778[/ATTACH] As you can see, the map has geometries in it, they were drawn in a Graphics layer. After defining the rectangle, over an area that contains geometries, I would expect that they return something...but...this is my outcome: [ATTACH=CONFIG]33779[/ATTACH] Here is the code that I'm using:
private void IdentifyTask(ESRI.ArcGIS.Client.Geometry.Geometry geom)
{
var initialMapPoint = new MapPoint(geom.Extent.XMin, geom.Extent.YMin);
var finalMapPoint = new MapPoint(geom.Extent.XMax, geom.Extent.YMax);
var initialPoint = this.myModelMap.MapToScreen(initialMapPoint);
var finalpoint = this.myModelMap.MapToScreen(finalMapPoint);
var intialRect = this.myModelMap.PointToScreen(initialPoint);
var finalRect = this.myModelMap.PointToScreen(finalpoint);
var generalTransform = this.myModelMap.TransformToVisual(Application.Current.MainWindow);
var initialTransformedScreenPoint = generalTransform.Transform(intialRect);
var finalTransformedScreenPoint = generalTransform.Transform(finalRect);
var selectionRect = new Rect(initialTransformedScreenPoint, finalTransformedScreenPoint);
var identifyResult = new Dictionary<string, IEnumerable<Graphic>>();
this.IdentifyPointInLayer(identifyResult, this.VisibleLayers, selectionRect);
foreach (var layer in identifyResult)
{
System.Text.StringBuilder displayString = new System.Text.StringBuilder();
displayString.Append("Number of Graphics Selected: " + layer.Value.Count().ToString() + Environment.NewLine + Environment.NewLine);
System.Windows.Forms.MessageBox.Show(displayString.ToString());
}
}
private void IdentifyPointInLayer(Dictionary<string, IEnumerable<Graphic>> dictionary, LayerCollection layers, Rect point)
{
foreach (Layer layer in layers)
{
if (layer is GraphicsLayer)
{
var identifyResultPerLayer = (layer as GraphicsLayer).FindGraphicsInHostCoordinates(point, 10);
dictionary.Add(layer.DisplayName, identifyResultPerLayer);
}
if (layer is GroupLayer)
{
this.IdentifyPointInLayer(dictionary, (layer as GroupLayer).ChildLayers, point);
}
}
}
for the first method, the parameter geom is the rectangle that is the result of the draw over the map. Am I performing the correct transformations?
... View more
05-13-2014
05:17 AM
|
0
|
0
|
2200
|
|
POST
|
Hi, I have some questions regarding the methos that you propose.... How is the tolerance of this? how does it identify? I have this question, because i draw in the graphics layer a series of polylines, the map tool tip is set, as you can see in the image the map tool tip is activated, in that position the identify tool is activated [ATTACH=CONFIG]33760[/ATTACH] but hte results, for each layer is: [ATTACH=CONFIG]33761[/ATTACH] initially i used the function FindGraphicsInHostCoordinates(Point intersectingPoint, int maxHits) then I try with FindGraphicsInHostCoordinates(Rect intersectingRect, int maxHits) and some times it works.... How can i setup the tolerace of this tool?
... View more
05-12-2014
12:19 PM
|
0
|
0
|
2200
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? Using the legend control I defined the following template
<esri:Legend.LegendItemTemplate >
<DataTemplate>
<StackPanel Orientation="Horizontal" Loaded="StackPanel_OnLoaded" >
<Image Source="{Binding ImageSource}" Tag="{Binding Tag}" ></Image>
<TextBlock Text="{Binding Label}" Background="Aqua"></TextBlock>
</StackPanel>
</DataTemplate>
</esri:Legend.LegendItemTemplate>
The legend is shown in the following way [ATTACH=CONFIG]33658[/ATTACH] after checking the LegendItemViewModel, i discover that the ImageSource Width property is set to 320 and Height property is set to 290. What could affect that size?, in an external test application, the size is about ten times smaller. it is tied up to any style?
... View more
05-07-2014
02:24 PM
|
0
|
8
|
4094
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? I have a graphics layer with several graphics, I wanto to implement an identify task, but it is asking for an URL, this layer is not associated to any service, so i dont know how to set that parameter. Is there a way to implement that task?
... View more
05-07-2014
12:27 PM
|
0
|
6
|
3365
|
|
POST
|
Weird behavior......the local service is not creating the log, despite the fact that enable logging option was selected 😞
... View more
05-07-2014
05:44 AM
|
0
|
0
|
1174
|
|
POST
|
Hi, thanks for your answer, the funny thing is that both applications are using the same shapefile (not at the same time) Here is the query string that works: http://localhost.:50001/arcgis/rest/services/emptympk_wgs84/MapServer/dynamicLayer?f=json&layer=%7b%22id%22%3a0%2c%22source%22%3a%7b%22type%22%3a%22dataLayer%22%2c%22dataSource%22%3a%7b%22type%22%3a%22table%22%2c%22workspaceId%22%3a%22b1125da0-abba-4ea5-af43-c89369524b3f%22%2c%22dataSourceName%22%3a%2218BANSAM%22%7d%7d%7d HTTP/1.1 Here is the one that gives the ERROR: http://localhost.:50000/arcgis/rest/services/emptympk_wgs84/MapServer/dynamicLayer?f=json&layer=%7b%22id%22%3a0%2c%22source%22%3a%7b%22type%22%3a%22dataLayer%22%2c%22dataSource%22%3a%7b%22type%22%3a%22table%22%2c%22workspaceId%22%3a%22d49fab1c-b4a8-43dc-9f0b-57aa9ee2f053%22%2c%22dataSourceName%22%3a%2218BANSAM%22%7d%7d%7d HTTP/1.1 i just spoted that the only diference is the GUID used to identify the workspace.
... View more
05-06-2014
08:11 AM
|
0
|
0
|
1174
|
|
POST
|
Hi, I'm struggling with fiddler (thanks, I'm learning a new tool) to capture the trafic generated by the server. so far when i try to isolate the issue in a new application it works :(. I was thinking that maybe it will be some kind of incompatibility between the Geometry service and the feature service, due i use the geometry service in the application, in that ideas order, i remove the geometry service, but still I get the issue. I already check the order of calling the GetDetails, and it is called when the arcGisLocalDynamicMapServiceLayer is inittialized..I mean after initialization (Likewise in the example packed with the runtime). Checking the fiddler captures, here is the one when the sample application works :
{"currentVersion":10.21,"name":"18BANSAM","type":"Feature Layer","description":"","geometryType":"esriGeometryPoint","copyrightText":"","subLayers":[],"minScale":0,"maxScale":0,"defaultVisibility":true,"extent":{"xmin":-72.225719444444451,"ymin":6.9261805555555558,"xmax":-71.813094444444445,"ymax":7.0953861111111109,"spatialReference":{"wkid":4326,"latestWkid":4326}},"hasAttachments":false,"htmlPopupType":"esriServerHTMLPopupTypeNone","displayField":"X","typeIdField":null,"fields":[{"name":"FID","type":"esriFieldTypeOID","alias":"FID","domain":null},{"name":"Shape","type":"esriFieldTypeGeometry","alias":"Shape","domain":null},{"name":"X","type":"esriFieldTypeDouble","alias":"X","domain":null},{"name":"Y","type":"esriFieldTypeDouble","alias":"Y","domain":null},{"name":"Z","type":"esriFieldTypeDouble","alias":"Z","domain":null}],"relationships":[],"canModifyLayer":true,"canScaleSymbols":false,"hasLabels":false,"capabilities":"Map,Query,Data","maxRecordCount":1000,"supportsStatistics":false,"supportsAdvancedQueries":false,"hasZ":true,"hasM":true,"supportedQueryFormats":"JSON, AMF","ownershipBasedAccessControlForFeatures":{"allowOthersToQuery":true},"useStandardizedQueries":true,"id":0}
But when my real application is running, this is what i got:
{"error":{"code":400,"message":"Unable to find the specified 'dataSourceName' in 'dataSource' for dynamic dataLayer with 'id': 0.","details":[]}}
I already enable the HTTP Debugging of .NET client applications Furthermore, I also summon several acient spirits and order a brand new ouija board from amazon, but it wont arrive until next week...so...i will try anything meanwhile.
... View more
05-06-2014
06:50 AM
|
0
|
0
|
1174
|
|
POST
|
My app uses a MVVM and it does not work, i'm pulling out my hair of my head...i don't know what to do.
... View more
05-05-2014
06:23 AM
|
0
|
0
|
1174
|
|
POST
|
Hi, Please can you confirm the product and version you are using? (e.g. ArcGIS Runtime SDK for WPF 10.2.2) Also - if you can attach your application to the thread that would greatly help the forum folk support you. Cheers Mike Hello Mike, currently i am using ArcGIS Runtime SDK for WPF 10.2.2, post the whole application is not possible, but I would like to have some hints to take into account in this process, I'm not going to lie, i use the method AddFileDatasetToDynamicMapServiceLayer that is implemented in the sample that is included with SDK (Add shapefiles and rasters).
... View more
04-29-2014
05:36 AM
|
0
|
0
|
1174
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? I checked the example that is posted in [HTML]http://www.arcgis.com/home/item.html?id=953a530ada30477d95cc69e788268bc9[/HTML] and successfully tried to reproduce it in a new application, it works smothly. Then I proceed to implement it in a robust application that use MVVM pattern under PRIMS framework, I copied and pasted the code in the applicaction, but when the code tries to get the details from the feature layer to create the renderer, it fails...it comes with an exception arcGisLocalDynamicMapServiceLayer.GetDetails(dynamicLayerInfo.ID, (featureLayerInfo, exception) => { switch (featureLayerInfo.GeometryType) { case ESRI.ArcGIS.Client.Tasks.GeometryType.Envelope: layerDrawOpt.Renderer = new SimpleRenderer() { Symbol = new SimpleFillSymbol() { Fill = new SolidColorBrush(GetRandomColor()), BorderBrush = new SolidColorBrush(GetRandomColor()) } }; break; case ESRI.ArcGIS.Client.Tasks.GeometryType.MultiPoint: layerDrawOpt.Renderer = new SimpleRenderer() { Symbol = new SimpleMarkerSymbol() { Color = new SolidColorBrush(GetRandomColor()), Size = 8 } }; break; case ESRI.ArcGIS.Client.Tasks.GeometryType.Point: layerDrawOpt.Renderer = new SimpleRenderer() { Symbol = new SimpleMarkerSymbol() { Color = new SolidColorBrush(GetRandomColor()), Size = 8 } }; break; case ESRI.ArcGIS.Client.Tasks.GeometryType.Polygon: layerDrawOpt.Renderer = new SimpleRenderer() { Symbol = new SimpleFillSymbol() { Fill = new SolidColorBrush(GetRandomColor()), BorderBrush = new SolidColorBrush(GetRandomColor()) } }; break; case ESRI.ArcGIS.Client.Tasks.GeometryType.Polyline: layerDrawOpt.Renderer = new SimpleRenderer() { Symbol = new SimpleLineSymbol() { Color = new SolidColorBrush(GetRandomColor()) } }; break; default: break; } // Set the LayerDrawingOptions property on the local dynamic map service layer (the LayerID property ties this to the DynamicLayerInfo object). layerDrawingOptionsCollection.Add(layerDrawOpt); // Refresh the dynamic map service layer to render the result of the datasource/layer change. arcGisLocalDynamicMapServiceLayer.Refresh(); }); The object featureLayerInfo is null, I check the local ArcGIS server, and it is present with the map service, and the exception states : "Unable to find the specified 'dataSourceName' in 'dataSource' for dynamic dataLayer with 'id': 0." I dont know what to check for, I have been debugging side-by-side the code of both applications, and one of them works but the other one fails (I use two different shapefiles in the process, and I have change between them in the apps with the same result).
... View more
04-28-2014
06:20 AM
|
0
|
12
|
5143
|
|
POST
|
Ok fellows, i got it : var uniqueValueRenderer = new UniqueValueRenderer(); var defaultSymbol = new ESRI.ArcGIS.Client.Symbols.SimpleLineSymbol { Width = 2.5 }; uniqueValueRenderer.DefaultSymbol = defaultSymbol; uniqueValueRenderer.Field = attributeField; //parameter var colorRange = new ColorRange { From = this.GetRandomColor(), To = this.GetRandomColor() }; var rampInterpolator = new RampInterpolator { ColorRange = colorRange }; foreach (var graphic in layer.Graphics) { var valueInfo = new UniqueValueInfo { Label = graphic.Attributes[attributeField].ToString(), Value = graphic.Attributes[attributeField].ToString(), Symbol = rampInterpolator.GetInterpolatedSymbol( defaultSymbol, graphic, 0, layer.Graphics.Count, layer.Graphics.IndexOf(graphic)) }; uniqueValueRenderer.Infos.Add(valueInfo); } return uniqueValueRenderer
... View more
04-09-2014
01:07 PM
|
0
|
0
|
708
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? I have a GraphicsLayer, it has n objects in the Graphics property. I want to use a UniqueValueRenderer for this layer. I had use this kind of approach with an ArcGISLocalFeatureLayer and the GenerateRendererTask, but the GenerateRendererTask object requires an URL, it the used approach I used the service URL from the ArcGISLocalFeatureLayer. but a GraphicsLayer, it is not attached to a service. can I use this task to generate the render based in a ColorRamp for a Graphicslayer? If I have to iterate over each one of the grpahics in the layer to create the simbols, Can i use color ramp to calculate the color? thanks!!
... View more
04-09-2014
12:38 PM
|
0
|
4
|
2852
|
|
POST
|
Hello mate!!! interesting proposal....I think, if you get the geometry of the rectangle, you could perform an myMap.ZoomTo() call.
... View more
04-09-2014
12:20 PM
|
0
|
0
|
1206
|
| Title | Kudos | Posted |
|---|---|---|
| 2 | 12-01-2023 02:45 AM | |
| 1 | 07-19-2021 11:25 PM | |
| 1 | 07-21-2023 04:44 AM | |
| 1 | 07-07-2023 05:15 AM | |
| 1 | 01-19-2023 03:19 AM |
| Online Status |
Offline
|
| Date Last Visited |
08-02-2024
12:42 AM
|