ARCGIS IOS Development Delegates Not Connecting/Working -


this question exact duplicate of:

i'm new arcgis easy on me.

i have uiview in nib changed agsmapview referenced in uiviewcontroller class holds <arcgis/arcgis.h> package. okay think i've done right far.

after running code below in viewdidload, can add view map appear on simulator.

nsurl* url = [nsurl urlwithstring:ktiledmapserviceurl]; agstiledmapservicelayer *tiledlayer = [agstiledmapservicelayer tiledmapservicelayerwithurl:url]; [self.mapview addmaplayer:tiledlayer withname:@"ktiledmapserviceurl"]; 

from here want access - (void)mapviewdidload:(agsmapview *) mapview can add users location.

anyways add agsmapviewlayerdelegate , set self.mapview.layerdelegate = self;. code looks below.

- (void)viewdidload  { [super viewdidload]; nsurl* url = [nsurl urlwithstring:@"http://services.arcgisonline.com/arcgis/rest/services/canvas/world_light_gray_base/mapserver"]; agstiledmapservicelayer *tiledlayer = [agstiledmapservicelayer tiledmapservicelayerwithurl:url]; [self.mapview addmaplayer:tiledlayer withname:@"basemap tiled layer"];  self.mapview.layerdelegate = self; }   - (void)mapviewdidload:(agsmapview *) mapview  {  [mapview.locationdisplay startdatasource]; } 

anyways whatever reason can never mapviewdidload called, or matter other events in arcgis. believe i'm doing should, if has ideas why occurring, appreciate them.

well, possible don't adopt protocol view controller like:

viewcontroller: uiviewcontroller <agsmapviewlayerdelegate> 

Comments

Popular posts from this blog

c# - Send Image in Json : 400 Bad request -

jquery - Fancybox - apply a function to several elements -

An easy way to program an Android keyboard layout app -