|
POST
|
No, it is not in v100. Looks like it might make it into an update in the future, probably not the next one.
... View more
02-21-2017
01:44 PM
|
0
|
0
|
1385
|
|
POST
|
This is in the iOS forum. It would be best to ask this in the Android SDK forum to get an answer from the Android team. That being said, I will forward this question to some Android team members that I know so hopefully you will get some kind of response.
... View more
02-15-2017
07:14 PM
|
0
|
1
|
991
|
|
POST
|
XCode compresses PNG files and makes them un-readable by our png library. In your target build settings - try setting "Compress PNG Files" to "NO". Then run your project again and it should work.
... View more
02-15-2017
07:13 PM
|
0
|
3
|
2146
|
|
POST
|
The user defaults doesn't take just any object. You have a few options. One option is that you can put the JSON Dictionary representation of the view point in the user defaults using the toJSON method. This is what I think you should do. Then when you pull it out of the user defaults, use the fromJSON. AGSViewpoint is AGSJSONSerializable and has the to/fromJSON methods.
... View more
01-30-2017
06:10 PM
|
0
|
0
|
1250
|
|
POST
|
When you go to open the second map with the tpk, you just need to use the same viewpoint you currently have. You just ask the mapView for the currentViewpoint, then when you open the second map you set the initial viewpoint of it to that previous viewpoint. // get current viewpoint
let vp = mapView.currentViewpoint(with: .centerAndScale)
// if you want to see the coordinates of it, you do that like so
print("viewpoint scale: \(vp?.targetScale)")
print("viewpoint center: \(vp?.targetGeometry as! AGSPoint)")
let map2 = AGSMap()
// add tpk layers, etc here
// ...
// ...
//
// when you open the second map set the initial viewpoint to the
// viewpoint that you saved
map2.initialViewpoint = vp
// open second map
mapView.map = map2
... View more
01-25-2017
11:40 AM
|
2
|
2
|
1250
|
|
POST
|
This is an issue that I can log and we can look into. The good news is that in the meantime you can try this workaround below. This kicks off a request manually, telling the request to save the data to disk (instead of memory) and also to use the portal's credentials. You already have a portal and portal item, so you don't need those 2 lines. The rest should get you going. func fetchData(){
portal = AGSPortal.arcGISOnline(withLoginRequired: true)
let pi = AGSPortalItem(portal: self.portal!, itemID: "c580e6bbaedc4c6e82b9c50fbe6b46fd")
// get url for fetching data endpoint
if let fetchDataURL = portal?.url?.appendingPathComponent("sharing/rest/content/items/\(pi.itemID)/data"){
// create an operation setting the remote resource as the portal (so that it will use the portal's credentials)
let op = AGSRequestOperation(remoteResource: portal, url: fetchDataURL, queryParameters: nil)
// set output file so that the data isn't stored in memory as it's downloaded
op.outputFileURL = FileManager.default.temporaryDirectory.appendingPathComponent("myData.dat")
// set completion handler
op.registerListener(self){ result, error in
if let error = error{
// download of data failed
print("error occurred: \(error.localizedDescription)")
}
else if let outputFile = result as? URL{
// download is complete and file is saved to disk
print("download complete: \(outputFile)")
}
}
// add the operation to the shared queue so that it can start
AGSOperationQueue.shared().addOperation(op)
}
}
... View more
01-23-2017
10:22 AM
|
3
|
1
|
742
|
|
POST
|
Brett, Nick Furness pointed out to me that you need to actually union the lines together first to get what you are looking for. Here is objective-c code to do what you need: @interface AGSPolyline (intersects)
-(NSArray<AGSPoint*>*)intersectionWithLine:(AGSPolyline*)line2;
@end
@implementation AGSPolyline (intersects)
-(NSArray<AGSPoint*>*)intersectionWithLine:(AGSPolyline*)line2{
NSMutableArray *points = [NSMutableArray array];
// first union the lines together
AGSPolyline *lineUnion = (AGSPolyline*)[AGSGeometryEngine unionOfGeometry1:self geometry2:line2];
// now get the intersecting line of union'ed line and self
AGSPolyline *line3 = (AGSPolyline*)[AGSGeometryEngine intersectionOfGeometry1:self geometry2:lineUnion];
double tolerance = 1e-10;
for (AGSPart *part in line3.parts){
for (AGSPoint *point in part.points){
double distance = [AGSGeometryEngine distanceBetweenGeometry1:point geometry2:line2];
// if the point is on the passed-in line then add it to the return value
if (distance < tolerance){
[points addObject:point];
}
}
}
return [points copy];
}
@end
-(void)testLineIntersection{
AGSPolyline *lineAB = [AGSPolyline polylineWithPoints:@[AGSPointMakeWGS84(0, 0), AGSPointMakeWGS84(10, 10)]];
AGSPolyline *lineCD = [AGSPolyline polylineWithPoints:@[AGSPointMakeWGS84(0, 10), AGSPointMakeWGS84(10, 0)]];
NSArray *pointsE = [lineAB intersectionWithLine:lineCD];
NSLog(@"intersection points: %@", pointsE);
}
Thanks to Nick Furness for pointing this out. He also provided the swift code, which I converted to objective-c.
... View more
01-04-2017
03:13 PM
|
3
|
3
|
1477
|
|
POST
|
Actually - you should get back a line when intersecting 2 lines. My first answer above is incorrect, I will remove it for clarity. Code should look something like this: -(void)lineIntersection{
AGSPolyline *lineAB = [AGSPolyline polylineWithPoints:@[AGSPointMakeWGS84(0, 0), AGSPointMakeWGS84(10, 10)]];
AGSPolyline *lineCD = [AGSPolyline polylineWithPoints:@[AGSPointMakeWGS84(0, 10), AGSPointMakeWGS84(10, 0), AGSPointMakeWGS84(5, 10), AGSPointMakeWGS84(0, 0), AGSPointMakeWGS84(10, 10)]];
AGSPolyline *lineE = (AGSPolyline*)[AGSGeometryEngine intersectionOfGeometry1:lineAB geometry2:lineCD];
NSLog(@"lineE: %@", lineE);
}
... View more
01-04-2017
09:22 AM
|
2
|
2
|
1477
|
|
POST
|
It is fixed now in version 100.0.0, which was recently released in November.
... View more
01-03-2017
09:29 AM
|
0
|
2
|
1845
|
|
POST
|
SBJson was a third party library that has no longer been necessary the last few years now that Apple has shipped NSJSONSerialization. Objects that support AGSJSONSerializable have a toJSON method you can call. That will give you a JSON object (most likely an NSDictionary, but could be an NSArray). You can use that JSON object with NSJSONSerialization to get NSData: AGSObject -> NSDictionary -> NSJSONSerialization -> NSData You can also go the other way if you have NSData: NSData -> NSJSONSerialization -> NSDictionary -> AGSObject Here is sample code showing you how to do both: -(void)testJSONSerialization{
// Example 1: AGSPoint to NSData of JSON string...
//
AGSPoint *point = [AGSPoint pointWithX:34 y:-117 spatialReference:[AGSSpatialReference WGS84]];
id jsonObject = [point toJSON:nil];
NSData *data = [NSJSONSerialization dataWithJSONObject:jsonObject options:0 error:nil];
// do whatever you want with the NSData...
// ...
// ...
// For example print out a json string:
NSLog(@"the json string: %@", [[NSString alloc]initWithData:data encoding:NSUTF8StringEncoding]);
// Example 2: NSData of JSON String to AGSPoint
//
id jsonObject2 = [NSJSONSerialization JSONObjectWithData:data options:0 error:nil];
AGSPoint *point2 = (AGSPoint*)[AGSPoint fromJSON:jsonObject2 error:nil];
// print out and test for equality
NSLog(@"point1: %@", point);
NSLog(@"point2: %@", point2);
NSAssert([point isEqualToGeometry:point2], @"point comparison failed...");
}
... View more
12-12-2016
08:56 AM
|
0
|
1
|
567
|
|
POST
|
Maximo Mobile, We are going to be releasing some 10.2.5 Objective-C sample code that has been ported to version 100.0.0. A potentially very helpful aspect of this will be that you will be able to easily run a diff between the 10.2.5 sample code and the v100.0.0 sample code as they will both be in a github repository. Stay tuned - we are working very hard to get this out ASAP. thanks
... View more
12-06-2016
08:51 AM
|
0
|
2
|
1599
|
|
POST
|
here is a decent thread on the topic: App Transport Security REQUIRED January 2017 | Apple Developer Forums
... View more
12-06-2016
08:38 AM
|
0
|
0
|
816
|
|
POST
|
The only thing I can think of is that you are somehow referencing an old version of the sdk. Have you followed the steps in the documentation for setting up your project with the 100.0.0 version of the framework?
... View more
12-02-2016
08:40 AM
|
0
|
0
|
1734
|
|
POST
|
Is your project settings set to use swift 3.0 or swift 2.3?
... View more
12-01-2016
10:34 AM
|
0
|
2
|
1734
|
|
POST
|
With swift 3 the code would look like this to do a query against a ServiceFeatureTable. Make sure to hold a reference to the ServiceFeatureTable so that it doesn't go out of scope and get deallocd before the request is finished. sft = AGSServiceFeatureTable(url: URL(string: "https://sampleserver3.arcgisonline.com/ArcGIS/rest/services/SanFrancisco/311Incidents/FeatureServer/0")!)
sft.featureRequestMode = .onInteractionNoCache
let qp = AGSQueryParameters()
qp.whereClause = "req_type = 'Sidewalk and Curb Issues'"
sft.queryFeatures(with: qp, fields: .loadAll){ result, error in
if let error = error {
print("error querying: \(error)")
}
else{
print("result: \(result)")
let enumerator = result?.featureEnumerator()
while let feature = enumerator?.nextObject(){
print("feature: \(feature)")
}
}
}
... View more
11-22-2016
03:01 PM
|
1
|
0
|
768
|
| Title | Kudos | Posted |
|---|---|---|
| 1 | 04-21-2025 11:36 AM | |
| 1 | 01-13-2025 02:52 PM | |
| 1 | 12-04-2018 09:10 AM | |
| 1 | 07-08-2021 07:45 AM | |
| 1 | 06-14-2021 08:03 AM |
| Online Status |
Offline
|
| Date Last Visited |
07-10-2025
01:36 PM
|