正在显示
4 个修改的文件
包含
15 行增加
和
2 行删除
... | ... | @@ -135,7 +135,8 @@ DmpService* DmpTileServer::getService(const std::string &serviceType) |
135 | 135 | ServiceMap::const_iterator iter = services_.find(serviceType); |
136 | 136 | if (iter != services_.end()) |
137 | 137 | { |
138 | - service = dynamic_cast<DmpWMTSService*>(iter->second); | |
138 | + //service = dynamic_cast<DmpWMTSService*>(iter->second); | |
139 | + service = iter->second; | |
139 | 140 | } |
140 | 141 | return service; |
141 | 142 | } | ... | ... |
... | ... | @@ -105,7 +105,7 @@ namespace tileserver |
105 | 105 | { |
106 | 106 | std::string strBuff; |
107 | 107 | GetTile(yMaxTile+j,xMinTile+i,iLevel,strBuff,buffLen); |
108 | - | |
108 | + imageLen+=buffLen; | |
109 | 109 | const char* buff=strBuff.c_str(); |
110 | 110 | st_png_data pngData = {(unsigned char*)buff, 0}; |
111 | 111 | cairo_surface_t *image = cairo_image_surface_create_from_png_stream(cairo_read_func,&pngData); |
... | ... | @@ -168,6 +168,7 @@ namespace tileserver |
168 | 168 | fread.close(); |
169 | 169 | if(len > 0) |
170 | 170 | { |
171 | + length=len; | |
171 | 172 | refbuff.append(imgBuffer,len); |
172 | 173 | } |
173 | 174 | ... | ... |
... | ... | @@ -120,6 +120,15 @@ namespace tileserver |
120 | 120 | } |
121 | 121 | return iLevel; |
122 | 122 | } |
123 | + int TileProviderFactory::screenTileMatrix2(DmpPoint& min,DmpPoint& max,std::vector<DmpTileMatrixSet*>& tileMatrixSets,double& resolution,DmpPoint& origin) | |
124 | + { | |
125 | + int iLevel=-1; | |
126 | + for(auto iter=tileMatrixSets.cbegin();iter!=tileMatrixSets.cend();iter++) | |
127 | + { | |
128 | + | |
129 | + } | |
130 | + return iLevel; | |
131 | + } | |
123 | 132 | //点坐标转行列号 |
124 | 133 | void TileProviderFactory::PointToRowCol(DmpPoint& point,DmpPoint& origin,double resolution,int& xTile,int& yTile) |
125 | 134 | { |
... | ... | @@ -143,6 +152,7 @@ namespace tileserver |
143 | 152 | return false; |
144 | 153 | } |
145 | 154 | // int xMinTile,yMinTile,xMaxTile,yMaxTile; |
155 | + //resolution=76.43718115577508*256; | |
146 | 156 | TileProviderFactory::PointToRowCol(min,origin,resolution,xMinTile,yMinTile); |
147 | 157 | TileProviderFactory::PointToRowCol(max,origin,resolution,xMaxTile,yMaxTile); |
148 | 158 | return true; | ... | ... |
... | ... | @@ -40,6 +40,7 @@ namespace tileserver |
40 | 40 | static int StringToVector(std::string& strVector); |
41 | 41 | static bool BufferCopy(cairo_surface_t *pClsCSFrom, cairo_surface_t *pClsCSTo,cairo_t *cr,int x,int y); |
42 | 42 | static int screenTileMatrix(DmpPoint& min,DmpPoint& max,std::vector<DmpTileMatrixSet*>& tileMatrixSets,double& resolution,DmpPoint& origin); |
43 | + static int screenTileMatrix2(DmpPoint& min,DmpPoint& max,std::vector<DmpTileMatrixSet*>& tileMatrixSets,double& resolution,DmpPoint& origin); | |
43 | 44 | static void PointToRowCol(DmpPoint& point,DmpPoint& origin,double resolution,int& xTile,int& yTile); |
44 | 45 | static bool GetTileScale(DmpTileLayer* dmpTileLayer,int& iLevel,int& xMinTile,int& yMinTile,int& xMaxTile,int& yMaxTile); |
45 | 46 | static cairo_status_t cairo_write_func(void *pbuff, const unsigned char *data, unsigned int length); | ... | ... |
请
注册
或
登录
后发表评论