代码拉取完成,页面将自动刷新
同步操作将从 Jackie Tao/easygis 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
#include <QObject>
#include <maplayer.h>
#include <mapcanvas.h>
namespace EasyGIS {
MapLayer::MapLayer(
const QString &id,
EasyGIS::CRS *crs,
EasyGIS::MapCanvas *mapCanvas)
: mId(id),
mCrs(crs),
mZValue(-1),
mZoomValue(kDefaultZoomValue),
mProvider(nullptr),
mMapCanvasMap(new MapCanvasMap(this)),
mMapCanvas(mapCanvas) {
}
MapLayer::~MapLayer() {
delete mCrs;
delete mProvider;
}
MapLayer::MapLayer(const MapLayer &other) {
mId = other.mId;
mZValue = other.mZValue;
mCrs = other.mCrs;
mMapCanvas = other.mMapCanvas;
}
MapLayer::MapLayer(MapLayer &&other) noexcept {
mId = other.mId;
mZValue = other.mZValue;
mCrs = other.mCrs;
mMapCanvas = other.mMapCanvas;
other.mId = QString{};
other.mCrs = nullptr;
other.mZValue = 0;
other.mMapCanvas = nullptr;
}
MapLayer &
MapLayer::operator=(const MapLayer &other) {
if (this != &other) {
mId = other.mId;
mZValue = other.mZValue;
mCrs = other.mCrs;
mMapCanvas = other.mMapCanvas;
}
return *this;
}
MapLayer &
MapLayer::operator=(MapLayer &&other) noexcept {
if (this != &other) {
mId = other.mId;
mZValue = other.mZValue;
mCrs = other.mCrs;
mMapCanvas = other.mMapCanvas;
other.mId = QString{};
other.mCrs = nullptr;
other.mZValue = 0;
other.mMapCanvas = nullptr;
}
return *this;
}
void
MapLayer::update() {
if(!isVisible()){
qDebug() << id() << "=>图层不显示,跳过刷新操作";
mMapCanvasMap->hide();
return;
}
qDebug() << "刷新图层内容=>" << mMapCanvas->viewExtent();
mProvider->createTask(mMapCanvas->viewExtent(), mZoomValue);
mMapCanvasMap->show();
}
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。