@interface MainViewController : UIViewController <AGSMapViewLayerDelegate, AGSPortalDelegate> { ... }
- (void)viewDidLoad { .... NSURL *url = [NSURL URLWithString:@"http://www.arcgis.com"]; AGSPortal *portal = [[[AGSPortal alloc] initWithURL:url credential:nil] autorelease]; portal.delegate = self; AGSPortalQueryParams *queryParam = [AGSPortalQueryParams queryParamsWithQuery:portal.portalInfo.basemapGalleryGroupQuery]; [portal findGroupsWithQueryParams:queryParam]; }
-(IBAction)baseMapToggle:(id)sender { AGSPortalItem *item = [self.baseMapItems objectAtIndex:6]; AGSWebMap* webMap = [[AGSWebMap alloc] initWithPortalItem:item]; webMap.delegate = self; } - (void) webMapDidLoad:(AGSWebMap*) webMap { //webmap data was retrieved successfully [webMap openIntoMapView:self.mapView withAlternateBaseMap:[webMap baseMap] resetMapView:NO]; }
[self.mapView removeMapLayerWithName:@Base Map]; [self.mapView insertMapLayer:self.baseMapLayer withName:@Base Map atIndex:0];
{portal_url}+"/sharing/rest/content/items"+{itemId}+"/info/"+{thumbnailFileName}
Aangemelde leden kunnen berichten plaatsen, updates volgen en meer. Nieuw hier? Registreer een gratis account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.