POST
|
Hi, I had the same issue and tried your approach but that didn't work. What I am doing?: 1. Create instance of SketchEditor based based on Selection of button (Point/Polyline/Polygon). 2. Add/assign the sketcheditor instance to map 3. Press a button to fetch GPS location 4. On receive location, project the point to my map's spatial reference 5. Add the point to Sketch editor Below is the code: let sketchEditor = self.sketchEditor() //Applied a style in the constructor let skectchEditConfiguration = self.getEditConfiguration() //Applied some configurations Point: isDrawToolStarted = sketchEditor!.start(with: .point, editConfiguration: skectchEditConfiguration) Polyline: isDrawToolStarted = sketchEditor!.start(with: .polyline, editConfiguration: skectchEditConfiguration) Polygon: isDrawToolStarted = sketchEditor!.start(with: .polygon, editConfiguration: skectchEditConfiguration) if isDrawToolStarted { self.mapView.sketchEditor = sketchEditor } Code for step 5: For Point: self.sketchEditor.replaceGeometry(projectedPoint as! AGSPoint) Output: The new point is not shown. If I tap on the map, a point is marked but if I fetch a GPS point and replace no point is shown. The debug log statements prints a point with correct spatial reference, but no visual. For Line: var arrayOfPoints = [AGSPoint]() arrayOfPoints.append(projectedPoint as! AGSPoint) let newPolyline = AGSPolyline(points: arrayOfPoints) self.sketchEditor?.replaceGeometry(newPolyline) and let isInserted = self.sketchEditor?.insertVertexAfterSelectedVertex(with: projectedPoint as! AGSPoint) Output: The new point is shown only if the sketch has at least one point already. The new point is not shown if no point is available on editor. log shows AGSPolyline: [], sr: 25833 and insertVertexAfterSelectedVertex returns false. If replace is applied no point is shown either. What could be the issue? Can you please have a look at the snippets. I added only the relevant code to the description rather than pasting all the code. Thanks.
... View more
08-07-2020
08:03 AM
|
0
|
0
|
829
|
POST
|
How to add a custom text (or graphic) that looks similar to water mark (ArcGIS's developer license) to my ios app. I want to keep my user informed something (a simple text), when he zooms in to the last tile of the TPK file.
... View more
08-23-2017
03:01 AM
|
0
|
1
|
463
|
POST
|
I am also using AGSLocalTiledLayer. The max scale supported by my TPK file is 5000, but I am looking to achieve the scale 1250. I was able to zoom in to the scale 1250 by setting the maxscale = 1250 to both my localTiledLayer and mapView. Doing this, I am able to zoom to scale 1250 (The last tiled image is zoomed/pixelated). I think we should be happy that the last tile is pixelated instead disappear altogether. I am not sure if this is what you were looking for. My other requirement is at the scale of 1250, when the user pans the map, the tile available at 5000 (last tile) should be loaded with pixelated view. Right now, when I pan outside my visible extent at 1250, there is no background/base map. Do you have any thoughts or approach that I can try?
... View more
07-05-2017
04:56 AM
|
0
|
0
|
422
|
POST
|
Hi! I am developing an iOS map using ArcGIS sdk. The app requires both online & offline use. We are dealing with dynamic map service to show the map. Online: I could load the map & and also added feature layers. I have used AGSDynamicMapServiceLayer map to load the dynamic map. Offline: I have downloaded the .geodatabase file to use offline. When the user clicks a button to switch offline, I am downloading the package & also added the features layers from the .geodatabase. Before adding I have removed the layers that are added when in online. Problem: When I scroll the map in offline the visible maps gets invisible & never loaded. My doubt is shouldn't we add a map layer & then add feature layers? code snippet: for (AGSLayer* lyr in weakSelf.mapView.mapLayers) { if([lyr isKindOfClass:[AGSFeatureTableLayer class]]) [weakSelf.mapView removeMapLayer:lyr]; } //add layers from local geodatabase weakSelf.geodatabase = geodatabase; NSArray *directoryContents = [[NSFileManager defaultManager] contentsOfDirectoryAtPath:folderPath error:nil]; for (AGSFeatureTable* fTable in geodatabase.featureTables) { if ([fTable hasGeometry]) { weakSelf.localFeatureTable = [weakSelf.geodatabase.featureTables objectAtIndex:0]; weakSelf.featureTableLayer = [[AGSFeatureTableLayer alloc]initWithFeatureTable:weakSelf.localFeatureTable]; [weakSelf.mapView addMapLayer:self.featureTableLayer]; } } } Am I missing something here. I could see the map screen that is visible before downloading the package, but it gets invisible when I scroll the map & never visible. This is my first app using ArcGIS. Kindly help me. Thanks in advance Regards
... View more
04-08-2015
06:17 AM
|
0
|
1
|
4003
|
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:25 AM
|