Skip to content

Source code for a demo application using SimpleGeo's iPhone SDK

License

Notifications You must be signed in to change notification settings

macarne/SGDemoApp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

26 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SGDemoApp

================================================================================
ABSTRACT:

This is a sample application that shows off many of the different components
within the SGiPhoneSDK. The SGLocationService is used to load records from multiple
global layers into CoreData. The records are then displayed in three different 
avenues: UITableView, SGLayerMapView and SGARNavigationViewController.

GeoJSON objects that are retrieved from SimpleGeo require different interpretations
depending on which layer they were acquired from. Instead of storing the GeoJSON
objects as NSDictionaries, 6 subclasses of SGRecord are provided to help
ease the differentation processes. None of these records are saved when the
application exits; they are only stored for the duration of the app.

Both the UITableView and SGARNavigationViewController will only display those
records that are within 1km radius of the devices current location. The AR
enviornment is set to one of the standard styles. The map will load and display 
records based on the displayed region of the view.

In order to run the demo, you must already possess an OAuth access and secret key
from http://simplegeo.com. At line 98 in SGMainViewController, a plist is loaded
that "supposedly" contains the proper credentials. Either add your own Token.plist
file to the project or just create create the SGOAuth object with plain-old NSStrings.

Note: This demo application only loads records layers com.simplegeo.global.*
If you want to view your personal layers, you need to modify the code.

================================================================================
BUILD REQUIREMENTS:

iPhone SDK 3.1

Frameworks
- CoreLocation
- Foundation
- MapKit
- OpenGLES
- CoreGraphics
- UIKit

================================================================================
RUNTIME REQUIREMENTS:

iPhone OS 3.1

================================================================================
PACKAGING LIST:

Model
Contains all of the data models.

    Layers
    Contains the single subclass of SGLayer used for all SGRecord.
    
        SGTwitterLayer
        A subclass of SGLayer that builds SGTweets.
        
        SGFlickrLayer
        A subclass of SGLayer that builds SGFlickrs.
        
        SGBrightkite
        A subclass of SGLayer that builds SGBrightkites.
        
    Records
    Contains all subclasses of SGRecord.
    
        SGSocialRecord
        A subclass of SGManagedRecord. Since there are some commonalities between
        the user-defined properties for a Brightkite, Tweet and Flickr, it made
        sense to create another abstraction layer. This type of record holds onto
        properties such as profile image and profile image, absolute URL.
        
        SGBrightkite
        A subclass of SGSocialRecord that interprets the Brightkite GeoJSON encoded
        object recieved from SimpleGeo into a managable CoreData entity.
        
        SGFlickr
        A subclass of SGSocialRecord that interprets the Flickr GeoJSON encoded
        object recieved from SimpleGeo into a managable CoreData entity.
        
        SGTweet
        A subclass of SGSocialRecord that interprets the Tweet GeoJSON encoded
        object recieved from SimpleGeo into a managable CoreData entity.
        
        SGUSZip
        A subclass of SGSocialRecord that interprets the USZip GeoJSON encoded
        object recieved from SimpleGeo into a managable CoreData entity.        
        
        SGUSWeather
        A subclass of SGSocialRecord that interprets the USWeather GeoJSON encoded
        object recieved from SimpleGeo into a managable CoreData entity.
        
        SGGeoNames
        A subclass of SGSocialRecord that interprets the GeoNames GeoJSON encoded
        object recieved from SimpleGeo into a managable CoreData entity.
        
    
TableCells
Contains all subclasses of UITableViewCell.
    
    SGSocialRecordTableCell
    Displays a SGSocialRecord in a UITableView.
    
SGAdditions
Contains all categories.
    
    SGRecordAdditions
    Defines helper methods for SGRecord subclasses.
    
    UIImageAdditions
    Helper methods for resizing images.
    
Controllers
Contains all subclasses of UIViewController.

    SGMainViewController
    The main view controller which implements a total of 7 protocols. All actions
    take place within this view controller.
    
    SGWebViewController
    A simple view controller that loads a URL into a webview.
    
Views
    SGPinAnotationView
    A simple map annotation view that will update its accessory views when it
    is asked to layout its subviews.
    
    
LocationDemoAppDelegate
The application delegate.

================================================================================
CHANGES FROM PREVIOUS VERSIONS:
Version 0.9.3
- Added license

Version 0.9.2
- Updated project structure to use the new static libraries

Version 0.9.1
- Updated to v0.3.0 of the SDK
- Added a reverse geocoder section in the census 
table view

Version 0.9.0
- Updated the icon and itunes artwork.
- Added a simple census table view.
- Added SGLayer specific subclasses.

Version 0.8.10
- Added categories to the repository.

Version 0.8.9
- Removed CoreData.

Version 0.8.8
- First version.

================================================================================
Copyright (C) 2009 SimpleGeo Inc. All rights reserved.

About

Source code for a demo application using SimpleGeo's iPhone SDK

Resources

License

Stars

Watchers

Forks

Packages