Skip to content
This repository has been archived by the owner on Jan 6, 2023. It is now read-only.

Commit

Permalink
Merge pull request #7 from alpascual/10.2
Browse files Browse the repository at this point in the history
iOS 7 changes
  • Loading branch information
dg0yal committed Sep 23, 2013
2 parents e0191f1 + 26637e6 commit d4c1056
Show file tree
Hide file tree
Showing 86 changed files with 4,868 additions and 5,340 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,5 @@ profile
DerivedData
.idea/
*.hmap

*.xccheckout
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,12 @@ @implementation AsynchronousGPSampleViewController

#pragma mark - View lifecycle

// in iOS7 this gets called and hides the status bar so the view does not go under the top iPhone status bar
- (BOOL)prefersStatusBarHidden
{
return YES;
}

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad {

Expand Down
941 changes: 470 additions & 471 deletions ClosestFacilitySample/ClosestFacilitySample.xcodeproj/project.pbxproj

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
#import "ActivityAlertView.h"

@interface ClosestFacilitySampleViewController : UIViewController
<AGSMapViewTouchDelegate, AGSClosestFacilityTaskDelegate, UIAlertViewDelegate, AGSMapViewLayerDelegate, AGSFeatureLayerQueryDelegate, AGSLayerCalloutDelegate> {
<AGSMapViewTouchDelegate, AGSClosestFacilityTaskDelegate, UIAlertViewDelegate, AGSMapViewLayerDelegate, AGSFeatureLayerQueryDelegate, AGSCalloutDelegate> {
AGSMapView *_mapView;
AGSFeatureLayer *_facilitiesLayer;
AGSSketchGraphicsLayer *_sketchLayer;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#define kBaseMap @"http://services.arcgisonline.com/ArcGIS/rest/services/World_Street_Map/MapServer"
#define kFacilitiesLayerURL @"http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Louisville/LOJIC_PublicSafety_Louisville/MapServer/1"

#define kCFTask @"http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Network/USA/NAServer/Closest%20Facility"


Expand All @@ -30,9 +31,16 @@ - (void)didReceiveMemoryWarning
#pragma mark - View lifecycle


// in iOS7 this gets called and hides the status bar so the view does not go under the top iPhone status bar
- (BOOL)prefersStatusBarHidden
{
return YES;
}

// Implement viewDidLoad to do additional setup after loading the view, typically from a nib.
- (void)viewDidLoad
{
{

//Add the basemap - the tiled layer
NSURL *mapUrl = [NSURL URLWithString:kBaseMap];
AGSTiledMapServiceLayer *tiledLyr = [AGSTiledMapServiceLayer tiledMapServiceLayerWithURL:mapUrl];
Expand All @@ -56,7 +64,8 @@ - (void)viewDidLoad
[self.mapView addMapLayer:self.graphicsLayer withName:@"ClosestFacility"];

// set the callout delegate so we can display callouts
self.graphicsLayer.calloutDelegate = self;
// updated the callout to the map instead of the layer.
self.mapView.callout.delegate = self;


//creating the facilities (fire stations) layer
Expand All @@ -65,7 +74,7 @@ - (void)viewDidLoad
//specifying the symbol for the fire stations.
AGSSimpleRenderer* renderer = [AGSSimpleRenderer simpleRendererWithSymbol:[AGSPictureMarkerSymbol pictureMarkerSymbolWithImageNamed:@"FireStation.png"]];
self.facilitiesLayer.renderer = renderer;
self.facilitiesLayer.outFields = [NSArray arrayWithObject:@"*"];
self.facilitiesLayer.outFields = @[@"*"];

//adding the fire stations feature layer to the map view.
[self.mapView addMapLayer:self.facilitiesLayer withName:@"Facilities"];
Expand Down Expand Up @@ -375,7 +384,7 @@ - (IBAction)addIncidentOrBarrier:(id)sender {
case AGSGeometryTypePoint:
_numIncidents++;
//ading an attribute for the incident graphic
[attributes setValue:[NSNumber numberWithInt:_numIncidents] forKey:@"incidentNumber"];
[attributes setValue:@(_numIncidents) forKey:@"incidentNumber"];

//getting the symbol for the incident graphic
symbol = [self incidentSymbol];
Expand All @@ -390,7 +399,7 @@ - (IBAction)addIncidentOrBarrier:(id)sender {
case AGSGeometryTypePolygon:
_numBarriers++;

[attributes setValue:[NSNumber numberWithInt:_numBarriers] forKey:@"barrierNumber"];
[attributes setValue:@(_numBarriers) forKey:@"barrierNumber"];
//getting the symbol for the incident graphic
symbol = [self barrierSymbol];
g = [AGSGraphic graphicWithGeometry:geometry
Expand Down
Loading

0 comments on commit d4c1056

Please sign in to comment.