提交 876c43bc 编写于 作者: A archosm

Extend max level to 20 from 18.

For morden osm server, Tile level has been extended to 20 from 18.
上级 7df42aec
......@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>640</width>
<height>481</height>
<height>483</height>
</rect>
</property>
<property name="windowTitle">
......@@ -194,7 +194,7 @@
<bool>false</bool>
</property>
<property name="maximum">
<number>18</number>
<number>20</number>
</property>
<property name="pageStep">
<number>4</number>
......@@ -480,8 +480,6 @@
</customwidgets>
<resources>
<include location="resource/resource.qrc"/>
<include location="resource/resource.qrc"/>
<include location="resource/resource.qrc"/>
</resources>
<connections>
<connection>
......
......@@ -192,8 +192,8 @@ namespace QTVOSM{
if (event->delta()<0)
{
nLevel++;
if (nLevel>18)
nLevel=18;
if (nLevel>20)
nLevel=20;
}
else if (event->delta()>0)
{
......@@ -337,7 +337,7 @@ namespace QTVOSM{
\fn layer_tiles::RegImages
\param nX col (x) tile id og this level nLevel
\param nY row (y) tile id og this level nLevel
\param nLevel current level. In osm, nlevel often take 0~18
\param nLevel current level. In osm, nlevel often take 0~20
\return bool succeeded.
*/
bool layer_tiles::RegImages(int nX, int nY,int nLevel)
......
......@@ -750,7 +750,7 @@ namespace QTVOSM{
/*!
\brief convert Mercator to World. World Points is according to current level,
point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_MK2World
......@@ -779,7 +779,7 @@ namespace QTVOSM{
/*!
\brief convert World to Mercator. World Points is according to current level,
point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_World2MK
......@@ -807,7 +807,7 @@ namespace QTVOSM{
/*!
\brief convert LLA to world. World Points is according to current level,
point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_LLA2World
......@@ -838,7 +838,7 @@ namespace QTVOSM{
/*!
\brief convert world to LLA. World Points is according to current level,
point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_World2LLA
......@@ -870,7 +870,7 @@ namespace QTVOSM{
\brief convert Device Points to World. Device Points is according to current viewport,
point(0,0) stay at the top-left, point (width-1,height-1) in bottom-right. World Points is according
to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right,
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_DP2World
......@@ -902,7 +902,7 @@ namespace QTVOSM{
\brief convert World to Device Points. Device Points is according to current viewport,
point(0,0) stay at the top-left, point (width-1,height-1) in bottom-right. World Points is according
to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right,
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20
This approach is devided into several steps, and it is LEVEL RELATED!
\fn tilesviewer::CV_World2DP
......@@ -935,7 +935,7 @@ namespace QTVOSM{
/*!
\brief convert percentage coord to world. World Points is according
to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right,
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18. Percentage coord is a
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20. Percentage coord is a
level-unretated coord, take a range -0.5~0.5, the world center in 0,0, -0.5.-0.5
at top-left, 0.5,0.5 at bottom-right
This approach is LEVEL RELATED!
......@@ -962,7 +962,7 @@ namespace QTVOSM{
/*!
\brief convert world to percentage coord. World Points is according
to current level, point(0,0) stay at the left-top, point (SZ,SZ) in bottom-right,
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 18. Percentage coord is a
the pixel size is 2^m_nLevel*256, m_nLevel between 0 and 20. Percentage coord is a
level-unretated coord, take a range -0.5~0.5, the world center in 0,0, -0.5.-0.5
at top-left, 0.5,0.5 at bottom-right
This approach is LEVEL RELATED!
......
......@@ -42,7 +42,7 @@ namespace QTVOSM{
//Center Lat,Lon
double m_dCenterX; //percentage, -0.5~0.5
double m_dCenterY; //percentage, -0.5~0.5
int m_nLevel; //0-18
int m_nLevel; //0-20
//layers
QList < layer_interface * > m_listLayers;
QSet < layer_interface * > m_setLayers;
......
......@@ -23,10 +23,11 @@ namespace QTVOSM{
* 2.LLA, latitude, longitude and altitude
*
* 3.World Coordinate: uint:Pixel.
* Map system have different zoom level, from 0 to 18.
* Map system have different zoom level, from 0 to 20.
* At level 0, the Mercator Square is mapped onto a 256x256 tile.
* At level 1, the Mercator Square is mapped onto a 512x512 tile.
* At level 18,the Mercator Square is mapped onto a 67108864 x 67108864 tile. (size is 256 * 2 ^18)
* At level 20,the Mercator Square is mapped onto a 268435456 x 268435456 tile. (size is 256 * 2 ^20)
* the coord direction of .World Coordinate is some different from Mercator projection.
* top-left is 0,0, right-bottom is 256 * 2 ^level-1,256 * 2 ^level-1
*
......
......@@ -13,7 +13,7 @@ namespace QTVP_GEOMARKER{
*
* The scene uses World Pixel Coordinate system, which has a commection between zoom level.
* You can learn more principle about coordinates in the comments of class viewer_interface. in zoom level 0,
* world pixel size is 256x256, level 1 is 512x512, level 18 is 67108864 x 67108864
* world pixel size is 256x256, level 1 is 512x512, level 18 is 67108864 x 67108864,level 20 will be 268435456 x 268435456.
* Since the scene coord will be zoomed in / out together with level change, all graphics items' coords should
* be recalculated in time. the method adjust_item_coords will do this automatically,
* and in this function, virtual function geoItemBase::adjust_coords will be called sequentially.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册