POST
|
You can write a method in the On Form Load event. Get the X,Y of the location . Then to get the point features get the distance to the point using FindNearestXY method of the Recordset object of the particular layer you are interested in. For polygon feature layer you can use the ISPointIn method to see the point is contained within which polygon . Once you get the feature yo can easily populate the fields in the form using the fielld values. Thanks Suman
... View more
01-31-2014
06:14 PM
|
0
|
0
|
97
|
POST
|
We are developing a customised ArcPad Windows Mobile 6 application for utiliy industry. There are many layers - like Primary Conductor, Transformer, SEcondary Conductor etc which we are exporting as Background layers in AXF. There are some other 4 feature layers used for capturing data points in the field. Also we developed a custom arcPad form. At each location we are adding many units in the same form. These are not connected to any database fields. We push the data to the database when the user clicks OK. Besides we also have an applet with different tools and we also have different eventhandler code for the events associated with Map and GPS - like new feature added, on featuredeleted, onpointerdown etc. But we are facing a memory issue in our application. When the memory consumption of ArcPad reaches 16.5 MB we start getting low memory warning and the map does not refresh properly. Even the map navigator sometimes does not show. I also found that whenever I push data in the AXF tables through VBScript the memory consumption jumps by around 1 MB. But if the data is pushed through native forms without using any script the memory consumption does not increase. So I want to know what is the best way to push data in AXF and what can be a better way way to handle the low memorywarnings. Also when the GPS is on the application becomes very slow. . Below is one method where there is memory leak. Even if I use Recordset AddNew method to add the record still the same behavior. Sub SaveUnits Dim strSQL,nRecords,feature, unitsDatasource,locationForm,mode,unitsLayer,unitsRecords,comments,objid, delObj Set unitsLayer = Map.layers("GPSUnits") Set unitsDatasource = Application.Map.Layers("GPSUnits").DataSource Set locationForm = Map.Layers("GPSLocations").forms("EDITFORM") mode = locationForm.Mode If mode=3 then Application.UserProperties ("NewlocationX") = locationForm_X Application.UserProperties ("NewlocationY") = locationForm_Y Application.UserProperties ("NewlocationID") = locationID for each feature in existingAssemblies strSQL="insert into GPSUnits(CLASSNAME,QUANTITY,STATUS,LOCATIONID,NAME,BEHAVIOR,SHAPE_X,SHAPE_Y,AXF_TIMESTAMP,AXF_STATUS,COMMENTS,Type,JOBID) values ('" &_ feature(3) & "'," & feature(1) & ",'" & feature(2) & "'," & locationID & ",'" & feature(0) & "','" & feature(5) & "'," & locationForm_X & "," &_ locationForm_Y & ",'" & Now & "',1,'"& feature(6) & "','"& feature(7) & "','" & Application.UserProperties("JobID") & "')" nRecords = unitsDatasource.Execute(strSQL) Next else for each feature in existingAssemblies comments = feature(6) if comments = null then comments = "" end if objid = feature(4) if IsNull(objid) then strSQL="insert into GPSUnits(CLASSNAME,QUANTITY,STATUS,LOCATIONID,NAME,BEHAVIOR,SHAPE_X,SHAPE_Y,AXF_TIMESTAMP,AXF_STATUS,COMMENTS,Type,JOBID) values ('" &_ feature(3) & "'," & feature(1) & ",'" & feature(2) & "'," & Application.UserProperties ("locationID") & ",'" & feature(0) & "','" & feature(5) & "'," & locationForm.Fields.Shape.X & "," &_ locationForm.Fields.Shape.Y & ",'" & Now & "',1,'"& feature(6) & "','"& feature(7) &"','" & Application.UserProperties("JobID") & "')" nRecords = unitsDatasource.Execute(strSQL) else strSQL = "update GPSUnits Set QUANTITY = " & feature(1) & ",STATUS = '" & feature(2) & "',COMMENTS = '" & comments & "' where AXF_OBJECTID= "& feature(4) nRecords = unitsDatasource.Execute(strSQL) end if Next for each feature in deletedAssemblyList delObj = feature(4) if Not (IsNull(delObj)) then strSQL = "Delete from GPSUnits where AXF_OBJECTID= "& feature(4) nRecords = unitsDatasource.Execute(strSQL) End if Next End if Map.Refresh(true) Application.Map.Layers("GPSLocations").Properties ("ShowEditForm") = True Set unitsLayer = Nothing Set unitsDatasource=Nothing Set locationForm = Nothing End Sub Can anyone point me out how can I optimise the above method. We are going to take a decision on the application based on the memory leak issue. Thanks for helping Suman
... View more
01-31-2014
05:36 PM
|
0
|
0
|
2961
|
POST
|
never mind. found the right dll to connect to AXF. Thanks!
... View more
10-16-2013
01:32 PM
|
0
|
0
|
123
|
POST
|
We are developing an ArcPad customised application to be deployed in Windows Mobile 6.0. In that we are developing a .Net form where we are trying to connect to .AXF database. The solution is getting built and is also getting deployed in the device and also in the emulator without any issues. But when we are tring to connect with the .AXF it is throwing an exception - {"The database file has been created by an earlier version of SQL Server Compact. Please upgrade using SqlCeEngine.Upgrade() method."} System.Data.SqlServerCe.SqlCeException {System.Data.SqlServerCe.SqlCeInvalidDatabaseFormatException} I am getting the same error while using .net framework 3.0 /3.5 I tried the DotNetIntegration samples that comes with ArcPad. Even they are giving the same errors. So wondering how to connect to an Axf database in .net form??
... View more
10-16-2013
12:23 PM
|
0
|
1
|
574
|
POST
|
In ArcReader10.1 when I try to set the CurrentARTool of a ArcReaderControl to any markup tools e.g esriARToolMarkUpHighlightYellow, everything goes into a limbo. It does not seem to work. But in 9.3.1 this works fine. So I am wondering how can I use the markUp tools in ArcReader 10.1
... View more
06-11-2013
05:16 PM
|
0
|
1
|
2838
|
POST
|
Yes, I am listing some of the errors that we are getting 1) ERROR INFO = Unable to instantiate class for xml schema type: MapDescription 2 )Method failed.HRESULT = 0x80043068 : This is a FACILITY_ITF error that is specific to the interface that returned this error. See the documentation of the interface that returned this error for information about this HRESULT. 3)Unable to instantiate class for xml schema type: LayerDescription 4)Container process 7352 has crashed on machine memdmzgisapp1. 5)Server Context creation failed on machine memdmzgisapp1 Once we restart the services the application again starts working. So I think there is some code in the application side which is failing the service. But just could not detect. Thanks for asking Suman
... View more
01-17-2012
06:05 AM
|
0
|
0
|
212
|
POST
|
We developed a flex application by customising the flexviewer. Its version is 2.4. There is a landing page from which the user can select a theme and go into the viewer application. There is a separate config.xml file for each of the themes. The functionalities present in the application are - Query, Search,address search and loading of different set of maps when switching between Streets and Aerial tab. But the problem is it gives random errors like - unable to find the config.xml file or popupconfig.xml file in the first instance which of course goes away when I restart the application again. Then another error we get is that - some of the services fails to show up. When I check at the rest end point I find the service to be not responding. Then if I restart the service the application works fine. But we are facing the issue randomly and it refuses to go away. We contacted the ESRI support but still we do not have any solution. If anyone can help in fixing the issue it will be really great!! Thanks Suman
... View more
01-17-2012
05:49 AM
|
0
|
0
|
2192
|
POST
|
Hi, We have a flex application using arcgis server api 9.3.1. It has very basic functionalities. But problem is occasionally the service fails. Say , I was viewing the application using one dynamic map service with 4 feature layers. Initially the layer loaded correctly. But when I zoomed on one feature say, Park the service fails and the parks feature layer in that service fails to load although other layers in that service loaded correctly. I checked the rest end point after that. The park feature layer failed to show even in the javascript API. This is a problem we are facing for quite a few days. If anybody has an idea of how to solve the issue it will be of great help. Thanks Suman
... View more
01-14-2012
08:13 AM
|
0
|
2
|
3001
|
POST
|
Hi Nimesh, Thanks for taking so much pain. I am not able to attach the project here although the compressed project(.zip) is 1.2 MB. Can you send me an email address where I can send the zipped project. It will be really very helpful as I got stuck in it. Thanks Suman
... View more
03-15-2011
06:46 PM
|
0
|
0
|
377
|
POST
|
Hi Nimesh, Thanks! I am using the map service from arcgisonline . static NSString *kMapServiceURL=@"http://services.arcgisonline.com/ArcGIS/rest/services/ESRI_StreetMap_World_2D/MapServer"; The spatial reference of the map as found in debugging is wkid :4326 wkt:nil The spatial reference of the points stored in the NSMutableArray geomObject is : wkid:4326 wkt: out of scope.//although before getting added to the array the points have a wkt:nil This is the code that is getting fired on clicking on the map and where the points are getting stored in the array. - (void) mapView: (AGSMapView *) mapView didClickAtPoint: (CGPoint) screen mapPoint: (AGSPoint *) mappoint graphics: (NSDictionary *) graphics { // adding a point GisAppAppDelegate *mapDelegate =(GisAppAppDelegate *)[[UIApplication sharedApplication] delegate]; int k = [mapDelegate.geomObject count]; if (k == 0){ NSMutableArray * geometryArray = [NSMutableArray array]; [geometryArray addObject: mappoint]; mapDelegate.geomObject = geometryArray; } else { [mapDelegate.geomObject addObject:mappoint]; } [self drawLine]; }
... View more
03-14-2011
06:05 PM
|
0
|
0
|
377
|
POST
|
Hi, I am trying to add a polyline to a graphics layer. But it is not getting displayed although it is not giving any error. Any help is highly appreciated!! Thanks Suman The code is as below: -(void)drawLine{ GisAppAppDelegate *mapDelegate =(GisAppAppDelegate *)[[UIApplication sharedApplication] delegate]; int i= [mapDelegate.geomObject count];// geomObject is a mutableArray in which I am storing the AGSPoint on map click if(i >= 2){ AGSMutablePolyline *polyline = [[AGSMutablePolyline alloc] initWithSpatialReference:self.mapView.spatialReference]; AGSSimpleLineSymbol *ln1=[AGSSimpleLineSymbol simpleLineSymbol]; ln1.color = [UIColor colorWithRed:9 green:0 blue: 0 alpha:0.5]; ln1.width = 5.0; ln1.style = AGSSimpleLineSymbolStyleSolid; [polyline addPathToPolyline]; for (int x1=0; x1< i; x1++) { AGSPoint *mappoint= [self.geomObject objectAtIndex:x1]; [polyline addPointToPath:[AGSPoint pointWithX:mappoint.x y:mappoint.y spatialReference:nil]]; } AGSGraphic *line=[[AGSGraphic alloc] initWithGeometry:polyline symbol:ln1 attributes:nil infoTemplateDelegate:nil]; [self.myGraphicsLayer removeAllGraphics]; [self.myGraphicsLayer addGraphic:line]; [self.myGraphicsLayer dataChanged]; } }
... View more
03-13-2011
08:45 PM
|
0
|
5
|
715
|
POST
|
Hi All, I found out the problem. Its because I did not add the -ObjC and -all_load flags in the Other linker flags under Edit Active Target settings. Thanks
... View more
02-05-2011
04:33 PM
|
0
|
0
|
109
|
POST
|
Hi, I am new to this iOS programming. I have worked with some applications without map. They works fine. But I just started adding a map layer from ArcGISServerOnline following their examples. But my application in the simulator 4.2 crashes with the message "Program received signal SIGABRT" (on debugging) when executing the line marked red below: - (void)viewDidLoad { // ----- US highways from ESRI NSURL *url = [NSURL URLWithString: @"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer"]; //It crashes on executing the line below AGSDynamicMapServiceLayer *highwayLayer = [AGSDynamicMapServiceLayer dynamicMapServiceLayerWithURL: url]; [self.mapView addMapLayer:highwayLayer withName:@"US Highways"]; [super viewDidLoad]; } I will really appreciate if somebody figures out the problem Thanks Suman
... View more
02-05-2011
09:23 AM
|
0
|
1
|
685
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:23 AM
|