version 2.13.0
add Map library (MapView with OSM maps and items) and mapviewer util
This commit is contained in:
21
libs/map/mapitemnongeogeometrybase.cpp
Normal file
21
libs/map/mapitemnongeogeometrybase.cpp
Normal file
@@ -0,0 +1,21 @@
|
||||
#include "mapitemnongeogeometrybase.h"
|
||||
|
||||
|
||||
void MapItemNonGeoGeometryBase::setUnits(Units u) {
|
||||
m_units = u;
|
||||
updateParent();
|
||||
}
|
||||
|
||||
|
||||
void MapItemNonGeoGeometryBase::zoomChanged() {
|
||||
px2m = scalePx2M(norm_pos);
|
||||
}
|
||||
|
||||
|
||||
double MapItemNonGeoGeometryBase::unitScale() const {
|
||||
switch (m_units) {
|
||||
case Meters: return px2m;
|
||||
default: break;
|
||||
}
|
||||
return 1.;
|
||||
}
|
||||
Reference in New Issue
Block a user