jose_morales

I can't show a web map using AGSWebMap

Discussion created by jose_morales on Dec 19, 2011
Latest reply on Dec 22, 2011 by jose_morales
I am trying to show a online map using AGSWebMap but I don't know exactly how doing.

This is my code: ViewController.h
#import <UIKit/UIKit.h>
#import "ArcGis.h"

@interface ViewController : UIViewController 
@property (retain, nonatomic) IBOutlet AGSMapView *mapView;
    
@end


ViewController.m
#import "ViewController.h"

@implementation ViewController
@synthesize mapView;
.....

- (void) openIntoMapView: (AGSMapView*) mapView {
    AGSCredential* credential = [[[AGSCredential alloc] initWithUser:@"<my_user_name>" password:@"<My_passdword>"] autorelease];
    credential.authType = AGSAuthenticationTypeToken;
    AGSWebMap* webmap = [[AGSWebMap alloc] initWithItemId:@"e20f2f98b35c4963a5e124bf43c1d74a" credential:credential];
}



I received a message from Xcode "Unusued variable webmap" and the simulator show a white screen. Could anyone help me to solve this error? Thanks

Outcomes