Class MapCanvas
Inherits the following classes: QtQuick::Item
Public Properties
| Type | Name |
|---|---|
| property real | bottomMargin |
| property bool | forceDeferredLayersRepaint |
| property bool | freehandDigitizing |
| property bool | hovered |
| property bool | incrementalRendering |
| property bool | interactive |
| property bool | isMapRotationEnabled |
| property bool | isRendering |
| property bool | jumping |
| property QgsQuickMapCanvasMap | mapCanvasWrapper |
| property QgsQuickMapSettings | mapSettings |
| property bool | pinched |
| property bool | previewJobsEnabled |
| property list< int > | previewJobsQuadrants |
| property real | quality |
| property real | rightMargin |
| property bool | smooth |
Public Signals
| Type | Name |
|---|---|
| signal void | aboutToWheelZoom Emitted when a zoom action is about to occur, allowing for pre-zoom adjustments. |
| signal void | clicked (var point, var type) This signal is emitted independently of double tap / click. |
| signal void | confirmedClicked (var point) This signal is only emitted if there is no double tap/click coming after a short delay. |
| signal void | doubleClicked (var point, var type) This signal is emitted on a double tap. |
| signal void | longPressReleased (var type) Emitted when a release happens after a long press. |
| signal void | longPressed (var point, var type) |
| signal void | rightClicked (var point, var type) This signal is emitted when a right mouse/stylus click occurs. |
Public Functions
| Type | Name |
|---|---|
| void | freeze (id) |
| void | jumpTo (point, scale=-1, rotation=-1, handleMargins=false, callback=null) |
| void | jumpToPosition (positionSource, scale=-1, rotation=-1, handleMargins=false, callback=null) |
| void | refresh (ignoreFreeze) |
| void | stopRendering () |
| void | unfreeze (id) |
| void | zoomIn (point) |
| void | zoomOut (point) |
Public Properties Documentation
property bottomMargin
real MapCanvas::bottomMargin;
property forceDeferredLayersRepaint
bool MapCanvas::forceDeferredLayersRepaint;
property freehandDigitizing
bool MapCanvas::freehandDigitizing;
property hovered
bool MapCanvas::hovered;
property incrementalRendering
bool MapCanvas::incrementalRendering;
property interactive
bool MapCanvas::interactive;
property isMapRotationEnabled
bool MapCanvas::isMapRotationEnabled;
property isRendering
bool MapCanvas::isRendering;
property jumping
bool MapCanvas::jumping;
Remark:
This property is read-only
property mapCanvasWrapper [1/2]
QgsQuickMapCanvasMap MapCanvas::mapCanvasWrapper;
property mapSettings
QgsQuickMapSettings MapCanvas::mapSettings;
property pinched
bool MapCanvas::pinched;
Remark:
This property is read-only
property previewJobsEnabled
bool MapCanvas::previewJobsEnabled;
property previewJobsQuadrants
list<int> MapCanvas::previewJobsQuadrants;
property quality
real MapCanvas::quality;
property rightMargin
real MapCanvas::rightMargin;
property smooth
bool MapCanvas::smooth;
Public Signals Documentation
signal aboutToWheelZoom
Emitted when a zoom action is about to occur, allowing for pre-zoom adjustments.
void MapCanvas::aboutToWheelZoom;
signal clicked
This signal is emitted independently of double tap / click.
void MapCanvas::clicked;
signal confirmedClicked
This signal is only emitted if there is no double tap/click coming after a short delay.
void MapCanvas::confirmedClicked;
signal doubleClicked
This signal is emitted on a double tap.
void MapCanvas::doubleClicked;
signal longPressReleased
Emitted when a release happens after a long press.
void MapCanvas::longPressReleased;
signal longPressed
void MapCanvas::longPressed;
signal rightClicked
This signal is emitted when a right mouse/stylus click occurs.
void MapCanvas::rightClicked;
Public Functions Documentation
function freeze
void MapCanvas::freeze (
id
)
Freezes the map canvas refreshes.
In case of repeated geometry changes (animated resizes, pinch, pan...) triggering refreshes all the time can cause severe performance impacts.
If freeze is called, an internal counter is incremented and only when the counter is 0, refreshes will happen. It is therefore important to call freeze() and unfreeze() exactly the same number of times.
function jumpTo
void MapCanvas::jumpTo (
point,
scale=-1,
rotation=-1,
handleMargins=false,
callback=null
)
Smoothly animates the map to a new center point
function jumpToPosition
void MapCanvas::jumpToPosition (
positionSource,
scale=-1,
rotation=-1,
handleMargins=false,
callback=null
)
Jump and track a moving target
function refresh
void MapCanvas::refresh (
ignoreFreeze
)
function stopRendering
void MapCanvas::stopRendering ()
function unfreeze
void MapCanvas::unfreeze (
id
)
function zoomIn
void MapCanvas::zoomIn (
point
)
function zoomOut
void MapCanvas::zoomOut (
point
)
The documentation for this class was generated from the following file src/qml/MapCanvas.qml