NTLayer


@interface NTLayer : NSObject {
  void *swigCPtr;
  BOOL swigCMemOwn;
}

An abstract base class for all layers.

  • Checks if this object is equal to the specified object.

    Declaration

    Objective-C

    - (BOOL)isEqual:(id)object;

    Parameters

    object

    The reference object.

    Return Value

    True when objects are equal, false otherwise.

  • Returns the hash value of this object.

    Declaration

    Objective-C

    - (NSUInteger)hash;

    Return Value

    The hash value of this object.

  • Returns a copy of the layer meta data map. The changes you make to this map are NOT reflected in the actual meta data of the layer.

    Declaration

    Objective-C

    - (NTStringVariantMap *)getMetaData;

    Return Value

    A copy of the layer meta data map.

  • Sets a new meta data map for the layer. Old meta data values will be lost.

    Declaration

    Objective-C

    - (void)setMetaData:(NTStringVariantMap *)metaData;

    Parameters

    metaData

    The new meta data map for this layer.

  • Returns true if the specified key exists in the layer meta data map.

    Declaration

    Objective-C

    - (BOOL)containsMetaDataKey:(NSString *)key;

    Parameters

    key

    The key to check.

    Return Value

    True if the meta data element exists.

  • Returns a layer meta data element corresponding to the key. If no value is found null variant is returned.

    Declaration

    Objective-C

    - (NTVariant *)getMetaDataElement:(NSString *)key;

    Parameters

    key

    The key to use.

    Return Value

    The value corresponding to the key from the meta data map. If the key does not exist, empty variant is returned.

  • Adds a new key-value pair to the layer meta data map. If the key already exists in the map, it’s value will be replaced by the new value.

    Declaration

    Objective-C

    - (void)setMetaDataElement:(NSString *)key element:(NTVariant *)element;

    Parameters

    key

    The new key.

    element

    The new value.

  • Returns the layer task priority of this layer.

    Declaration

    Objective-C

    - (int)getUpdatePriority;

    Return Value

    The priority level for the tasks of this layer.

  • Sets the layer task priority. Higher priority layers get to load data before lower priority layers. Normal layers and tile layers have seperate task queues and thus don’t compete with each other for task queue access. The default is 0.

    Declaration

    Objective-C

    - (void)setUpdatePriority:(int)priority;

    Parameters

    priority

    The new task priority for this layer, higher values get better access.

  • Sets the layer culling delay. The culling delay is used to delay layer content rendering in case of user interaction, higher delay improves performance and battery life at the expense of interactivity. Default is 200ms-400ms, depending on layer type.

    Declaration

    Objective-C

    - (void)setCullDelay:(int)delay;

    Parameters

    delay

    The new culling delay in milliseconds.

  • Returns the opacity of this layer.

    Declaration

    Objective-C

    - (float)getOpacity;

    Return Value

    The opacity of this layer.

  • Set the opacity of the layer.

    Declaration

    Objective-C

    - (void)setOpacity:(float)opacity;

    Parameters

    opacity

    The opacity of the layer in range (0..1). 1.0 is the default value.

  • Returns the visibility of this layer.

    Declaration

    Objective-C

    - (BOOL)isVisible;

    Return Value

    True if the layer is visible.

  • Sets the visibility of this layer.

    Declaration

    Objective-C

    - (void)setVisible:(BOOL)visible;

    Parameters

    visible

    The new visibility state of the layer.

  • Returns the visible zoom range of this layer.

    Declaration

    Objective-C

    - (NTMapRange *)getVisibleZoomRange;

    Return Value

    The visible zoom range of this layer.

  • Sets the visible zoom range for this layer. Current zoom level must be within this range for the layer to be visible. This range is half-open, thus layer is visible if range.min <= ZOOMLEVEL < range.max.

    Declaration

    Objective-C

    - (void)setVisibleZoomRange:(NTMapRange *)range;

    Parameters

    range

    new visible zoom range

  • Tests whether this layer is being currently updated.

    Declaration

    Objective-C

    - (BOOL)isUpdateInProgress;

    Return Value

    True when the layer is being updated or false when the layer is in steady state.

  • Updates the layer using new visibility information. This method is periodically called when the map view moves. The visibilty info is saved, so the data can be refreshed later.

    Declaration

    Objective-C

    - (void)update:(NTCullState *)cullState;

    Parameters

    cullState

    The new visibilty information.

  • Refreshes the layer using old stored visibility information. This method might be called if some of the layer data changes.

    Declaration

    Objective-C

    - (void)refresh;
  • Simulate click on this layer. This may trigger any event listeners attached to the layer.

    Declaration

    Objective-C

    - (void)simulateClick:(enum NTClickType)clickType
                screenPos:(NTScreenPos *)screenPos
                viewState:(NTViewState *)viewState;

    Parameters

    clickType

    The type of the click.

    screenPos

    The screen position for the simulated click.

    viewState

    The view state to use.

  • Undocumented

    Declaration

    Objective-C

    -(void)dealloc;