|
POST
|
could it work if I unpack the package (using 7Zip.dll), change the map name, then Pack it again...and use it? i think i will try it, what do you think?
... View more
04-09-2014
05:01 AM
|
0
|
0
|
188
|
|
POST
|
Hello Mike, thanks for your answer. I subscribe the code to the event initialization failed, but it does not hit that method, the service is created and functional, due both services return the same features and the changes made in one of them are reflected in the other. my requirement is this: I have a service that returns me a set of data that includes lat/long and feature attributes (I know that attributes, so I prepare a package file with a geoDB inside with those attributte fields) so If i make a call to the service i want to see the results of that call in a layer (a different layer per each call). I dont know how many calls the user in the applicaction is going to make, therefore, i though that the correct approach was to have some kind of package file template, copy it, and use it to create a new service then consume it to draw the features and use the persistence that the ArcGISLocalFeatureLayer gives to reduce the amont of traffic over the network in other sessions of the same user due some objects will be saved in the geoDB that the package creates. Taking into account that I cannot goes to ArcMap and cretes a new package every time I make a call to the service, do you fancy any workaround?
... View more
04-09-2014
04:58 AM
|
0
|
0
|
1419
|
|
POST
|
Hi, Why are you creating two services from the same package? Cheers Mike Because it is some kind of template to hold different layers but with the same attributes, so the idea is to create several layers with common attributes.
... View more
04-08-2014
11:11 AM
|
0
|
0
|
1419
|
|
POST
|
Well, I just installed the version 10.2.2 but the behavior is the same, it only unpack to one folder. 😞 the second layer includes the information saved in the first one.....Any suggested workaround? By the way, I uninstall the prior versions of ArcGIS Runtime (10.1.1, 10.2, .NET) before i install the version 10.2.2
... View more
04-07-2014
04:53 AM
|
0
|
0
|
1419
|
|
POST
|
Well, I just installed the version 10.2.2 but the behavior is the same, it only unpack to one folder. 😞 the second layer includes the information saved in the first one.....Any suggested workaround?
... View more
04-04-2014
07:34 AM
|
0
|
0
|
1419
|
|
POST
|
Hi, Which version are you using? This was fixed in v10.2 I believe, although 10.2.2 is the latest release. Cheers Mike Hello Mike!! I'm using 10.2, been more acurate: I use the installer ArcGIS_Runtime_SDK_for_WPF_102_136375 Cheers
... View more
04-04-2014
04:12 AM
|
0
|
0
|
1419
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? When creating two LocalFeatureService I use two package files to define each service. the file package2 is a copy of the file package1. var localCenterlineServiceMPK = new LocalFeatureService() { Path = @"C:\package1.mpk", MaxRecords = 100000 }; ArcGISLocalFeatureLayer lineLayer = null; localCenterlineServiceMPK.Start(); lineLayer = new ArcGISLocalFeatureLayer { Url = localCenterlineServiceMPK.UrlFeatureService + "/0", Service = localCenterlineServiceMPK, ID = "lines", LayerName = "lines", Editable = true, DisableClientCaching = true, AutoSave = false, Mode = FeatureLayer.QueryMode.Snapshot, OutFields = new OutFields { "*" } }; var localCenterlineServiceMPK2 = new LocalFeatureService() { Path = @"C:\package2.mpk", MaxRecords = 100000 }; ArcGISLocalFeatureLayer lineLayer2 = null; localCenterlineServiceMPK2.Start(); lineLayer2 = new ArcGISLocalFeatureLayer { Url = localCenterlineServiceMPK.UrlFeatureService + "/0", Service = localCenterlineServiceMPK, ID = "lines", LayerName = "lines", Editable = true, DisableClientCaching = true, AutoSave = false, Mode = FeatureLayer.QueryMode.Snapshot, OutFields = new OutFields { "*" } }; this.MyMap.Layers.Add(lineLayer); this.MyMap.Layers.Add(lineLayer2); When I check the folder C:\Users\XXXX\AppData\Local\ArcGISRuntime\Documents\ArcGIS\Packages there is only one folder : package1... If I perform changes in the graphics of the layer lineLayer those changes are also visible in the lineLayer2. due both layers are sharing the same fileGDB. Is there a way to force the ArcGISRuntime to unpack both file packages (despite the fact that one is a copy), so the changes in one layer wont affect the other one.
... View more
04-03-2014
02:25 PM
|
0
|
10
|
3855
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? I am creating an ArcGISLocalFeatureLayer, but i want to use the GraphicsSource property due an MVVM approach: var localCenterlineServiceMPK = new LocalFeatureService { Path = @"myPackage.mpk", MaxRecords = 100000 }; localCenterlineServiceMPK.Start(); var lineLayer = new ArcGISLocalFeatureLayer { Url = localCenterlineServiceMPK.UrlFeatureService + "/0", Service = localCenterlineServiceMPK, ID = "mylayerName", LayerName ="mylayerName", Editable = true, DisableClientCaching = true, AutoSave = false, Mode = FeatureLayer.QueryMode.Snapshot, OutFields = new OutFields { "*" }, Graphics = null, GraphicsSource = graphics }; lineLayer.Initialize(); when the line of the creation is hot, then it throws the following exception: System.InvalidOperationException occurred HResult=-2146233079 Message=Graphics collection must be empty before using GraphicsSource. Source=ESRI.ArcGIS.Client StackTrace: at ESRI.ArcGIS.Client.FeatureLayer.OnGraphicsSourceChanged(IEnumerable`1 oldValue, IEnumerable`1 newValue) InnerException: I had try to set the Graphics property to null, clear it, but the exception is the same in both cases....the documentation was checked...and i do not see anything related
... View more
04-03-2014
08:51 AM
|
0
|
1
|
1485
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? In the ArcGIS Runtime Deployment Builder for version 10.1.1 I was able to build a folder for deployments in 32 bits and 64 bits. in the version for 10.2 is only possible either for 32 bits or 64 bits, not for both. If I want to make a deployment, but i'm not sure the architecture of the client, How could I build a deployment package for my client?
... View more
04-01-2014
12:17 PM
|
0
|
1
|
1715
|
|
POST
|
So the TPK can not be displayed. Even if I set Map.Extent to the (Full)Extent of the new basemap. Hi!! the issue according to the technical reference is that you can change the spatial reference of a map, but the tile layer are not going to be visible due the projection issues. Those kind of layers cannot be reprojected ( http://forums.arcgis.com/threads/62622-Best-practices-Reprojection-%28changing-spatialreference%29-for-layers-within-Map-Control )
... View more
03-25-2014
03:54 AM
|
0
|
0
|
232
|
|
POST
|
which version of the WPF SDK are you using? I am using 10.2
... View more
03-21-2014
04:01 AM
|
0
|
0
|
1377
|
|
POST
|
I'm pretty sure it is not. In the WPF SDK, after you have loaded your first layer and projection of the Map object is set, the Map projection can not be changed to another projection. Either way, you have solved your problem. I just want to make sure people are aware of this possible caveat in WPF SDK. I just did it
... View more
03-20-2014
10:31 AM
|
0
|
0
|
1377
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? I am developing an application using ArcGIS Runtime for WPF, I want to implement unit test for the functionality in several classes, but some of the workflows include the use of ArcGISLocalFeatureLayer Class. Trying to analize the process I came to the conclusion that use this class is going to be an integration test rather than a unit test, due the interaction with the local ArcGIS server that is going to be created. Some one has been able to mock this kind of objects? (please...tell me that you use RhinoMocks).
... View more
03-20-2014
05:46 AM
|
0
|
0
|
2465
|
|
POST
|
Hello fellow, I don't know if I am going to be dissapear after this answer, so tell my family that I love them....... I face a similar problem, but let me tell you that ArcGIS Runtime is quite limited....(I miss ArcObjects..sigh)... I used DotSpatial library, to be more specific, DotSpatial.Data, you can download it from NuGet. the process was to iterate over the graphics an use the Dotspatial to create each feature
var layer = this.MyMap.Layers["MyLayer"] as ArcGISLocalFeatureLayer;
FeatureTemplate lineLayerTemplate = null;
if (layer.LayerInfo.Templates != null && layer.LayerInfo.Templates.Count > 0)
{
lineLayerTemplate = layer.LayerInfo.Templates.FirstOrDefault().Value;
}
var featureSet = new DotSpatial.Data.FeatureSet(DotSpatial.Topology.FeatureType.Line);
if (lineLayerTemplate != null && lineLayerTemplate.PrototypeAttributes != null)
{
foreach (var prototypeAttribute in lineLayerTemplate.PrototypeAttributes)
{
// the purpose of this is to create the columns that will apper in the shp file
featureSet.DataTable.Columns.Add(new DataColumn(prototypeAttribute.Key as String));
}
}
foreach (var graphic in layer.Graphics)
{
var newPaths = new List<LineString>();
foreach (var path in (graphic.Geometry as Polyline).Paths)
{
var vertices = new List<Coordinate>();
for (int i = 0; i < path.Count; i++)
{
vertices.Add(new Coordinate(path.X,path.Y,path.Z,path.M));
}
// LineString is from DotSpatial...like a PolyLine in Runtime
var newPath = new LineString(vertices);
newPaths.Add(newPath);
}
// Multiline is from DotSpatial
var geom = new MultiLineString(newPaths);
var feature = featureSet.AddFeature(geom);
feature.DataRow.BeginEdit();
foreach (var attribute in graphic.Attributes)
{
feature.DataRow[attribute.Key] = attribute.Value;
}
feature.DataRow.EndEdit();
}
featureSet.Projection = ProjectionInfo.FromEpsgCode(layer.SpatialReference.WKID);
featureSet.SaveAs(@"C:\shptest.shp",true);
enjoy
... View more
03-20-2014
05:38 AM
|
0
|
0
|
1838
|
|
POST
|
Hi, read this post, I know it will help you: http://forums.arcgis.com/threads/104530-Graphics-get-lost?p=373773&posted=1#post373773 You have to be aware of the layer's lifecycle: first the layer must be created..... Code: var myLayer = new ArcGISLocalFeatureLayer(); // all code required to create it then initialize it Code: myLayer.Initialize(); ....and wait When it finish to initialize (myLayer.Initialized event)..... you must update it Code: myLayer.Update(); .....and wait again... When it finish to update (myLayer.UpdateCompleted event)....Voila!!!! you have your Graphics!!!
... View more
03-18-2014
01:21 PM
|
0
|
0
|
426
|
| 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
|