|
POST
|
Hello, I just develop an small ArcGIS runtime app, this app initialize a local feature service: var localCenterlineServiceMPK = new LocalFeatureService() { Path = @"C:\Users\XXX\Documents\PackageMap.mpk" }; localCenterlineServiceMPK.StartCompleted += this.StartCompleted; localCenterlineServiceMPK.StartAsync(); then I get a layer for that package (only has one) private void StartCompleted(object sender, AsyncCompletedEventArgs e) { var centerlineLayerService = sender as LocalFeatureService; var centerlineLayer = new ArcGISLocalFeatureLayer { Service = centerlineLayerService, ID = "Routes", LayerName = "routes", Editable = true, AutoSave = true, ReturnM = true }; this._map.Layers.Add(centerlineLayer); } I create some lines and add it to the layer, the lines appears on the map. then I close the application and proceed to open the file C:\Users\XXX\Documents\PackageMap.mpk using ArcMap, to discover that the features weren't saved. (the package includes the geodatabase). Funny part: I reopen the application....and voila!!!! the features are there. I found that the local server unpacked the contents of the package to : C:\Users\MyUser\AppData\Local\ArcGISRuntime\Documents\ArcGIS\Packages\packagemap in that path resides a copy of the geodatabase, but neither it has the changes in the features. It is driving me crazy!!!!!!! where are the features???
... View more
10-08-2013
10:31 AM
|
0
|
4
|
1090
|
|
POST
|
Hi, After being involved in an ArcGIS Runtime SDK for WPF training, several concerns came to me: 1. Was a great surprise, discover that it does not allow to perform linear referencing operations (Dynamic segmentations). This kind of operations are available in ArcObjects. 2. You cannot manipulate the map object to add NEW layers connected to a database....or create layers on the fly and add features an then persist it....unless they are tied to a feature service. 3. from my point of view (correct me if i'm wrong) an application developed under this technology is tied up to previously created content, and that content cannot be modified with the freedom that ArcObjects gave tu us (developers), I mean...if i have a map package...i can add, in my application, other layer, but i cannot persist that addition; as well i can load feature packages...and modify the features inside of it, but i am not able of create those packages from my application, and then add them to the map package. 4. maybe i'm searching in the wrong way, but i cannot find the way (in the product reference) to access to a Feature class in a file geodatabase or personal geodatabase Why to deprecate ArcObjects if they provide such a big opportunity and granularity???
... View more
07-26-2013
08:52 AM
|
0
|
0
|
1824
|
|
POST
|
Hi Sean, Try to set the project to build for x86. it solves my problem.
... View more
11-29-2012
05:40 AM
|
0
|
0
|
1480
|
|
POST
|
I was unable to resolve the issue with technical support, I was using AoInitialize (in my case this was created in LicenseInitializer that was auto-generated), Steps: 1. remove all the code in the Application that referred to the LicenseInitializer 2. Add an AxLicenseControl to startup form; 3. Add ESRI.ArcGIS.RuntimeManager.Bind(ESRI.ArcGIS.ProductCode.EngineOrDesktop) there is a weird behavior with AoInitialize class...so...i take it away....
... View more
11-15-2012
12:01 PM
|
0
|
0
|
1444
|
|
POST
|
Hi, I found out the way to store elements (of a MapFrame) into Image and load again by using the below codes: void Save (AxPageLayoutControl pageControl)
{
IPersistStream perStream;
IMemoryBlobStream memoryStream = new MemoryBlobStreamClass();
IGraphicsContainer graphicsContainer = pageControl.ActiveView.GraphicsContainer;
graphicsContainer.Reset();
IElement pElement = graphicsContainer.Next();
while (pElement != null)
{
if (pElement is IMapFrame)
{
perStream = (IPersistStream)pElement ;
perStream.Save(memoryStream, 0);
memoryStream.SaveToFile("C:/image.bmp");
break;
}
pElement = graphicsContainer.Next();
}
}
void Load (AxPageLayoutControl pageControl)
{
IPersistStream perStream;
IMemoryBlobStream memoryStream = new MemoryBlobStreamClass();
IGraphicsContainer graphicsContainer = pageControl.ActiveView.GraphicsContainer;
graphicsContainer.Reset();
IElement pElement = graphicsContainer.Next();
while (pElement != null)
{
if (pElement is IMapFrame)
{
memoryStream.LoadFromFile("C:/image.bmp");
perStream = (IPersistStream)pElement;
perStream.Load(memoryStream);
IMapFrame frame = new MapFrameClass();
frame = (IMapFrame)perStream;
pElement = (IElement)frame;
break;
}
pElement = graphicsContainer.Next();
}
pageControl.ActiveView.PartialRefresh(esriViewDrawPhase.esriViewGraphics, null, null);
} But, I am finding a way to convert IPersistStream or IMemoryBlobStream to byte[] (binary format), so I can store in the SQL Server and load it later. Are there anyone know this ? Thanks and regards, this is another kind of situation, I have been struggling with something like that, but i cannot save the map directly into the database, so i first save the map to a file, and then save the file into the database, it was the workaround that i found to solve it. Reading your code, you are trying to save a bitmap of the map (a graphic representation) not the map per se....aren't you?
... View more
10-30-2012
04:44 AM
|
0
|
0
|
1456
|
|
POST
|
Hi Xtian79, I found out another way, please see the link: http://forums.arcgis.com/threads/69207-How-to-store-elements-of-IMap%28IGraphicsContainer%29-as-BinaryData-format-in-SQL?p=245080&viewfull=1#post245080 Kind regards, Hi!!!, in the solution that you propose how do you figure the value of the screen resolution?, or is it just a random value? i trying to export an image to the printer, that information would be useful
... View more
10-30-2012
04:37 AM
|
0
|
0
|
2837
|
|
POST
|
hi, System.Int32 screenResolution = 30; System.Int32 outputResolution = 200; pExport.Resolution = outputResolution; ESRI.ArcGIS.Display.tagRECT exportRECT; exportRECT.left = 0; exportRECT.top = 0; exportRECT.right = activeView.ExportFrame.right * (outputResolution / screenResolution); exportRECT.bottom = activeView.ExportFrame.bottom * (outputResolution / screenResolution); how do you figure the screen resolution?
... View more
10-29-2012
07:50 AM
|
0
|
0
|
2837
|
|
POST
|
In that kind of component, we put the AxTOCControl, in one of my test, the window calls a windows form an inside of it was the AxTOCcontrol, in that try, the behavior was present too....
... View more
10-05-2012
08:18 AM
|
0
|
0
|
1444
|
|
POST
|
We use the form controls of Devexpress, and extend some of their functionalities. adding properties an behaviors. At this moment, we are using XtraForm (from DevExpress v11).
... View more
10-05-2012
08:15 AM
|
0
|
0
|
1444
|
|
POST
|
Hello fellow, My first suggestion would be to test in a new simple application outside of the complexities of your existing application to try and verify if the behavior is consistent or if it requires part of this complexity to be observed. I tried to reproduce the behavior in an small application, but it was imposible, the component always works great, even extending it as a new class, as you said it maybe required the complexity.....so i said to myself: "you have to get dirty" went up my sleves and started to breaking a part the original application, I was able to repoduce the behavior just having a custom implementation of Devexpress components and ESRI components. For this test please verify that you only bind to Engine and that you only check for an Engine license. As I'm sure you're aware binding and licensing are completely different processes and have completely different roles. Just want to make sure we are on the same page before we dig in more. Yes, the application at the beggining (small change to try another thing...it is in engine now) was only binding to Engine, and the licence process check only for engine license.
... View more
10-05-2012
06:57 AM
|
0
|
0
|
1444
|
|
POST
|
Hi fellow, when some one answer a similar question that i made, with the following inquiry i felt almost offended...but i have to make it: I assume that you make the binding, maybe you are making a binding only to Engine: RuntimeManager.Bind(ProductCode.Engine); try to bind it to Engine or to Desktop: RuntimeManager.Bind(ProductCode.EngineOrDesktop); Another point to review is to check if the client activated the ArcInfo licence....I know...I know...maybe you should chack that...but I have to ask... ok, when this happens?? at the moment fo running the application? I'm througth something similar but during the execution: http://forums.arcgis.com/threads/68052-Life-cycle-of-an-AxControls-license-missing-in-some-point-of-the-execution in a previous thread we have been discussing that too: http://forums.arcgis.com/threads/48507-After-asking-for-Licence-state-Crash-after-2minutes
... View more
10-02-2012
05:17 AM
|
0
|
0
|
2251
|
|
POST
|
Thank you. But there is an error: Use of unassigned local variable 'myMapImage' Kind regards, Tai you are rigth, that's my mistake, you have to initialize the variable....
... View more
10-02-2012
05:00 AM
|
0
|
0
|
2837
|
|
POST
|
Hi, Disable the COM resgister option in the project properties tab, also check that you are running in x86 cofiguration..
... View more
10-01-2012
08:28 AM
|
0
|
0
|
2125
|
|
POST
|
DEAR PEOPLE FROM THE FUTURE: Here's what we've figured out so far??? Some knows the lifecycle of an AxControl (AxTOCControl) ? Why this question??? ok , lets put in this way.....I have a complex application, tha uses several technologies (Spring.NET, NHibernate, DevExpress components) among them ESRI ArcObjects. this application starts normally, it binds a product (engine or desktop) then it gets the licence (ArcEngine), it starts!!! it works!!! so it is getting the proper license ....but wait!!! in some moment, minutes after the aplication has started, then it throws a dialog box saying that i do not have the license of ArcView (in fact i do not have it...but i do not need it....my code only use functionalities related with ArcEngine...not even extensions)..if i click in the button of this dialog box, the the application is closed. I have trying to capture the thread that launch this dialog box, but this attemps has benn useless..... 😞 also i try use the tool Process Monitor and Process Explorer, but has not been able to get information. So....I need to undertand the life cycle of the AxTOCControl to indetify when it is losing the license. Or if some knows why a control can loss the binding o the existing license....it will be very hepful!
... View more
10-01-2012
06:30 AM
|
0
|
6
|
1791
|
|
POST
|
Hi, basically one way is to draw layer by layer in an image object, then export it
private static IDisplay myDisplay;
private static Image myMapImage;
Graphics g = Graphics.FromImage(myMapImage);
g.Clear(Color.Transparent);
myDisplay.StartDrawing(g.GetHdc().ToInt32(), 0);
for (int i = Map.LayerCount - 1; i >= 0; i--)
{
ILayer layer = MapControl.get_Layer(i);
layer.Draw(esriDrawPhase.esriDPGeography, myDisplay, null);
}
myDisplay.FinishDrawing();
g.ReleaseHdc();
I hope this is helpful for you
... View more
10-01-2012
05:50 AM
|
0
|
0
|
2837
|
| 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
|