|
POST
|
As i wrote in : http://forums.arcgis.com/threads/104530-Graphics-get-lost?p=373773&posted=1#post373773 all is based in the layer's lifecycle..... I must performed the zoom operation when the layer is created, initializated and updated.. if i tried the zoom operation before al these three stages...the exception is thrown, because the full extend is not set
... View more
03-18-2014
01:18 PM
|
0
|
0
|
592
|
|
POST
|
I figure this: You have to be aware of the layer's lifecycle: first the layer must be created..... var myLayer = new ArcGISLocalFeatureLayer(); // all code required to create it then initialize it myLayer.Initialize(); ....and wait When it finish to initialize (myLayer.Initialized event)..... you must update it myLayer.Update(); .....and wait again... When it finish to update (myLayer.UpdateCompleted event)....Voila!!!! you have your Graphics!!! my code was not haunted!!!!
... View more
03-18-2014
01:15 PM
|
0
|
0
|
1377
|
|
POST
|
If i remember correctly, the projection of the Map can not be changed after it has been set, even after you have removed all the layers. You will need to create a new Map object and set the projection. Sorry to tell you this: that is possible.
... View more
03-18-2014
01:09 PM
|
0
|
0
|
1377
|
|
POST
|
centerlineLayer.Initialized += (sender, args) => { var newCenterlineLayer = sender as ArcGISLocalFeatureLayer; centerlineLayer.Update(); this.LayerController.CreateRouteGraphics(routes, newCenterlineLayer); }; if i check fot the graphics list in the object newCenterlineLayer before the update it is O; Afther them, it is still 0 I had to subscribe to the UpdateComplete event...then the layer has all its graphics
... View more
03-14-2014
08:41 AM
|
0
|
0
|
417
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? I have created an ArcGISLocalFeatureLayer using a local package that i already setup with some data. var localCenterlineServiceMPK = new LocalFeatureService { Path = @"C:\myPackage.mpk", MaxRecords = 100000 }; localCenterlineServiceMPK.Start(); var lineLayer = new ArcGISLocalFeatureLayer { Url = localCenterlineServiceMPK.UrlFeatureService + "/0", Service = localCenterlineServiceMPK, ID = "MyLayer", LayerName = "MyLayer", Editable = true, DisableClientCaching = true, AutoSave = false, Mode = FeatureLayer.QueryMode.Snapshot, OutFields = new OutFields { "*" } }; lineLayer.Initialize(); I suscribe to the initialize method: centerlineLayer.Initialized += (sender, args) => { var newCenterlineLayer = sender as ArcGISLocalFeatureLayer; centerlineLayer.Update(); this.LayerController.CreateRouteGraphics(routes, newCenterlineLayer); }; if i check fot the graphics list in the object newCenterlineLayer before the update it is O; Afther them, it is still 0
... View more
03-14-2014
07:24 AM
|
0
|
1
|
1428
|
|
POST
|
... but sometimes the the Graphics collection still shows empty. Can someone offer some suggestions or insight?. do you have any luck with this????
... View more
03-13-2014
08:28 AM
|
0
|
0
|
426
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? I have created an ArcGISLocalFeatureLayer with a different spatial reference from the base layer, then I create a polyline that is added to the Graphics container of the layer. As my data is in another spatial reference, I remove the layers from the map, change the spatial reference of the map and add the layers again. Then I add the new layer (the one with the polyline)...at this moment the Graphics property onf the layer turns to 0, it just dissapear!! maybe my code is haunted.... any suggestions??? where my polyline goes? why the polyline appear in the map (i can view the line in my screen) but not in the Graphics list
... View more
03-13-2014
08:17 AM
|
0
|
10
|
2841
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? I have created an ArcGISLocalFeatureLayer with a different spatial reference from the base layer, then I create a polyline that is added to the Graphics container of the layer. As my data is in another spatial reference, I remove the layers from the map, change the spatial reference of the map and add the layers again. then i try to perform ZoomTo using the geometry of the polyline and get this: System.NullReferenceException was unhandled HResult=-2147467261 Message=Object reference not set to an instance of an object. Source=ESRI.ArcGIS.Client StackTrace: at ESRI.ArcGIS.Client.Map.getFullViewExtent() at ESRI.ArcGIS.Client.Map.zoomTo(Geometry geom, Boolean skipAnimation) at ESRI.ArcGIS.Client.Map.ZoomTo(Geometry geom) InnerException: Any Idea??? if i try to make the zoom with mouse whell it works perfectly
... View more
03-13-2014
08:09 AM
|
0
|
2
|
1584
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far�?� I am facing a quite interesting requirement: "run python scripts whitin an ArcGIS Runtime app". checking the concepts in the ArcGIS Resources for ArcGIS Runtime SDK for WPF i can read: Geoprocessing in the runtime provides you with a framework for answering your GIS questions. The API works with geoprocessing though geoprocessing service tasks. These tasks are either hosted online, through an ArcGIS Server, or can be hosted locally, by providing the local server with a runtime enabled geoprocessing package (GPK). Geoprocessing services can host one or more tasks, which come from a tool, script, or model, authored in ArcGIS for Desktop and then published to ArcGIS for Server or packaged as a geoprocessing package but also I can read the following statement Not all geoprocessing tools or functionality are supported in the runtime local server. Please see the supported geoprocessing tools list. a few lines after is the next statement: Python scripts Python is an open-source, general-purpose programming language used as a scripting language in ArcGIS geoprocessing. Python scripts can be shared for use with the runtime as geoprocessing packages. Scripts can be turned into script tools, and then packaged into a geoprocessing package. The ArcGIS Runtime contains its own imbedded Python I understand that I can run python scripts using the geoprocessing packages, but not all the functionality that I can get from ArcPy library is available, Am I wrong? is there a known workaround that allows to run python scripts? (with out using ArcObjects, just ArcGIS Runtime)
... View more
10-22-2013
05:39 AM
|
0
|
2
|
3355
|
|
POST
|
Will ESRI ever let me buy just one deployment license? This may be the deciding factor for a small project and I'm deciding between ESRI WPF runtime vs. another mapping API/control that has similiar functionality. Hi!! sorry to ask, but which another mapping API/control designed for WPF are available to use? Thanks for your answer
... View more
10-22-2013
05:07 AM
|
0
|
0
|
654
|
|
POST
|
Well, trying to figure how to solve this weird behavior.... if i use a GraphicLayer to instatiate ...not the ArcGISLocalFeatureLayer (I know that the second one inherits from the first one)... the values of M does not disapear.....
... View more
10-09-2013
11:34 AM
|
0
|
0
|
368
|
|
POST
|
thanks for your answer!, But I want to persist the changes made by the application in the original package. If runtime unpacked the information, It should packed again, Should not?
... View more
10-09-2013
05:05 AM
|
0
|
0
|
790
|
|
POST
|
I create a package file that includes the geodatabase, the geodatabase has define a line feature class that has enable M an Z values. var centerlineLayerService = sender as LocalFeatureService;
var centerlineLayer = new ArcGISLocalFeatureLayer
{
Service = centerlineLayerService,
ID = "arcGISLocalFeatureLayer",
LayerName = "routes",
Editable = true,
AutoSave = true,
ReturnM = true,
DisplayName = "Routes",
DisableClientCaching = true,
}; After that I create some lines (create the mapPoints - including M and Z values- then the collection of mapPoints..and finally the observable collection) the line is created and added to the layer. Then I try this snipped: var centerlineLayer = this._map.Layers["arcGISLocalFeatureLayer"] as GraphicsLayer;
foreach (var route in centerlineLayer.Graphics)
{
var newLine = route.Geometry as Polyline;
var pointCollection = newLine.Paths[0];
} Surprise!!!!! the M Values in the newLine object are gone!! why this would happen???
... View more
10-08-2013
11:43 AM
|
0
|
1
|
717
|
| 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
|