![]() |
LuciadCPillar C# 2023.0.03
|
A map for showing geo-spatial data. More...
Classes | |
class | Builder |
null 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 | 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 () |
Luciad.Maps.Map.Renderer | GetRenderer () |
Retrieves the Renderer for this Map. More... | |
Luciad.Maps.Map.ViewMapTransformation | GetViewMapTransformation () |
Returns a 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 | RemoveRendererCallback (Luciad.Maps.Map.IRendererCallback rendererCallback) |
Removes the given callback from the Map. More... | |
void | Resize (uint width, uint 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 () |
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] |
uint | 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] |
Luciad.Geodesy.CoordinateReference | Reference [get] |
uint | Width [get] |
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.
Used to determine how the Map::getViewToMapTransformation method determines the point in Map coordinates that corresponds to a given view location.
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.
|
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.
|
|
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
|
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.
|
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
|
inline |
|
inline |
a Map based height provider.
2023.0
|
inline |
Retrieves 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
|
inline |
Returns a transformation that can transform view coordinates to map coordinates and vice-versa.
the view <> map transformation.
|
inlinestatic |
|
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.
|
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
|
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.
|
get |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
getset |
|
get |
|
get |
|
get |
|
get |
|
get |
|
set |
|
get |
|
set |
|
get |
|
get |