diff options
Diffstat (limited to 'src/location/declarativemaps/qdeclarativegeomapitembase.cpp')
-rw-r--r-- | src/location/declarativemaps/qdeclarativegeomapitembase.cpp | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/src/location/declarativemaps/qdeclarativegeomapitembase.cpp b/src/location/declarativemaps/qdeclarativegeomapitembase.cpp index d1a34f1e..70b67828 100644 --- a/src/location/declarativemaps/qdeclarativegeomapitembase.cpp +++ b/src/location/declarativemaps/qdeclarativegeomapitembase.cpp @@ -218,6 +218,33 @@ void QDeclarativeGeoMapItemBase::setAutoFadeIn(bool fadeIn) polishAndUpdate(); } +int QDeclarativeGeoMapItemBase::lodThreshold() const +{ + return m_lodThreshold; +} + +void QDeclarativeGeoMapItemBase::setLodThreshold(int lt) +{ + if (lt == m_lodThreshold) + return; + m_lodThreshold = lt; + update(); +} + +/*! + \internal + + This returns the zoom level to be used when requesting the LOD. + Essentially it clamps to m_lodThreshold, and if above, it selects + a ZL higher than the maximum LODable level. +*/ +unsigned int QDeclarativeGeoMapItemBase::zoomForLOD(int zoom) const +{ + if (zoom >= m_lodThreshold) + return 30; // some arbitrarily large zoom + return uint(zoom); +} + /*! \internal */ |