POST
|
Hello, I get the error message "Server library could not be loaded at ESRI.ArcGIS.DataSourcesGDB.SdeWorkspaceFactoryClass.OpenFromFile" when I try to open a connection to my SDE Workspace. I have ArcGISServer 10.0 an Oracle Client 11g installed. The strange thing is that it worked until this week. Here is my code: //First check license ESRI.ArcGIS.RuntimeManager.BindLicense(ESRI.ArcGIS.ProductCode.Server); IAoInitialize aoInitialize = new AoInitializeClass(); esriLicenseStatus licenseStatus = esriLicenseStatus.esriLicenseAvailable; //Check the productCode. licenseStatus = aoInitialize.IsProductCodeAvailable (esriLicenseProductCode.esriLicenseProductCodeArcServer); if (licenseStatus == esriLicenseStatus.esriLicenseAvailable) { licenseStatus = aoInitialize.Initialize (esriLicenseProductCode.esriLicenseProductCodeArcServer); } //Then establish connection IWorkspaceFactory workspaceFactory = null; IPropertySet propertySet = new PropertySetClass(); propertySet.SetProperty("SERVER", "sampleserver"); propertySet.SetProperty("INSTANCE", "1234"); propertySet.SetProperty("DATABASE", "someDB"); propertySet.SetProperty("USER", "user"); propertySet.SetProperty("PASSWORD", "password"); propertySet.SetProperty("VERSION", "SDE.DEFAULT"); workspaceFactory = new SdeWorkspaceFactoryClass(); this.workspace = workspaceFactory.Open(propertySet, 0); // Here i get the error message //I also tried this //this.workspace = workspaceFactory.OpenFromFile("d:/wwwroot/GNSBaumSynchronize/gisora-vm01.sde", 0);
... View more
12-09-2013
10:06 PM
|
0
|
0
|
735
|
POST
|
Hello, I'm trying to Upload a versioned FeatureClass to my ArcGIS-Server from a mobile Device using ArcObjects. There are up to 50 users doing this in parallel. The Upload works, but only in sequential way. The service is configured right (I'm using a wcf-service) but inside the arcobjects-code it seems that something is waiting till the workspace is a ready or something. Here is my code: public String insertFeature(String tableName, String[] fieldValues, String[] fields, Double x, Double y, Logger logger) { DateTime t1970 = new DateTime(1970, 1, 1, 0, 0, 0, 0); Boolean isLicenseStatusGood = this.IsLicenseStatusGood(logger); if (isLicenseStatusGood) { IFeatureCursor cursor = null; try { // Creates a connection to the database VersionedArcSdeWorkspace("gisora-vm01", "sde:oracle11g", "webline_sachsen_stamm", "webline_sachsen_stamm@agsdb", "agsdb", "SDE.DEFAULT",logger); IDataset ds; // Initializing a versioned workspace IVersionedWorkspace versionedWorkspace = (IVersionedWorkspace)workspace; IFeatureWorkspace iws = (IFeatureWorkspace)versionedWorkspace; dsenum = workspace.get_Datasets(esriDatasetType.esriDTFeatureClass); ds = dsenum.Next(); IFeatureClass featureC= null; while (ds != null) { if (ds.Name.Equals(tableName)) { featureC= iws.OpenFeatureClass(ds.Name); } ds = dsenum.Next(); } if (featureC!= null) { IPoint point = new Point(); point.PutCoords(x, y); // Creating a workspaceEdit an a MultiuserWorkspaceEdit IWorkspaceEdit workspaceEdit = (IWorkspaceEdit)versionedWorkspace; IMultiuserWorkspaceEdit mWorkspaceEdit = (IMultiuserWorkspaceEdit)workspaceEdit; if (mWorkspaceEdit.SupportsMultiuserEditSessionMode(esriMultiuserEditSessionMode.esriMESMVersioned)) { // Starting the edit session. (leaving out anything of the next three lines i get the error // " the requested operation is invalid on a closed state" mWorkspaceEdit.StartMultiuserEditing(esriMultiuserEditSessionMode.esriMESMVersioned); workspaceEdit.StartEditing(false); workspaceEdit.StartEditOperation(); // Create a new Feature IFeature feature = table.CreateFeature(); feature.Shape = point; // Mostly i get errors here feature.Store(); // or here workspaceEdit.StopEditing(true); } } } catch (Exception e) { // When i get an error i recall the method until its done without errors insertFeature(tableName, fieldValues, fields, x, y, logger); return "500"; } } else { return "500"; } return "200"; } Has anyone an idea?
... View more
10-22-2013
04:57 AM
|
0
|
0
|
397
|
POST
|
Hello, I have a problem using ArcGISFeatureLayer.applyedits on new Features created in my Application. I'm trying to send a self-created Graphic via applyedits to the server. The Graphic-Object is filled with a HashMap containing the attributes of the FeatureClass including the ObjectID. map.put(featureLayer.getObjectIdField(), Integer.valueOf(items.get(i).getOBJECTID())); When I try to update a Feature it works, but when i want to transfer a new feature i get the following error message: [objectID=-1, globalId=null, success=false, error=FeatureEditError[code=-2147216083, description=Error while inserting populated row into Insert Cursor]] The ObjectID i put in my HashMap is not -1, i checked that. I hope anyone has an idea. Thanks in advance.
... View more
07-10-2013
02:04 AM
|
0
|
0
|
1463
|
POST
|
Hello, I have a problem with my application when I instantiate my activity. I get an exception at setContentView(R.layout.main). The exception here is directly pointing at my com.esri.android.map.MapView. My Device: Samsung Galaxy Note 10.1, Android 4.1.2 (API 16) The strange thing is that the same application works on my medion tablet with android 4.0.3 (API 15). I adjustet the min- and maxSDK in the AndroidManifest.xml. The code in my main.xml: <com.esri.android.map.MapView xmlns:android="http://schemas.android.com/apk/res/android" android:id="@+id/map" android:layout_width="fill_parent" android:layout_height="fill_parent" > </com.esri.android.map.MapView> The code in my activity: super.onCreate(savedInstanceState); setContentView(R.layout.main); // Error occurs here Perhaps anyone has an idea.
... View more
06-26-2013
01:38 AM
|
0
|
5
|
8067
|
POST
|
It sounds like the layer could be initialized, otherwise you would not get the empty grid. Did you tried to display the scale and the center of the map in a textview. Can you get Attributes from the layers like getVisibility(), getExtent() or getLayers(). Check if you get any exceptions then you try to fetch these attributes.
... View more
05-28-2013
03:49 AM
|
0
|
0
|
573
|
POST
|
I tried your code on my Medion tablet with Android 4.0.3 and it works. What are the android-versions of your tablets / smartphones? Is the min- and the max-SDK property in the AndroidManifest.xml set correctly? Can you see nothing at all or the empty grid of the tiled layers? Maybe it could help to zoom to a known location with mMapView.zoomToScale(yourCenter, yourScale);
... View more
05-28-2013
01:08 AM
|
0
|
0
|
573
|
POST
|
Hello, Can you please post how your MapView was created. Did you added it to your layout.xml? Normally a layer is shown after it has been added to a mapview. Have you also set the extent of your map view. I think, it would be a good idea to post your complete code so I could check it myself. Greetings
... View more
05-28-2013
12:02 AM
|
0
|
0
|
573
|
POST
|
After thinking about it I thought that the Android OS is overstrained with the amount of images delivered from the local tiled layers. When I display the same content with three local tiled layers instead of 8 I don't have any flickering. And there is also a hint from the Android OS. I got the error message "System UI has been stopped".
... View more
05-27-2013
11:53 PM
|
0
|
0
|
134
|
POST
|
Hello, I'm using some ArcGISLocalTiledLayers that have an extent of 200x200 km and a size of circa 20 GB. From time to time my MapView starts to flicker and it doesn't reacts on zooming or panning. Has anyone an idea?
... View more
05-26-2013
10:20 PM
|
0
|
1
|
320
|
POST
|
Hello, I'm trying to generate Map Caches from MapServices. The reason is, i need to generate caches for given extents automatically. Here is my approach with ArcObjects for .NET: IMapDocument mapDocument = new MapDocument(); mapDocument.Open("d:/arcgisdata/Sachsen/webline_sachsen_stamm_ALK_Nutzung.mxd"); IMap map = mapDocument.get_Map(0); IMapCooker mapCooker = new MapCooker(); // Giving the MapCooker the Extent of a Feature mapCooker.Extent = feature.Extent; ILayer layer = map.get_Layer(0); // ILayer and Map are not NULL // Where do I get my IDisplay-Object from? ESRI.ArcGIS.Display.IDisplay display = new ESRI.ArcGIS.ArcMapUI.AppDisplay(); // Need I to add the Layer to the MapCooker? mapCooker.AddLayer(layer.Name, layer); if (map != null && layer != null) { mapCooker.Generate(map, layer, display, cancel); } else { Logger.Log("w", "Map und/oder Layer sind NULL. Cache konnte nicht erstellt werden."); } After calling mapCooker.Generate() i get the following error: Exception HRESULT: 0x000000A. The data necessary to complete this operation is not yet available. Has anyone an idea? Thanks in advance.
... View more
03-12-2013
01:06 AM
|
0
|
0
|
389
|
POST
|
I solved my problem: map.put("OBJECTID", baeume.get(i).getOBJECTID()); the ObjectID in my local Data was String and not integer. After fixing it, it works
... View more
01-31-2013
09:36 PM
|
0
|
0
|
144
|
POST
|
You can use a drawable: Drawable icon = context.getResources().getDrawable(R.drawable.symbol); PictureMarkerSymbol pms = new PictureMarkerSymbol(icon); First you have to put an image in one of the drawable folders: [ATTACH=CONFIG]21290[/ATTACH] Then you can initialize each Graphic of you GraphicsLayer with that symbol
... View more
01-31-2013
09:05 PM
|
0
|
0
|
174
|
POST
|
Hello, I have a problem when i'm trying to update my featurelayer after changing the position or some attribute values of a feature. Here is my code: First i'm retrieving the updated graphics from my local database: ArcGISFeatureLayer syncLayer = new ArcGISFeatureLayer("http://<server>/ArcGIS/rest/services/<directory>/<service>/FeatureServer/0",o,cred); edits = builder.getBaumdatenAsGraphic(getApplicationContext(), "1",new Hashtable<String,Object>()); In this method im filling the Hashtable with values: map.put("OBJECTID", baeume.get(i).getOBJECTID()); map.put(BK_BAEUME_ADATUM, baeume.get(i).getADatum()); And afterwards i'm generating the Graphic: InfoTemplate info = new InfoTemplate(); graphics = new Graphic(new Point(baeume.get(i).getX(),baeume.get(i).getY()),pms,map,info); Then i'm calling applyEdits from my FeatureLayer: syncLayer.applyEdits(adds, deletes, edits, new CallbackListener<FeatureEditResult[][]>(){ // some Callback-Handling }); On my device i get now the message: [objectid=-32648,globalid=null, success=false,error=FeatureEditError[code=-1, description=Update for the object was not attempted. Object may not exists.]] It's possible that the objectid is incorrect? I retrieve it from the featurelayer when initializing the data. Thanks in advance
... View more
01-31-2013
05:38 AM
|
0
|
1
|
1852
|
POST
|
Hello, I'm caching a FeatureLayer to use it in offline mode. That works really good. Now I want to do this automatically after the FeatureLayer has been loaded succesfully. For this i use the OnStatusChangeListener of the MapView: map.setOnStatusChangedListener(new OnStatusChangedListener(){ public void onStatusChanged(Object source, STATUS status) { if (source.equals(FeatureLayer) && status.equals(STATUS.LAYER_LOADED)) { cachingLayers(); } } }); When the event is fired i get an error that sais that the Graphics of the FeatureLayer have not been loaded correctly. But my oppinion is, when the event, that the FeatureLayer has been loaded correctly, was fired, all properties should be initialized. The really interesting thing is the following: When i put a Thread.sleep(500) before the Method cachingLayers() all properties have been loaded and the caching works. I think this is quite strange and looks to me like a bug. Has anyone perhaps an idea?
... View more
01-11-2013
01:33 AM
|
0
|
2
|
793
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|