SGLayerMapView |
Displays records from a layer on a MKMapView.
Conforms to: MKMapViewDelegate, SGLocationServiceDelegate
Superclass: MKMapView
Declared In: SGLayerMapView.h
This is just a simple subclass of MKMapView which uses the records for each registered layer as annotations. SGLayerMapView will automatically load more records from SimpleGeo after the view is animated. In addition, the map will attempt to load more records based on the reloadTimeInterval if no movement is created. Just add SGLayer object to the map view. You can disable this feature by calling stopRetrieving since every record retrieval requires an HTTP request. Also, the map will remove annotation as they move out of view.
The map view will build records based on the SGLayers recordAnnotationFromGeoJSONObject: method. Records are not automatically added to their layer when they are retrieved. In order to add retrieved records to their SGLayer object, addRetrievedRecrodsToLayer should be set to YES.
Adds a layer to the map view.
Adds an array of layers to be displayed in the map view.
Removes a layer from the map view.
Removes an array of layers from the map view.
 Enables fetching records for each layer from SimpleGeo when the map view's region changes.
 Disables fetching records for each layer from SimpleGeo when the map view's region changes.
addLayer: |
Adds a layer to the map view.
- (void) addLayer:(SGLayer*)layer;
layer
The SGLayer to register with the map.
addLayers: |
Adds an array of layers to be displayed in the map view.
- (void) addLayers:(NSArray*)layers;
layers
The array of layers.
removeLayer: |
Removes a layer from the map view.
- (void) removeLayer:(SGLayer*)layer;
layer
The SGLayer to remove from the map.
Remvoing a layer will also remove any annotation that are present on the map.
removeLayers: |
Removes an array of layers from the map view.
- (void) removeLayers:(NSArray*)layers;
layers
The array of layers.
startRetrieving |
 Enables fetching records for each layer from SimpleGeo when the map view's region changes.
- (void) startRetrieving;
stopRetrieving |
 Disables fetching records for each layer from SimpleGeo when the map view's region changes.
- (void) stopRetrieving;
Determines whether or not to add retrieved records to each SGLayer object as they are loaded by the map.
The amount of records to retrieve each time the map view detects it needs to refresh its annotations.
The time interval (expressed in seconds) that tells the map to retrieve annotations when no movement has occurred.
An Epoch timestamp that will be used when obtain nearby records the layers. The default is 0.
An Epoch timestamp that will be used when obtain nearby records the layers. The default is 0.
addRetrievedRecordsToLayer |
Determines whether or not to add retrieved records to each SGLayer object as they are loaded by the map.
@property ( nonatomic, assign) BOOL addRetrievedRecordsToLayer;
limit |
The amount of records to retrieve each time the map view detects it needs to refresh its annotations.
@property ( nonatomic, assign) NSInteger limit;
reloadTimeInterval |
The time interval (expressed in seconds) that tells the map to retrieve annotations when no movement has occurred.
@property ( nonatomic, assign) NSTimeInterval reloadTimeInterval;
Set this value to a negative interval to not load any records when no animations have occurred.
requestEndTime |
An Epoch timestamp that will be used when obtain nearby records the layers. The default is 0.
@property ( nonatomic, assign) double requestEndTime;
requestStartTime |
An Epoch timestamp that will be used when obtain nearby records the layers. The default is 0.
@property ( nonatomic, assign) double requestStartTime;
© SimpleGeo Last Updated: 03/31/2010