OMCLocationPlace Class Reference
Inherits from | OMCLocationDeviceContainer : OMCLocationObject : NSObject |
---|---|
Declared in | OMCLocationPlace.h |
Overview
A place represents a geographical location that can be associated with one or more devices. Optionally, places can also form a hierarchy, where a place has a single parent and, possibly, multiple children. Typically this is used to aggregate a set of contiguous places into a larger place that represents the whole collection of smaller places.
address
The place’s address (a geo point, circle, or polygon).
@property (readonly, nullable) OMCLocationAddress *address
Declared In
OMCLocationPlace.h
– allDevicesWithCompletionHandler:
Asynchronously fetches all the place’s devices, including the devices of all the place’s descendants, invoking the specified completion handler block when finished. Asynchronously invokes the completion handler immediately if the place’s devices have already been fetched.
- (void)allDevicesWithCompletionHandler:(OMCLocationDevicesCompletionBlock)completionHandler
Parameters
completionHandler |
The block to be invoked when the devices have been fetched. The completion block will be invoked on the main dispatch queue. |
---|
Declared In
OMCLocationPlace.h
– parentWithCompletionHandler:
Asynchronously fetches the place’s parent, invoking the specified completion handler block when finished. Asynchronously invokes the completion handler immediately if the place’s parent has already been fetched.
- (void)parentWithCompletionHandler:(OMCLocationPlaceCompletionBlock)completionHandler
Parameters
completionHandler |
The block to be invoked when the devices have been fetched. The completion block will be invoked on the main dispatch queue. |
---|
See Also
Declared In
OMCLocationPlace.h
hasChildren
Returns whether the place has children, without querying the server.
@property (readonly) BOOL hasChildren
Declared In
OMCLocationPlace.h
– childrenWithCompletionHandler:
Asynchronously fetches the place’s children (i.e. its direct descendants), invoking the specified completion handler block when finished. Asynchronously invokes the completion handler immediately if the place’s children have already been fetched.
- (void)childrenWithCompletionHandler:(OMCLocationPlacesCompletionBlock)completionHandler
Parameters
completionHandler |
The block to be invoked when the devices have been fetched. The completion block will be invoked on the main dispatch queue. |
---|
Discussion
Warning: The children will be fetched in a single query with a “long” format. The results will not be paginated.
See Also
Declared In
OMCLocationPlace.h
– hierarchyWithCompletionHandler:
Asynchronously fetches the place’s hierarchy (i.e. the place itself and all its descendants), invoking the specified completion handler block when finished. Asynchronously invokes the completion handler immediately if the place’s hierarchy has already been fetched.
- (void)hierarchyWithCompletionHandler:(OMCLocationPlacesCompletionBlock)completionHandler
Parameters
completionHandler |
The block to be invoked when the devices have been fetched. The completion block will be invoked on the main dispatch queue. |
---|
Discussion
Warning: The hierarchy will be fetched in a single query with a “long” format. The results will not be paginated.
See Also
Declared In
OMCLocationPlace.h
– descendantsWithCompletionHandler:
Asynchronously fetches the place’s descendants (i.e. its children, grandchildren, etc.), invoking the specified completion handler block when finished. Asynchronously invokes the completion handler immediately if the place’s descendants have already been fetched.
- (void)descendantsWithCompletionHandler:(OMCLocationPlacesCompletionBlock)completionHandler
Parameters
completionHandler |
The block to be invoked when the devices have been fetched. The completion block will be invoked on the main dispatch queue. |
---|
Discussion
Warning: The descendants will be fetched in a single query with a “long” format. The results will not be paginated.
See Also
Declared In
OMCLocationPlace.h