LuciadCPillar C# 2023.1.03
Luciad.Maps.Map Class Reference

A map for showing geo-spatial data. More...

Inheritance diagram for Luciad.Maps.Map:

Classes

class  Builder
 Builder to create a Map. More...
 
class  FeatureQuery
 A query specifies which features you are interested in. More...
 
class  HeightProvider
 A height provider based on the map layers order and visibility. More...
 
interface  IRendererCallback
 This callback can be used to execute tasks on the render thread right before or right after the Map is painted by Map::Renderer. More...
 
class  Renderer
 The Map renderer. More...
 
class  ViewMapTransformation
 This class allows to transform between view (pixel coordinates on the screen) and map coordinates. More...
 

Public Types

enum  LocationMode { ClosestSurface , Terrain }
 Used to determine how the Map::getViewToMapTransformation method determines the point in Map coordinates that corresponds to a given view location. More...
 

Public Member Functions

void AddObserver (Luciad.Maps.IMapObserver observer)
 Adds an observer that allows to receive change events from this map. More...
 
void AddRendererCallback (Luciad.Maps.Map.IRendererCallback rendererCallback)
 Adds the given callback to the Map. More...
 
void DeliverNotifications ()
 Delivers any pending notifications. More...
 
void Destroy ()
 Disposes the Map. More...
 
void Dispose ()
 
Luciad.Maps.Map.HeightProvider GetHeightProvider ()
 Returns the map based height provider. More...
 
Luciad.Maps.Map.Renderer GetRenderer ()
 Returns the renderer for this Map. More...
 
Luciad.Maps.Map.ViewMapTransformation GetViewMapTransformation ()
 Returns the transformation that can transform view coordinates to map coordinates and vice-versa. More...
 
void QueryFeatures (Luciad.Maps.Map.FeatureQuery query, Luciad.Maps.IMapQueryFeaturesCallback callback)
 Queries the features under the given pixel bounds, and passes the result to the given callback. More...
 
void RemoveObserver (Luciad.Maps.IMapObserver observer)
 Removes the given observer. More...
 
void RemoveRendererCallback (Luciad.Maps.Map.IRendererCallback rendererCallback)
 Removes the given callback from the Map. More...
 
void Resize (double width, double height)
 To be called when the host widget resizes, so that the map can adapt its camera, and graphics related resources. More...
 

Static Public Member Functions

static Luciad.Maps.Map.Builder NewBuilder ()
 Creates a new builder to create a map. More...
 

Properties

Luciad.Animations.AnimationManager AnimationManager [get]
 
System.Drawing.Color BackgroundColor [get, set]
 
Luciad.Cameras.Camera Camera [get, set]
 
Luciad.Controllers.IController Controller [get, set]
 
Luciad.Maps.MouseCursor Cursor [get, set]
 
double DisplayScale [get, set]
 
double Dpi [get, set]
 
Luciad.Maps.Effects.GraphicsEffects Effects [get]
 
Luciad.Layers.Features.FeatureStateManager FeatureStateManager [get]
 
double Height [get]
 
bool Is3D [get]
 
Luciad.Layers.LayerList LayerList [get]
 
Luciad.Utils.IInvalidationCallback MapInvalidationCallback [set]
 
Luciad.Maps.MapNavigator MapNavigator [get]
 
Luciad.Maps.IMouseCursorCallback MouseCursorCallback [set]
 
static string PropertyBackgroundColor = PropertyBackgroundColorInternal() [get]
 
static string PropertyCamera = PropertyCameraInternal() [get]
 
static string PropertyController = PropertyControllerInternal() [get]
 
static string PropertyDisplayScale = PropertyDisplayScaleInternal() [get]
 
static string PropertyDpi = PropertyDpiInternal() [get]
 
Luciad.Geodesy.CoordinateReference Reference [get]
 
double Width [get]
 

Detailed Description

A map for showing geo-spatial data.

Data

Data can be added to the map using its LayerList. For rendering, all data is transformed to a common coordinate reference for display. As a consequence, many different types of data can be visualized at the same time: raster data (imagery and elevation) and vector data (Feature instances). The following article shows, among others, how you can add data to the map: Create your first map application Navigation

You can navigate the map using MapNavigator. If you want to fully customize map navigation, you can set the Camera directly. Related articles: How to scale, pan, rotate, and fit a map with the MapNavigator API How to manipulate the camera of a Map with the camera API

Interacting with Features data

To support interaction with Feature data, it is possible to query which features are present in a given pixel bounds. Feature states, such as selection, can be tracked by the Map's FeatureStateManager . Threading

Note that Map and its Map::Renderer track on which thread they are constructed. This is done so that, in subsequent calls, they can verify that the same threads are used consistently. When an inconsistency is detected, an assertion is triggered. This means that: All functions on Map, except getRenderer() must be called on the thread on which the Map was constructed (the "UI" thread). All functions on Map::Renderer must be called on the thread on which getRenderer() was called the first time (the "Render" thread).

Related article: Threading rules for the Map DPI and display scaling

To make sure the Map can be rendered on screens with different DPI's, it is possible to configure: The DPI: see Map::setDpi The display scale: see Map::setDisplayScale

Related article: Support high-resolution (HiDPI) displays Integrating the map with your UI toolkit

The map can only be made visible on the screen when integrating it with a UI toolkit. The samples show how this can be done. Next to that, the following article demonstrates how this is done for Qt: Integrate with Qt.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map.

Member Enumeration Documentation

◆ LocationMode

Used to determine how the Map::getViewToMapTransformation method determines the point in Map coordinates that corresponds to a given view location.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::LocationMode.
Enumerator
ClosestSurface 

Defines the view-to-map transformation mode where, for a given view point (pixels), a corresponding position (in Map coordinates) on a closest surface is provided.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::LocationMode::ClosestSurface.
Terrain 

Defines the view-to-map transformation mode where, for a given view point (pixels) a corresponding position (in Map coordinates) on the terrain is provided.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::LocationMode::Terrain.

Member Function Documentation

◆ AddObserver()

void Luciad.Maps.Map.AddObserver ( Luciad.Maps.IMapObserver  observer)
inline

Adds an observer that allows to receive change events from this map.

Adding the same observer twice is forbidden, and will cause an exception to be thrown.

observer

an observer.

luciad::InvalidArgumentException

when the observer was already added.

luciad::NullArgumentException

when the observer is nullptr.

2023.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::addObserver.

◆ AddRendererCallback()

void Luciad.Maps.Map.AddRendererCallback ( Luciad.Maps.Map.IRendererCallback  rendererCallback)
inline

Adds the given callback to the Map.

After calling this method, the Map::Renderer::paint will start calling the given callback instance.

rendererCallback

a renderer callback instance. Cannot be nullptr.

NullArgumentException

when the renderer call back is nullptr.

2021.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::addRendererCallback.

◆ DeliverNotifications()

void Luciad.Maps.Map.DeliverNotifications ( )
inline

Delivers any pending notifications.

The map buffers up notifications for delivery to the user on the UI thread. However, as the map does not have a way to schedule any actions on the UI thread, the user himself should call this function on the appropriate thread. For example, this could be done when the UI toolkit or framework indicates that the widget containing this map should be updated.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::deliverNotifications.

◆ Destroy()

void Luciad.Maps.Map.Destroy ( )
inline

Disposes the Map.

This method cleans all observers and controllers from the map. This method needs to be called before the Map instance is deleted. If this method is not called, some objects will keep a reference on the map, preventing it to be deleted properly. 2020.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::destroy.

◆ Dispose()

void Luciad.Maps.Map.Dispose ( )
inline

◆ GetHeightProvider()

Luciad.Maps.Map.HeightProvider Luciad.Maps.Map.GetHeightProvider ( )
inline

Returns the map based height provider.

the map based height provider.

2023.0

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::getHeightProvider.

◆ GetRenderer()

Luciad.Maps.Map.Renderer Luciad.Maps.Map.GetRenderer ( )
inline

Returns the renderer for this Map.

The Renderer owns the OpenGL resources related to this Map. It can only be interacted with while the OpenGL context is current. the renderer for this Map.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::getRenderer.

◆ GetViewMapTransformation()

Luciad.Maps.Map.ViewMapTransformation Luciad.Maps.Map.GetViewMapTransformation ( )
inline

Returns the transformation that can transform view coordinates to map coordinates and vice-versa.

the view <> map transformation.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::getViewMapTransformation.

◆ NewBuilder()

Luciad.Maps.Map.Builder Luciad.Maps.Map.NewBuilder ( )
inlinestatic

Creates a new builder to create a map.

a new builder to create a map.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::newBuilder.

◆ QueryFeatures()

void Luciad.Maps.Map.QueryFeatures ( Luciad.Maps.Map.FeatureQuery  query,
Luciad.Maps.IMapQueryFeaturesCallback  callback 
)
inline

Queries the features under the given pixel bounds, and passes the result to the given callback.

All visible layers are taken into account. The features are sorted using the following criteria: 3D: Labels Top Most feature (unless draped) Layer order Feature Z order in the layer Unspecified Order

2D: Labels Layer order Feature Z order in the layer Unspecified Order

It is possible that the same feature appears multiple times in the result list, once for each part of the feature. When a feature is for example painted using 2 draw calls, all 2 parts of the feature can be returned if they are hit. A typical example is a feature is painted using both a geometry on the map and a label. It is up to the caller of this method to filter out duplicate feature hits if needed.

query

the feature query containing the parameters to use to query the visible features

callback

a callback which can handle the result of the query operation. Cannot be nullptr.

NullArgumentException

when the call back is nullptr.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::queryFeatures.

◆ RemoveObserver()

void Luciad.Maps.Map.RemoveObserver ( Luciad.Maps.IMapObserver  observer)
inline

Removes the given observer.

If the given observer was never added, an exception is thrown.

observer

an observer.

luciad::InvalidArgumentException

when the observer is not known.

luciad::NullArgumentException

when the observer is nullptr.

2023.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::removeObserver.

◆ RemoveRendererCallback()

void Luciad.Maps.Map.RemoveRendererCallback ( Luciad.Maps.Map.IRendererCallback  rendererCallback)
inline

Removes the given callback from the Map.

After calling this method, the Map::Renderer::paint will stop calling the given callback instance.

rendererCallback

a renderer callback instance. Cannot be nullptr.

NullArgumentException

when the renderer call back is nullptr.

2021.1

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::removeRendererCallback.

◆ Resize()

void Luciad.Maps.Map.Resize ( double  width,
double  height 
)
inline

To be called when the host widget resizes, so that the map can adapt its camera, and graphics related resources.

width

The new map's width expressed in device independent pixels.

height

The new map's height expressed in device independent pixels.

luciad::InvalidArgumentException

when the width and/or the height is smaller than or equal to 0.

Warning
C# documentation translation is incomplete. You can find more information in the C++ documentation for luciad::Map::resize.

Property Documentation

◆ AnimationManager

Luciad.Animations.AnimationManager Luciad.Maps.Map.AnimationManager
get

◆ BackgroundColor

System.Drawing.Color Luciad.Maps.Map.BackgroundColor
getset

◆ Camera

Luciad.Cameras.Camera Luciad.Maps.Map.Camera
getset

◆ Controller

Luciad.Controllers.IController Luciad.Maps.Map.Controller
getset

◆ Cursor

Luciad.Maps.MouseCursor Luciad.Maps.Map.Cursor
getset

◆ DisplayScale

double Luciad.Maps.Map.DisplayScale
getset

◆ Dpi

double Luciad.Maps.Map.Dpi
getset

◆ Effects

Luciad.Maps.Effects.GraphicsEffects Luciad.Maps.Map.Effects
get

◆ FeatureStateManager

Luciad.Layers.Features.FeatureStateManager Luciad.Maps.Map.FeatureStateManager
get

◆ Height

double Luciad.Maps.Map.Height
get

◆ Is3D

bool Luciad.Maps.Map.Is3D
get

◆ LayerList

Luciad.Layers.LayerList Luciad.Maps.Map.LayerList
get

◆ MapInvalidationCallback

Luciad.Utils.IInvalidationCallback Luciad.Maps.Map.MapInvalidationCallback
set

◆ MapNavigator

Luciad.Maps.MapNavigator Luciad.Maps.Map.MapNavigator
get

◆ MouseCursorCallback

Luciad.Maps.IMouseCursorCallback Luciad.Maps.Map.MouseCursorCallback
set

◆ PropertyBackgroundColor

string Luciad.Maps.Map.PropertyBackgroundColor = PropertyBackgroundColorInternal()
staticget

◆ PropertyCamera

string Luciad.Maps.Map.PropertyCamera = PropertyCameraInternal()
staticget

◆ PropertyController

string Luciad.Maps.Map.PropertyController = PropertyControllerInternal()
staticget

◆ PropertyDisplayScale

string Luciad.Maps.Map.PropertyDisplayScale = PropertyDisplayScaleInternal()
staticget

◆ PropertyDpi

string Luciad.Maps.Map.PropertyDpi = PropertyDpiInternal()
staticget

◆ Reference

Luciad.Geodesy.CoordinateReference Luciad.Maps.Map.Reference
get

◆ Width

double Luciad.Maps.Map.Width
get