POST
|
We are using ArcGIS runtime SDK for Android and sometimes, we run into " Untrusted Host" error as seen in the screenshot below. It is not consistent and occurs when trying to display a public basemap form ArcGIS online service, like World Street map or world topo map etc. Is there any resolution to prevent this?
... View more
08-05-2020
10:32 AM
|
0
|
0
|
303
|
POST
|
I am using cocoapods to integrate ArcGIS SDK into my framework in xcode project. My Podfile looks like this: workspace 'MyAppWorkspace'
xcodeproj 'Frameworks/MyFramework/MyFramework.xcodeproj'
target 'MyFramework' do
platform :ios, '10.0'
pod 'ArcGIS-Runtime-SDK-iOS', '~> 10.2.5'
xcodeproj 'Frameworks/MyFramework/MyFramework.xcodeproj'
use_frameworks!
target 'MyFrameworkTests' do
inherit! :search_paths
# Pods for testing
end
end I am able to build MyFramework, however, the ArcGIS lib seems to be embedded inside MyFramework. Is there any way I can avoid this embedding?
... View more
05-11-2017
02:26 PM
|
0
|
1
|
587
|
POST
|
I am using .NET SDK v10.2.4, and recently I've started getting the following exception when trying to load basemap: A first chance exception of type 'System.Runtime.Serialization.SerializationException' occurred in mscorlib.dll 10:44:59 AM: System.Runtime.Serialization.SerializationException: There was an error deserializing the object of type Esri.ArcGISRuntime.ArcGISServices.MapServiceInfo. Encountered unexpected character '<'. ---> System.Xml.XmlException: Encountered unexpected character '<'. at System.Xml.XmlExceptionHelper.ThrowXmlException(XmlDictionaryReader reader, XmlException exception) at System.Runtime.Serialization.Json.XmlJsonReader.ReadAttributes() at System.Runtime.Serialization.Json.XmlJsonReader.ReadNonExistentElementName(StringHandleConstStringType elementName) at System.Runtime.Serialization.Json.XmlJsonReader.Read() at System.Xml.XmlBaseReader.IsStartElement() at System.Xml.XmlBaseReader.IsStartElement(XmlDictionaryString localName, XmlDictionaryString namespaceUri) at System.Runtime.Serialization.XmlReaderDelegator.IsStartElement(XmlDictionaryString localname, XmlDictionaryString ns) at System.Runtime.Serialization.XmlObjectSerializer.IsRootElement(XmlReaderDelegator reader, DataContract contract, XmlDictionaryString name, XmlDictionaryString ns) at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalIsStartObject(XmlReaderDelegator reader) at System.Runtime.Serialization.Json.DataContractJsonSerializer.InternalReadObject(XmlReaderDelegator xmlReader, Boolean verifyObjectName) at System.Runtime.Serialization.XmlObjectSerializer.InternalReadObject(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) at System.Runtime.Serialization.XmlObjectSerializer.ReadObjectHandleExceptions(XmlReaderDelegator reader, Boolean verifyObjectName, DataContractResolver dataContractResolver) --- End of inner exception stack trace --- at Esri.ArcGISRuntime.Layers.Layer.<InitializeAsync>b__3(Task`1 t) at System.Threading.Tasks.ContinuationTaskFromResultTask`1.InnerInvoke() at System.Threading.Tasks.Task.Execute() --- End of stack trace from previous location where exception was thrown --- at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task) at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task) at System.Runtime.CompilerServices.TaskAwaiter.GetResult() The code to initialize basemap is like this: private async Task InitializeBaseMapAsync(ArcGISTiledMapServiceLayer baseMap) { if (baseMap != null) { try { await baseMap.InitializeAsync(); if (baseMap.InitializationException != null) { ... } else { ... } baseMap.IsVisible = true; } catch (Exception ex) { ... } } Any help on whats going on or how I can resolve this issue will be greatly appreciated. Thanks.
... View more
07-06-2015
08:53 AM
|
0
|
0
|
4612
|
POST
|
Did you find a resolution to this? I am facing the same issue with ArcGIS Android SDK 10.2.3.
... View more
10-30-2014
09:38 AM
|
0
|
0
|
855
|
POST
|
I am implementing offline functionality in my application, and following the samples to download tiled cache as a .TPK file. When adding the layer the layer does not get displayed. Here is the relevant code snippet: // Set up GenerateTileCacheParameters ExportTileCacheParameters params = new ExportTileCacheParameters(true, desiredLevels, ExportBy.ID, extentForTPK, _map.getSpatialReference()); .... .... // Submit tile cache job and download exportTileCacheTask.generateTileCache(params, statusListener, new CallbackListener<String>() { private boolean errored = false; @Override public void onError(Throwable e) { } @Override public void onCallback(String path) { if (!errored) { Log.d(TAG, "Tiled cache successfully download to path: "+ path); } _localTiledLayer = new ArcGISLocalTiledLayer(path); _map.removeAll(); _map.addLayer(_localTiledLayer); } }, tileCachePath); If I follow the sample and download the compact cache by setting the first parameter in ExportTileCacheParameters() to false, _localTiledLayer loads and renders just fine. Note: I verified that the .tpk file gets saved successfully on the filesystem. Can someone point me our what am I missing?
... View more
09-16-2014
03:13 PM
|
0
|
0
|
3407
|
POST
|
Actually, it turns out that I was missing setting outFields in the feature leayer: featureLayer.outFields = [NSArray arrayWithObject:@"*"]; Once I did this, all the fields were accessible as attributes in the graphic.
... View more
08-04-2014
06:55 AM
|
3
|
0
|
488
|
POST
|
I am displaying one of the sample feature layers from ArcGIS online on my map and I want to show a callout when a graphic on the feature layer is selected (tapped). Following is a code snippet .. - (void)viewDidLoad { [super viewDidLoad]; self.mapView.callout.delegate = self; ... NSURL *featureLayerURL = [NSURL URLWithString:@"http://services.arcgis.com/oKgs2tbjK6zwTdvi/arcgis/rest/services/Major_World_Cities/FeatureServer/0"]; AGSFeatureLayer *featureLayer = [AGSFeatureLayer featureServiceLayerWithURL:featureLayerURL mode:AGSFeatureLayerModeOnDemand]; [self.mapView addMapLayer:featureLayer withName:@"CloudData"]; ... } -(BOOL)callout:(AGSCallout *)callout willShowForFeature:(id<AGSFeature>)feature layer:(AGSLayer<AGSHitTestable> *)layer mapPoint:(AGSPoint *)mapPoint { //Specify the callout's contents self.mapView.callout.title = (NSString*)[feature attributeForKey:@"NAME"]; self.mapView.callout.detail =(NSString*)[feature attributeForKey:@"COUNTRY"]; return YES; } However this sets title and details as nil, even though when I call this from the desktop browser (http://www.arcgis.com/home/webmap/viewer.html?url=http://services.arcgis.com/oKgs2tbjK6zwTdvi/ArcGIS/rest/services/Major_World_Cities/FeatureServer/0&source=sd) it shows the name, country and other attributes. What am I missing here? Is there a way to show the attributes/fields of the feature being selected? Any examples will be helpful too. Thanks
... View more
08-01-2014
11:19 AM
|
1
|
2
|
4116
|
POST
|
I have an app with tabbed activity. One of the tabs has the arcgis mapview. Initially the mapview with basemap shows up fine. When tab is changed, the mapSurface is destroyed. However, when the map tab is selected again, the log shows map surface re-created, but basemap is not shown. Below are the logs: TAB CHANGED: 03-20 15:55:46.030: D/ArcGIS.ThreadPool(10965): <<<<<1798007319,19.133793.194521 03-20 15:56:15.580: D/ArcGIS.LifeCycle(10965): MapSurface.destroyContext <start>:GLThread 6584 03-20 15:56:15.580: D/ArcGIS.LifeCycle(10965): MapSurface released 03-20 15:56:15.580: E/libEGL(10965): call to OpenGL ES API with no current context (logged once per thread) 03-20 15:56:15.620: D/ArcGIS.LifeCycle(10965): MapSurface.destroyContext <done> 03-20 15:56:30.120: D/ArcGIS.LifeCycle(10965): > MapSurface.Context created. com.esri.android.map.MapSurface{41b65c40 V.E..... ........ 0,0-1280,671} MAP TAB RESELECTED: 03-20 15:56:30.130: D/ArcGIS.LifeCycle(10965): MapSurface SurfaceCreated 03-20 15:56:30.130: D/ArcGIS.LifeCycle(10965): MapSurface SurfaceChanged:1280,671 I am suspecting the basemap layers get removed when MapSUrface is released. But no status change event occurs when mapSurface is recreated. Is there a way to listen to mapSurface change events? Kunal
... View more
03-20-2014
01:07 PM
|
0
|
0
|
467
|
POST
|
Thanks nfurness and Technobrat for your solutions. Both work, however, per nfurness's solution using buffer around the center point and webMercatorSpatialReference, I am getting an oval shape rather than a circle. Is this expected?
... View more
08-06-2013
12:40 PM
|
0
|
0
|
1355
|
POST
|
All, I found this solution to draw a circle as a polygon of 360 points: -(AGSPolygon*) circleWithCenter:(AGSPoint*)point raduis:(double)radius { AGSMutablePolygon * p = [AGSMutablePolygon new]; [p addRingToPolygon]; int pointsCount = 360; double slice = 2 * M_PI / pointsCount; for(int i = 0; i<pointsCount;i++){ double rad = slice * i; double px = point.x + radius * cos(rad); double py = point.y + radius * sin(rad); [p addPointToRing:[AGSPoint pointWithX:px y:py spatialReference:[AGSSpatialReference spatialReferenceWithWKID:4326]]]; } return p; } The question I have is what is the units of the radius passed in? For example, if I want to draw a circle of raduis 10 miles, what value do I pass in? If I pass in 10, it just draws a really huge circle with radius several multiples of 10! I tried to look into the sdk api docs and could not find much info, so any help will be appreciated.
... View more
08-05-2013
11:10 AM
|
0
|
15
|
8034
|
Title | Kudos | Posted |
---|---|---|
1 | 08-01-2014 11:19 AM | |
3 | 08-04-2014 06:55 AM |
Online Status |
Offline
|
Date Last Visited |
11-11-2020
02:24 AM
|