Select to view content in your preferred language

Producing a call out and popup using .tpk as feature layer

2460
4
Jump to solution
08-31-2012 12:46 PM
JohnMcleod1
Regular Contributor
Hello Everyone,
How do I accomplish this?
I've done it using a WebMap but not with a tile package.

I'm thinking it's somewhere in the code below.

-(void)mapView:(AGSMapView *)mapView didClickCalloutAccessoryButtonForGraphic:(AGSGraphic *)graphic{          self.activeFeatureLayer = (AGSFeatureLayer*) graphic.layer;          AGSPopupInfo *info = [AGSPopupInfo popupInfoForGraphic:graphic];          NSLog(@"%@",graphic.layer.name);          //Show popup for the graphic because the user tapped on the callout accessory button     info.title = @"Parcel Information";          //if (![graphic.layer.name isEqualToString:@"Kochville_Township_Aerials"]){         //ADDED THIS LINE FROM THE "Related Record Editing Sample"         //self.popupVC = [[[AGSPopupsContainerViewController alloc] initWithPopupInfo:info graphic:graphic usingNavigationControllerStack:NO] autorelease];              //COMMENTED MY CODE         self.popupVC = [[[AGSPopupsContainerViewController alloc] initWithWebMap:self.webmap forFeature:graphic usingNavigationControllerStack:NO] autorelease];                  self.popupVC.delegate = self;         self.popupVC.modalTransitionStyle =  UIModalTransitionStyleFlipHorizontal;                  //If iPad, use a modal presentation style         if([[UIDevice currentDevice] isIPad])             self.popupVC.modalPresentationStyle = UIModalPresentationFormSheet;         [self presentModalViewController:self.popupVC animated:YES];              //}      }


more directly at

self.popupVC = [[[AGSPopupsContainerViewController alloc] initWithWebMap:self.webmap forFeature:graphic usingNavigationControllerStack:NO] autorelease];


Any help with this will be greatly appreciated.
Thanks,
John
0 Kudos
1 Solution

Accepted Solutions
DiveshGoyal
Esri Regular Contributor
A tile package only contains rasterized information about the map (map images if you will). Feature geometries and attributes are not stored. Consequently, you cannot identify features in a tile package and display popups for them.

The Online-Offline sample is a better fit for you, but it may not be able to handle a large number of features.

View solution in original post

0 Kudos
4 Replies
NimeshJarecha
Esri Regular Contributor
I'm not clear what you want to do by your question. Could you please elaborate?

Regards,
Nimesh
0 Kudos
JohnMcleod1
Regular Contributor
My apologizes.
I have a project that has a web map that allows a call out and popup with attributes on a touch of a "parcel" layer.

Now, the client wishes this map to be totally on the App.  This will allow field personnel to view the map without network access.

I have ArcGIS 10.1 and I have created the .tpk files necessary.  The layers load and display onto map fine.

Next, I need to allow a call out for a particular parcel.  I tried to copy the code from the web map version and found it doesn't work.  I assume I'm using the wrong methods.

I've been looking at the OnlineOffline Sample and can't find my solution.
I've attached the TileMapViewController.h/.m files.  I'm not sure what I'm missing.

Thank you,
John
0 Kudos
DiveshGoyal
Esri Regular Contributor
A tile package only contains rasterized information about the map (map images if you will). Feature geometries and attributes are not stored. Consequently, you cannot identify features in a tile package and display popups for them.

The Online-Offline sample is a better fit for you, but it may not be able to handle a large number of features.
0 Kudos
JohnMcleod1
Regular Contributor
Thanks for the reply.
I'm looking to web maps instead.
the .tpk I created is a very large file and the project will not fall under the 20MB limit set by Apple App Store submittal.
John
0 Kudos