|
cds
1.5.0
|
Lazy ordered list (key-value pair) More...
#include <cds/container/lazy_kvlist_impl.h>
Public Types | |
| typedef Key | key_type |
| Key type. | |
| typedef Value | mapped_type |
| Type of value stored in the list. | |
|
typedef std::pair< key_type const, mapped_type > | value_type |
| key/value pair stored in the list | |
| typedef base_class::gc | gc |
| Garbage collector used. | |
| typedef base_class::back_off | back_off |
| Back-off strategy used. | |
| typedef options::allocator_type | allocator_type |
| Allocator type used for allocate/deallocate the nodes. | |
| typedef base_class::item_counter | item_counter |
| Item counting policy used. | |
| typedef options::key_comparator | key_comparator |
| key comparision functor | |
| typedef base_class::memory_model | memory_model |
| Memory ordering. See cds::opt::memory_model option. | |
| typedef iterator_type< false > | iterator |
| Forward iterator. More... | |
| typedef iterator_type< true > | const_iterator |
| Const forward iterator. More... | |
Public Member Functions | |
| iterator | begin () |
| Returns a forward iterator addressing the first element in a list. More... | |
| iterator | end () |
| Returns an iterator that addresses the location succeeding the last element in a list. More... | |
| LazyKVList () | |
| Default constructor. More... | |
| ~LazyKVList () | |
| List destructor. More... | |
| template<typename K > | |
| bool | insert (const K &key) |
| Inserts new node with key and default value. More... | |
| template<typename K , typename V > | |
| bool | insert (const K &key, const V &val) |
| Inserts new node with a key and a value. More... | |
| template<typename K , typename Func > | |
| bool | insert_key (const K &key, Func func) |
| Inserts new node and initializes it by a functor. More... | |
| template<typename... Args> | |
| bool | emplace (Args &&...args) |
Inserts data of type mapped_type constructed with std::forward<Args>(args)... More... | |
| template<typename K , typename Func > | |
| std::pair< bool, bool > | ensure (const K &key, Func f) |
Ensures that the key exists in the list. More... | |
| template<typename K > | |
| bool | erase (K const &key) |
Deletes key from the list. More... | |
| template<typename K , typename Less > | |
| bool | erase_with (K const &key, Less pred) |
Deletes the item from the list using pred predicate for searching. More... | |
| template<typename K , typename Func > | |
| bool | erase (K const &key, Func f) |
Deletes key from the list. More... | |
| template<typename K , typename Less , typename Func > | |
| bool | erase_with (K const &key, Less pred, Func f) |
Deletes the item from the list using pred predicate for searching. More... | |
| template<typename Q > | |
| bool | find (Q const &key) |
Finds the key key . More... | |
| template<typename Q , typename Less > | |
| bool | find_with (Q const &key, Less pred) |
Finds the key val using pred predicate for searching. More... | |
| template<typename Q , typename Func > | |
| bool | find (Q const &key, Func f) |
Finds the key key and performs an action with it. More... | |
| template<typename Q , typename Less , typename Func > | |
| bool | find_with (Q const &key, Less pred, Func f) |
Finds the key val using pred predicate for searching. More... | |
| bool | empty () const |
| Checks if the list is empty. | |
| size_t | size () const |
| Returns list's item count. More... | |
| void | clear () |
| Clears the list. More... | |
| const_iterator | begin () const |
| Returns a forward const iterator addressing the first element in a list. | |
| const_iterator | cbegin () |
| const_iterator | end () const |
| Returns an const iterator that addresses the location succeeding the last element in a list. | |
| const_iterator | cend () |
Additional Inherited Members | |
| Protected Types inherited from cds::intrusive::LazyList< GC, implementation_defined, Traits > | |
| typedef node_type::marked_ptr | marked_node_ptr |
| Node marked pointer. | |
| typedef node_type * | auxiliary_head |
| Auxiliary head type (for split-list support) | |
| typedef implementation_defined | value_type |
| type of value stored in the list | |
| typedef Traits | options |
| Traits template parameter. | |
| typedef options::hook | hook |
| hook type | |
| typedef hook::node_type | node_type |
| node type | |
| typedef implementation_defined | key_comparator |
| key comparision functor based on opt::compare and opt::less option setter. | |
| typedef options::disposer | disposer |
| disposer used | |
|
typedef get_node_traits < value_type, node_type, hook > ::type | node_traits |
| node traits | |
|
typedef lazy_list::get_link_checker < node_type, options::link_checker >::type | link_checker |
| link checker | |
| typedef GC | gc |
| Garbage collector. | |
| typedef options::back_off | back_off |
| back-off strategy | |
| typedef options::item_counter | item_counter |
| Item counting policy used. | |
| typedef options::memory_model | memory_model |
| C++ memory ordering (see lazy_list::type_traits::memory_model) | |
| typedef iterator_type< false > | iterator |
| Forward iterator. More... | |
| typedef iterator_type< true > | const_iterator |
| Const forward iterator. More... | |
| Protected Member Functions inherited from cds::intrusive::LazyList< GC, implementation_defined, Traits > | |
| iterator | begin () |
| Returns a forward iterator addressing the first element in a list. More... | |
| iterator | end () |
| Returns an iterator that addresses the location succeeding the last element in a list. More... | |
| LazyList () | |
| Default constructor initializes empty list. | |
| ~LazyList () | |
| Destroys the list object. | |
| bool | insert (value_type &val) |
| Inserts new node. More... | |
| bool | insert (value_type &val, Func f) |
| Inserts new node. More... | |
| std::pair< bool, bool > | ensure (value_type &val, Func func) |
Ensures that the item exists in the list. More... | |
| bool | unlink (value_type &val) |
Unlinks the item val from the list. More... | |
| bool | erase (Q const &val) |
| Deletes the item from the list. More... | |
| bool | erase (const Q &val, Func func) |
| Deletes the item from the list. More... | |
| bool | erase_with (Q const &val, Less pred) |
Deletes the item from the list using pred predicate for searching. More... | |
| bool | erase_with (const Q &val, Less pred, Func func) |
Deletes the item from the list using pred predicate for searching. More... | |
| bool | find (Q &val, Func f) |
Finds the key val . More... | |
| bool | find (Q const &val, Func f) |
Finds the key val . More... | |
| bool | find (Q const &val) |
Finds the key val . More... | |
| bool | find_with (Q &val, Less pred, Func f) |
Finds the key val using pred predicate for searching. More... | |
| bool | find_with (Q const &val, Less pred, Func f) |
Finds the key val using pred predicate for searching. More... | |
| bool | find_with (Q const &val, Less pred) |
Finds the key val using pred predicate for searching. More... | |
| void | clear () |
| Clears the list. More... | |
| bool | empty () const |
| Checks if the list is empty. | |
| size_t | size () const |
| Returns list's item count. More... | |
| const_iterator | begin () const |
| Returns a forward const iterator addressing the first element in a list. | |
| const_iterator | cbegin () |
| const_iterator | end () const |
| Returns an const iterator that addresses the location succeeding the last element in a list. | |
| const_iterator | cend () |
| Protected Attributes inherited from cds::intrusive::LazyList< GC, implementation_defined, Traits > | |
| item_counter | m_ItemCounter |
| Item counter. | |
Lazy ordered list (key-value pair)
This is key-value variation of non-intrusive LazyList. Like standard container, this implementation split a value stored into two part - constant key and alterable value.
Template arguments:
GC
- garbage collector usedKey
- key type of an item stored in the list. It should be copy-constructibleValue
- value type stored in the listTraits
- type traits, default is lazy_list::type_traitsIt is possible to declare option-based list with cds::container::lazy_list::make_traits metafunction istead of Traits
template argument. For example, the following traits-based declaration of gc::HP lazy list
is equivalent for the following option-based list
Template argument list Options
of cds::container::lazy_list::make_traits metafunction are:
std::less<T>
.| typedef iterator_type<true> cds::container::LazyKVList< GC, Key, Value, Traits >::const_iterator |
Const forward iterator.
For iterator's features and requirements see iterator
| typedef iterator_type<false> cds::container::LazyKVList< GC, Key, Value, Traits >::iterator |
Forward iterator.
The forward iterator for lazy list has some features:
Therefore, the use of iterators in concurrent environment is not good idea. Use the iterator on the concurrent container for debug purpose only.
The iterator interface to access item data:
operator ->
- returns a pointer to value_type for iterator operator *
- returns a reference (a const reference for const_iterator
) to value_type for iterator const key_type& key()
- returns a key reference for iterator mapped_type& val()
- retuns a value reference for iterator (const reference for const_iterator
)For both functions the iterator should not be equal to end()
|
inline |
Default constructor.
Initializes empty list
|
inline |
List destructor.
Clears the list
|
inline |
|
inline |
Clears the list.
Post-condition: the list is empty
|
inline |
Inserts data of type mapped_type constructed with std::forward<Args>(args)...
Returns true
if inserting successful, false
otherwise.
|
inline |
Returns an iterator that addresses the location succeeding the last element in a list.
Do not use the value returned by end
function to access any item. Internally, end
returning value equals to NULL
.
The returned value can be used only to control reaching the end of the list. For empty list
|
inline |
Ensures that the key
exists in the list.
The operation performs inserting or changing data with lock-free manner.
If the key
not found in the list, then the new item created from key
is inserted into the list (note that in this case the key_type should be copy-constructible from type K
). Otherwise, the functor func
is called with item found. The functor Func
may be a function with signature:
or a functor:
with arguments:
bNew
- true
if the item has been inserted, false
otherwiseitem
- item of the listThe functor may change any fields of the item.second
that is mapped_type; however, func
must guarantee that during changing no any other modifications could be made on this item by concurrent threads.
You may pass func
argument by reference using boost::ref
.
Returns std::pair<bool, bool>
where first
is true if operation is successfull, second
is true if new item has been added or false
if the item with key
already is in the list.
|
inline |
|
inline |
Deletes key
from the list.
The function searches an item with key key
, calls f
functor with item found and deletes it. If key
is not found, the functor is not called.
The functor Func
interface:
The functor may be passed by reference with boost:ref
Returns true
if key is found and deleted, false
otherwise
|
inline |
Deletes the item from the list using pred
predicate for searching.
The function is an analog of erase(K const&) but pred
is used for key comparing. Less
functor has the interface like std::less
. pred
must imply the same element order as the comparator used for building the list.
|
inline |
Deletes the item from the list using pred
predicate for searching.
The function is an analog of erase(K const&, Func) but pred
is used for key comparing. Less
functor has the interface like std::less
. pred
must imply the same element order as the comparator used for building the list.
|
inline |
|
inline |
Finds the key key
and performs an action with it.
The function searches an item with key equal to key
and calls the functor f
for the item found. The interface of Func
functor is:
where item
is the item found.
You may pass f
argument by reference using boost::ref
or cds::ref.
The functor may change item.second
that is reference to value of node. Note that the function is only guarantee that item
cannot be deleted during functor is executing. The function does not serialize simultaneous access to the list item
. If such access is possible you must provide your own synchronization schema to exclude unsafe item modifications.
The function returns true
if key
is found, false
otherwise.
|
inline |
Finds the key val
using pred
predicate for searching.
The function is an analog of find(Q const&) but pred
is used for key comparing. Less
functor has the interface like std::less
. pred
must imply the same element order as the comparator used for building the list.
|
inline |
Finds the key val
using pred
predicate for searching.
The function is an analog of find(Q&, Func) but pred
is used for key comparing. Less
functor has the interface like std::less
. pred
must imply the same element order as the comparator used for building the list.
|
inline |
Inserts new node with key and default value.
The function creates a node with key
and default value, and then inserts the node created into the list.
Preconditions:
K
. In trivial case, K
is equal to key_type.Returns true
if inserting successful, false
otherwise.
|
inline |
Inserts new node with a key and a value.
The function creates a node with key
and value val
, and then inserts the node created into the list.
Preconditions:
key
of type K
.val
of type V
.Returns true
if inserting successful, false
otherwise.
|
inline |
Inserts new node and initializes it by a functor.
This function inserts new node with key key
and if inserting is successful then it calls func
functor with signature
The argument item
of user-defined functor func
is the reference to the list's item inserted. item.second
is a reference to item's value that may be changed. User-defined functor func
should guarantee that during changing item's value no any other changes could be made on this list's item by concurrent threads. The user-defined functor can be passed by reference using boost::ref
and it is called only if inserting is successful.
The key_type should be constructible from value of type K
.
The function allows to split creating of new item into two part:
key
;func
functorThis can be useful if complete initialization of object of mapped_type
is heavyweight and it is preferable that the initialization should be completed only if inserting is successful.
|
inline |
Returns list's item count.
The value returned depends on opt::item_counter option. For atomicity::empty_item_counter, this function always returns 0.
Warning: even if you use real item counter and it returns 0, this fact is not mean that the list is empty. To check list emptyness use empty() method.


{% extends "index.html" %} {% block welcome %}
Luis Morgado da Costa {# is a PhD candidate at the Interdisciplinary Graduate School, Nanyang Technological University (NTU), in Singapore. He has a broad range of research interests, including from Natural Language Parsing and Generation, Computational Lexicography, and Computer Assisted Language Learning (CALL). He is currently looking at ways to improve CALL technology using Machine Translation. #}
Joanna Ut-Seong Sio {# is a linguist and a comedian (stand-up and improvisation). She received her PhD in Leiden University Centre for Linguistics (LUCL) in the Netherlands. She has worked in Hong Kong and Singapore and is currently working at Palacký University, Olomouc, Czech Republic. She is interested in verbal arts and the use of improvisation for communication training. #}
{% with messages = get_flashed_messages() %} {% if messages %} {% for message in messages %} {{ message }} {% endfor %} {% endif %} {% endwith %} {% endblock %}


NTOptions
@interface NTOptions : NSObject {
void *swigCPtr;
BOOL swigCMemOwn;
}
A class containing various options for rendering and map manipulation.
-
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 the color of the ambient light.
Declaration
Objective-C
- (NTColor *)getAmbientLightColor;
Return Value
The color of the ambient light.
-
Sets the ambient light color. Ambient light affects all lighting enabled models in the scene equally, it has no direction or location.
Declaration
Objective-C
- (void)setAmbientLightColor:(NTColor *)color;
Parameters
color
The new color for the ambient light.
-
Returns the color of the main light.
Declaration
Objective-C
- (NTColor *)getMainLightColor;
Return Value
The color of the main light.
-
Sets the color of the main light. The main light affects all lighting enabled models in the scene equally from a certain direction. This light can be used to simulate sun or moon light.
Declaration
Objective-C
- (void)setMainLightColor:(NTColor *)color;
Parameters
color
The new color for the main light.
-
Returns the direction of the main light.
Declaration
Objective-C
- (NTMapVec *)getMainLightDirection;
Return Value
The direction of the main light.
-
Sets the direction of the main light. The main light affects all lighting enabled models in the scene equally from a certain direction. This light can be used to simulate sun or moon light. The direction is always measured based on the local tangent frame of the focus point.
Declaration
Objective-C
- (void)setMainLightDirection:(NTMapVec *)direction;
Parameters
direction
The new direction vector for the main light. (0,0,-1) means straight down, (-0.707,0,-0.707) means from east with a 45 degree angle. The direction vector will be normalized.
-
Returns the render projection mode.
Declaration
Objective-C
- (enum NTRenderProjectionMode)getRenderProjectionMode;
Return Value
The render projection mode.
-
Sets the render projection mode. The default is RenderProjectionMode::PLANAR.
Declaration
Objective-C
- (void)setRenderProjectionMode: (enum NTRenderProjectionMode)renderProjectionMode;
Parameters
renderProjectionMode
The new render projection mode.
-
Returns the click type detection state.
Declaration
Objective-C
- (BOOL)isClickTypeDetection;
Return Value
True if click type detecton is enabled.
-
Sets the state of the click type detection flag. If set to true clicks are categorized as normal clicks, double clicks, long clicks and dual clicks. The click type resolving take about 400ms, so for applications that do not require this functionality, it can be turned off. The default is true.
Declaration
Objective-C
- (void)setClickTypeDetection:(BOOL)enabled;
Parameters
enabled
The new state of the click type detection flag.
-
Returns the tile size used for drawing map tiles.
Declaration
Objective-C
- (int)getTileDrawSize;
Return Value
The tile size in density-independent pixels (dp).
-
Sets the tile size for drawing map tiles. Different datasources may have different tile sizes, this option can be used to compensate for bigger or smaller tiles than default. The default is 256.
Declaration
Objective-C
- (void)setTileDrawSize:(int)tileDrawSize;
Parameters
tileDrawSize
The new tile size in density-independent pixels (dp).
-
Returns the dots per inch value.
Declaration
Objective-C
- (float)getDPI;
Return Value
The dots per inch value.
-
Sets the dots per inch value. This is calculated automatically by the SDK when the MapView is created using the device screen parameters. The purpose of this value is to compensate for very high or low resolution devices, so that the map remains readable.
Declaration
Objective-C
- (void)setDPI:(float)dpi;
Parameters
dpi
The new dots per inch value.
-
Returns the draw distance value.
Declaration
Objective-C
- (float)getDrawDistance;
Return Value
The draw distance value.
-
Sets a new draw distance value. The higher the draw distance the more tiles can be seen, if the map is tilted. Changing the draw distance will cause the horizon to move, which means that the if the sky bitmap is used, the horizon may not match up anymore. Increasing this value will decrease performance and increase network traffic, if online map is used. The default is 16.
Declaration
Objective-C
- (void)setDrawDistance:(float)drawDistance;
Parameters
drawDistance
The new draw distance value.
-
Returns the vertial field of view angle.
Declaration
Objective-C
- (int)getFieldOfViewY;
Return Value
The vertical field of view angle in degrees.
-
Sets the vertial field of view angle. Larger values increase the viewable area, at the cost of performance and additional perspective distortion. The default is 70.
Declaration
Objective-C
- (void)setFieldOfViewY:(int)fovY;
Parameters
fovY
The new vertical field of view angle in degrees.
-
Returns the panning mode.
Declaration
Objective-C
- (enum NTPanningMode)getPanningMode;
Return Value
The panning mode.
-
Sets the panning mode. The default is PanningMode::FREE.
Declaration
Objective-C
- (void)setPanningMode:(enum NTPanningMode)panningMode;
Parameters
panningMode
The new panning mode.
-
Returns the pivot mode.
Declaration
Objective-C
- (enum NTPivotMode)getPivotMode;
Return Value
The pivot mode.
-
Sets the pivot mode. The default is PIVOT_MODE_TOUCHPOINT
Declaration
Objective-C
- (void)setPivotMode:(enum NTPivotMode)pivotMode;
Parameters
pivotMode
The new pivot mode.
-
Returns the state of seamless horizontal panning flag.
Declaration
Objective-C
- (BOOL)isSeamlessPanning;
Return Value
True if seamless horizontal panning is enabled.
-
Sets the state of seamless horizontal panning flag. If set to true, the user can scroll seamlessly from the left side of the map to the right, and the other way around. The default is true.
Declaration
Objective-C
- (void)setSeamlessPanning:(BOOL)enabled;
Parameters
enabled
The new state of seamless horizontal panning flag.
-
Returns the state of the restricted panning flag.
Declaration
Objective-C
- (BOOL)isRestrictedPanning;
Return Value
True if restricted panning is enabled.
-
Sets the restricted panning flag. If set to true, then focus point coordinates and zoom level of the map view will be adjusted to display as little empty background as possible. The default is false.
Declaration
Objective-C
- (void)setRestrictedPanning:(BOOL)enabled;
-
Returns true if tilting gesture direction is reversed (and same as with Google Maps).
Declaration
Objective-C
- (BOOL)isTiltGestureReversed;
Return Value
True if tilting gesture direction is reversed (and same as with Google Maps). Otherwise returns false.
-
Sets the tilting gesture direction. By default, the gesture is not reversed.
Declaration
Objective-C
- (void)setTiltGestureReversed:(BOOL)reversed;
Parameters
reversed
True if Google Maps compatible mode should be used. False otherwise (default).
-
Returns the state of zoom gestures. Zoom gestures allow to use double click and dual click to zoom in/out of the map.
Declaration
Objective-C
- (BOOL)isZoomGestures;
Return Value
True if zoom gestures are enabled. False otherwise.
-
Sets the zoom gestures flag. By default, zoom gestures are not enabled.
Declaration
Objective-C
- (void)setZoomGestures:(BOOL)enabled;
Parameters
enabled
True if zoom gestured should be enabled, false otherwise.
-
Returns the number of threads used by the envelope task pool.
Declaration
Objective-C
- (int)getEnvelopeThreadPoolSize;
Return Value
The envelope task thread pool size.
-
Sets the number of threads used by the envelope task pool. More threads means more envelope tasks are executed in parallel. This might speed up the data query, but may cause performance drops. Default is 1.
Declaration
Objective-C
- (void)setEnvelopeThreadPoolSize:(int)poolSize;
Parameters
poolSize
The new envelope task thread pool size.
-
Returns the number of threads used by the tile task pool.
Declaration
Objective-C
- (int)getTileThreadPoolSize;
Return Value
The tile task thread pool size.
-
Sets the number of threads used by the tile task pool. More threads means more tile tasks are executed in parallel. This might speed up the data query, but may cause performance drops. Default is 1.
Declaration
Objective-C
- (void)setTileThreadPoolSize:(int)poolSize;
Parameters
poolSize
The new tile task thread pool size.
-
Returns the clear color used by the renderer before drawing anything else. By default, this is white. It should be set to (0, 0, 0, 0) if transparent MapView is needed.
Declaration
Objective-C
- (NTColor *)getClearColor;
Return Value
The clear color.
-
Sets the clear color of the renderer.
Declaration
Objective-C
- (void)setClearColor:(NTColor *)color;
Parameters
color
The new clear color.
-
Returns the sky color.
Declaration
Objective-C
- (NTColor *)getSkyColor;
Return Value
The sky color.
-
Sets the sky color. The purpose of the sky bitmap is to fill out the empty space visible at low tilt angles.
Declaration
Objective-C
- (void)setSkyColor:(NTColor *)color;
Parameters
color
The new sky color. If the color is transparent, sky is not rendered.
-
Returns the background bitmap. May be null.
Declaration
Objective-C
- (NTBitmap *)getBackgroundBitmap;
Return Value
The background bitmap.
-
Sets the background bitmap. The purpose of the background bitmap is to fill out the empty space when there’s no map data visible. The bitmap will get scaled and repeated to cover the hole visible area. If a null pointer is passed, the background won’t be drawn. The width and height of the bitmap must be power of two (for example: 256 * 256 or 128 * 512). It’s also preferred if the bitmap was square (width == height), but this is not a requirement. The default is “default_background.png”.
Declaration
Objective-C
- (void)setBackgroundBitmap:(NTBitmap *)backgroundBitmap;
Parameters
backgroundBitmap
The new background bitmap.
-
Returns the horizontal alignment of the watermark.
Declaration
Objective-C
- (float)getWatermarkAlignmentX;
Return Value
The horizontal alignment of the watermark.
-
Sets the position of the watermark relative to the screen. Values will be clamped to [-1, 1] range.
Declaration
Objective-C
- (void)setWatermarkAlignmentX:(float)alignmentX;
Parameters
alignmentX
The new horizontal alignment for the watermark. -1 means the left side, 0 the center and 1 the right side. The default is 1.
-
Returns the vertical alignment of the watermark.
Declaration
Objective-C
- (float)getWatermarkAlignmentY;
Return Value
The vertical alignment of the watermark.
-
Sets the position of the watermark relative to the screen. Values will be clamped to [-1, 1] range.
Declaration
Objective-C
- (void)setWatermarkAlignmentY:(float)alignmentY;
Parameters
alignmentY
The new vertical alignment for the watermark. -1 means the bottom, 0 the center and 1 the top. The default is -1.
-
Returns the watermark relative scale.
Declaration
Objective-C
- (float)getWatermarkScale;
Return Value
The watermark relative scale. The default is 1.
-
Set the watermark relative scale. By default, watermark size is independant of the actual watermark bitmap size. This method can be used to change this.
Declaration
Objective-C
- (void)setWatermarkScale:(float)scale;
Parameters
scale
The new relative scale value.
-
Returns the watermark bitmap. May be null.
Declaration
Objective-C
- (NTBitmap *)getWatermarkBitmap;
Return Value
The watermark bitmap.
-
Sets the watermark bitmap. This is only available with enterprise licenses. The watermark will be displayed on top of the map view in a user chosen corner. If null is passed no watermark will be displayed.
Declaration
Objective-C
- (void)setWatermarkBitmap:(NTBitmap *)watermarkBitmap;
Parameters
watermarkBitmap
The new watermark bitmap.
-
Returns the padding of the watermark.
Declaration
Objective-C
- (NTScreenPos *)getWatermarkPadding;
Return Value
The padding of the watermark in dp.
-
Sets the padding between the watermark and the edge of the screen.
Declaration
Objective-C
- (void)setWatermarkPadding:(NTScreenPos *)padding;
Parameters
padding
The new padding for the watermark in dp. The default is 4,4.
-
Returns the state of the user input flag.
Declaration
Objective-C
- (BOOL)isUserInput;
Return Value
True if user input is allowed.
-
Sets the state of the user input flag. If set to false the user won’t be able to pan the map using touch controls, programmatic map panning using MapView methods is still possible. The default is false.
Declaration
Objective-C
- (void)setUserInput:(BOOL)enabled;
Parameters
enabled
The new state of the user input flag.
-
Returns the state of the kinetic panning flag.
Declaration
Objective-C
- (BOOL)isKineticPan;
Return Value
True if kinetic panning is enabled.
-
Sets the state of the kinetic panning flag. Kinetic panning allows the map to pan automatically using the inertia of the last swipe, after the user has finished interacting with the touch screen. Default is true.
Declaration
Objective-C
- (void)setKineticPan:(BOOL)enabled;
Parameters
enabled
The new state of the kinetic panning flag.
-
Returns the state of the kinetic rotation flag.
Declaration
Objective-C
- (BOOL)isKineticRotation;
Return Value
True if kinetic rotation is enabled.
-
Sets the state of the kinetic rotation flag. Kinetic rotation allows the map to rotate automatically using the inertia of the last swipe, after the user has finished interacting with the touch screen. Default is true.
Declaration
Objective-C
- (void)setKineticRotation:(BOOL)enabled;
Parameters
enabled
The new state of the kinetic rotation flag.
-
Returns the state of kinetic zoom flag.
Declaration
Objective-C
- (BOOL)isKineticZoom;
Return Value
True if kinetic zooming is enabled.
-
Sets the state of the kinetic zooming flag. Kinetic zooming allows the map to zoom automatically using the inertia of the last swipe, after the user has finished interacting with the touch screen. Default is true.
Declaration
Objective-C
- (void)setKineticZoom:(BOOL)enabled;
Parameters
enabled
The new state of the kinetic zooming flag.
-
Returns the state of the map rotatability flag.
Declaration
Objective-C
- (BOOL)isRotatable;
Return Value
True if map rotating is enabled.
-
Sets the state of the map rotatability flag. If set to false the map can’t be rotated by any means. The default is true.
Declaration
Objective-C
- (void)setRotatable:(BOOL)enabled;
Parameters
enabled
The new state of the map rotatability flag.
-
Returns the tilt range constraint.
Declaration
Objective-C
- (NTMapRange *)getTiltRange;
Return Value
The tilt range constraint in degrees.
-
Sets the tilt range constraint. This will limit the tilt angle of the camera to the specified range. The current tilt angle will remain unaffected, until the next time the tilt angle changes. The minimum tilt angle is 30 degrees and the maximum is 90 degrees. Values that are out of range will be clamped. The default value is MapRange(30, 90).
Declaration
Objective-C
- (void)setTiltRange:(NTMapRange *)tiltRange;
Parameters
tiltRange
The new tilt range constraint in degrees.
-
Returns the zoom range constraint.
Declaration
Objective-C
- (NTMapRange *)getZoomRange;
Return Value
The zoom range constraint.
-
Sets the zoom range constraint. This will limit the zoom level of the camera to the specified range. The current zoom level will remain unaffected, until the next time the zoom level changes. The minimum zoom value is 0 and the maximum is 24. Values that are out of range will be clamped. The default value is MapRange(0, 24).
Declaration
Objective-C
- (void)setZoomRange:(NTMapRange *)zoomRange;
Parameters
zoomRange
The new zoom range constraint.
-
Returns the map panning bounds constraints. Map bounds minimum and maximum points are in the base projection’s coordinate system.
Declaration
Objective-C
- (NTMapBounds *)getPanBounds;
Return Value
The map bounds constraints.
-
Sets the map panning bounds constraints. This will limit camera movement to the specified bounds. The current camera position will remain unaffected, until the next time camera position changes. Map bounds minimum and maximum points are expected to be in the base projection’s coordinate system. If the bounds are larger than the world size, they will be clamped to world bounds. The default value covers the whole world.
Declaration
Objective-C
- (void)setPanBounds:(NTMapBounds *)panBounds;
Parameters
panBounds
The new map bounds constraints.
-
Returns the focus point offset (from screen center) in pixels.
Declaration
Objective-C
- (NTScreenPos *)getFocusPointOffset;
Return Value
The focus point offset in pixels.
-
Sets the focus point offset (from screen center) in pixels.
Declaration
Objective-C
- (void)setFocusPointOffset:(NTScreenPos *)offset;
Parameters
offset
The new focus point offset in pixels.
-
Returns the base projection.
Declaration
Objective-C
- (NTProjection *)getBaseProjection;
Return Value
The base projection.
-
Sets the base projection. All MapView, MapEventListener and Options methods use the coordinate system of this projection. For example, if base projection is set to EPSG3857 then MapView::getFocusPos returns the coordinates in the EPSG3857 coordinate system, The same applies to setter methods like MapView::setFocusPos which expect the input coordinates to be in the base projection’s coordinate system. The default is EPSG3857.
Declaration
Objective-C
- (void)setBaseProjection:(NTProjection *)baseProjection;
Parameters
baseProjection
The new base projection.
-
Undocumented
Declaration
Objective-C
-(void)dealloc;