<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: I can't show web map using AGSWebMap in ArcGIS Runtime SDK for iOS Questions</title>
    <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520217#M4462</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have retained webMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
@property (retain, nonatomic) IBOutlet AGSMapView *mapView;
@property (retain, nonatomic) AGSWebMap *webmap;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 11 Dec 2021 22:41:12 GMT</pubDate>
    <dc:creator>haiwang</dc:creator>
    <dc:date>2021-12-11T22:41:12Z</dc:date>
    <item>
      <title>I can't show web map using AGSWebMap</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520216#M4461</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="plain" name="code"&gt;
- (void) webMapDidLoad:(AGSWebMap*) webMap {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //webmap data was retrieved successfully
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"load successfully");
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.webmap openIntoMapView:self.mapView];
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self.mapView setNeedsDisplay];
}

- (void) webMap:(AGSWebMap *)webMap didFailToLoadWithError:(NSError *)error {
&amp;nbsp;&amp;nbsp;&amp;nbsp; //webmap data was not retrieved
&amp;nbsp;&amp;nbsp;&amp;nbsp; //alert the user
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Error while loading webmap: %@",[error localizedDescription]);
}

-(void)didOpenWebMap:(AGSWebMap*)webMap intoMapView:(AGSMapView*)mapView{
&amp;nbsp;&amp;nbsp;&amp;nbsp; //web map finished opening
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"delegate method: didOpenWebMap:(AGSWebMap*)webMap intoMapView:(AGSMapView*)mapView");
}

-(void)didLoadLayer:(AGSLayer*)layer{
&amp;nbsp;&amp;nbsp;&amp;nbsp; //layer in web map loaded properly
}

- (void)viewDidLoad
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; [super viewDidLoad];

&amp;nbsp;&amp;nbsp;&amp;nbsp; NSString *mapId = @"49c555e22cdf480181153f35d18f8863";//1d105a71e3eb499383e4b7556f0bbc34
&amp;nbsp;&amp;nbsp;&amp;nbsp; self.webmap = [[AGSWebMap alloc] initWithItemId:mapId credential:nil];
&amp;nbsp;&amp;nbsp;&amp;nbsp; self.webmap.delegate = self;
&amp;nbsp;&amp;nbsp;&amp;nbsp; 
}

-(void)didFailToLoadLayer:(NSString*)layerTitle url:(NSURL*)url baseLayer:(BOOL)baseLayer withError:(NSError*)error
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; NSLog(@"Error while loading layer: %@",[error localizedDescription]);
}

- (void)viewDidUnload
{
&amp;nbsp;&amp;nbsp;&amp;nbsp; [self setMapView:nil];
&amp;nbsp;&amp;nbsp;&amp;nbsp; self.webmap = nil;
&amp;nbsp;&amp;nbsp;&amp;nbsp; [super viewDidUnload];
&amp;nbsp;&amp;nbsp;&amp;nbsp; // Release any retained subviews of the main view.
&amp;nbsp;&amp;nbsp;&amp;nbsp; // e.g. self.myOutlet = nil;
}

&lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;console output:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;GNU gdb 6.3.50-20050815 (Apple version gdb-1708) (Thu Nov&amp;nbsp; 3 21:59:02 UTC 2011)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Copyright 2004 Free Software Foundation, Inc.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;GDB is free software, covered by the GNU General Public License, and you are&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;welcome to change it and/or distribute copies of it under certain conditions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Type "show copying" to see the conditions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;There is absolutely no warranty for GDB.&amp;nbsp; Type "show warranty" for details.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;This GDB was configured as "x86_64-apple-darwin".sharedlibrary apply-load-rules all&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Attaching to process 1092.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2012-02-11 15:38:32.540 HelloArcGis[1092:f203] load successfully&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2012-02-11 15:38:32.544 HelloArcGis[1092:f203] delegate method: didOpenWebMap:(AGSWebMap*)webMap intoMapView:(AGSMapView*)mapView&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Feb 2012 05:44:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520216#M4461</guid>
      <dc:creator>haiwang</dc:creator>
      <dc:date>2012-02-11T05:44:26Z</dc:date>
    </item>
    <item>
      <title>Re: I can't show web map using AGSWebMap</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520217#M4462</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have retained webMap&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;
@property (retain, nonatomic) IBOutlet AGSMapView *mapView;
@property (retain, nonatomic) AGSWebMap *webmap;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:41:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520217#M4462</guid>
      <dc:creator>haiwang</dc:creator>
      <dc:date>2021-12-11T22:41:12Z</dc:date>
    </item>
    <item>
      <title>Re: I can't show web map using AGSWebMap</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520218#M4463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Nobody can help ?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 10:04:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520218#M4463</guid>
      <dc:creator>haiwang</dc:creator>
      <dc:date>2012-02-13T10:04:34Z</dc:date>
    </item>
    <item>
      <title>Re: I can't show web map using AGSWebMap</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520219#M4464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Did you make the connection between the property and Interface Builder object?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Feb 2012 11:36:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520219#M4464</guid>
      <dc:creator>PaulLohr</dc:creator>
      <dc:date>2012-02-13T11:36:02Z</dc:date>
    </item>
    <item>
      <title>Re: I can't show web map using AGSWebMap</title>
      <link>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520220#M4465</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I think the problem is that your WebMap has as its basemap layer a Bing Maps layer, for which you need to specify your Bing Maps key.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you add this delegate method, and return your key, you should be good to go:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;-(NSString*)bingAppId{
&amp;nbsp;&amp;nbsp;&amp;nbsp; return @"YOUR BING MAPS KEY";
}&lt;/PRE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;A href="http://msdn.microsoft.com/en-us/library/ff428642.aspx" rel="nofollow noopener noreferrer" target="_blank"&gt;This page&lt;/A&gt;&lt;SPAN&gt; tells you how to go about getting a key. See also the &lt;/SPAN&gt;&lt;A href="http://help.arcgis.com/en/arcgismobile/10.0/apis/iOS/2.1/concepts/index.html#/Viewing_a_Web_Map/00pw00000055000000/" rel="nofollow noopener noreferrer" target="_blank"&gt;sample delegate&lt;/A&gt;&lt;SPAN&gt; in the Concepts document.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Hope this helps. Let us know how you get on.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Nick.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:41:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-runtime-sdk-for-ios-questions/i-can-t-show-web-map-using-agswebmap/m-p/520220#M4465</guid>
      <dc:creator>Nicholas-Furness</dc:creator>
      <dc:date>2021-12-11T22:41:15Z</dc:date>
    </item>
  </channel>
</rss>

