提交 a0b70f1dd901dc509faa58dfc314d3f47e49a34d
Merge branch 'master' of http://gitlab.ctune.cn/DMapServer/DMapServer4.1
正在显示
4 个修改的文件
包含
13 行增加
和
20 行删除
| @@ -41,9 +41,9 @@ bool DmpTileLayer::readXml(const boost::property_tree::ptree &layerNode) | @@ -41,9 +41,9 @@ bool DmpTileLayer::readXml(const boost::property_tree::ptree &layerNode) | ||
| 41 | extent_ = DmpXmlUtils::readRectangle(pExtent); | 41 | extent_ = DmpXmlUtils::readRectangle(pExtent); |
| 42 | style_ = layerNode.get<std::string>("style"); | 42 | style_ = layerNode.get<std::string>("style"); |
| 43 | format_ = layerNode.get<std::string>("format"); | 43 | format_ = layerNode.get<std::string>("format"); |
| 44 | - vector_ = layerNode.get<std::string>("vendor"); | 44 | + vendor_ = layerNode.get<std::string>("vendor"); |
| 45 | datasource_ = layerNode.get<std::string>("datasource"); | 45 | datasource_ = layerNode.get<std::string>("datasource"); |
| 46 | - if(strcmp(vector_.c_str(),"QGIS")==0)return true; | 46 | + if(strcmp(vendor_.c_str(),"QGIS")==0)return true; |
| 47 | boost::property_tree::ptree pMatrixSets = layerNode.get_child("tileMatrixSets"); | 47 | boost::property_tree::ptree pMatrixSets = layerNode.get_child("tileMatrixSets"); |
| 48 | for (BOOST_AUTO(pos, pMatrixSets.begin()); pos != pMatrixSets.end(); ++pos) | 48 | for (BOOST_AUTO(pos, pMatrixSets.begin()); pos != pMatrixSets.end(); ++pos) |
| 49 | { | 49 | { |
| @@ -72,9 +72,9 @@ bool DmpTileLayer::writeXml(boost::property_tree::ptree &layerNode) | @@ -72,9 +72,9 @@ bool DmpTileLayer::writeXml(boost::property_tree::ptree &layerNode) | ||
| 72 | { | 72 | { |
| 73 | return false; | 73 | return false; |
| 74 | } | 74 | } |
| 75 | -std::string DmpTileLayer::getVector() | 75 | +std::string DmpTileLayer::getVendor() |
| 76 | { | 76 | { |
| 77 | - return vector_; | 77 | + return vendor_; |
| 78 | } | 78 | } |
| 79 | std::string DmpTileLayer::getDataSource() | 79 | std::string DmpTileLayer::getDataSource() |
| 80 | { | 80 | { |
| @@ -22,7 +22,7 @@ public: | @@ -22,7 +22,7 @@ public: | ||
| 22 | 22 | ||
| 23 | bool readXml(const boost::property_tree::ptree &layerNode); | 23 | bool readXml(const boost::property_tree::ptree &layerNode); |
| 24 | bool writeXml(boost::property_tree::ptree &layerNode); | 24 | bool writeXml(boost::property_tree::ptree &layerNode); |
| 25 | - std::string getVector(); | 25 | + std::string getVendor(); |
| 26 | std::string getDataSource(); | 26 | std::string getDataSource(); |
| 27 | void getTileMatrixSets(std::vector<DmpTileMatrixSet*>& tileMatrixSets); | 27 | void getTileMatrixSets(std::vector<DmpTileMatrixSet*>& tileMatrixSets); |
| 28 | std::string getFormat(); | 28 | std::string getFormat(); |
| @@ -31,7 +31,7 @@ public: | @@ -31,7 +31,7 @@ public: | ||
| 31 | private: | 31 | private: |
| 32 | std::string style_; | 32 | std::string style_; |
| 33 | std::string format_; | 33 | std::string format_; |
| 34 | - std::string vector_; | 34 | + std::string vendor_; |
| 35 | std::string datasource_; | 35 | std::string datasource_; |
| 36 | std::vector<DmpTileMatrixSet*> tileMatrixSets_; | 36 | std::vector<DmpTileMatrixSet*> tileMatrixSets_; |
| 37 | }; | 37 | }; |
| @@ -29,22 +29,23 @@ namespace DmpWmts | @@ -29,22 +29,23 @@ namespace DmpWmts | ||
| 29 | std::shared_ptr<DmpTileProvider> provider; | 29 | std::shared_ptr<DmpTileProvider> provider; |
| 30 | try | 30 | try |
| 31 | { | 31 | { |
| 32 | - std::string tileVersion= dmpTileLayer->getVector(); | 32 | + std::string tileVersion= dmpTileLayer->getVendor(); |
| 33 | std::string tilePath=dmpTileLayer->getDataSource(); | 33 | std::string tilePath=dmpTileLayer->getDataSource(); |
| 34 | //std::string tilePath_ = "/mnt/d/Code/tiles/gdmap/_alllayers"; | 34 | //std::string tilePath_ = "/mnt/d/Code/tiles/gdmap/_alllayers"; |
| 35 | //std::string tileVersion_ = "ESRI_V1"; | 35 | //std::string tileVersion_ = "ESRI_V1"; |
| 36 | int iver=StringToVector(tileVersion); | 36 | int iver=StringToVector(tileVersion); |
| 37 | - Vector version = (Vector)boost::lexical_cast<int>(iver); | 37 | + Vendor version = (Vendor)boost::lexical_cast<int>(iver); |
| 38 | switch(version) | 38 | switch(version) |
| 39 | { | 39 | { |
| 40 | - case Vector::ESRI_V0: | 40 | + case Vendor::ESRI_V0: |
| 41 | provider = std::make_shared<DmpEsriTileProvider>(tilePath); | 41 | provider = std::make_shared<DmpEsriTileProvider>(tilePath); |
| 42 | break; | 42 | break; |
| 43 | - case Vector::ESRI_V1: | 43 | + case Vendor::ESRI_V1: |
| 44 | provider = std::make_shared<DmpEsriBundleV1Provider>(tilePath); | 44 | provider = std::make_shared<DmpEsriBundleV1Provider>(tilePath); |
| 45 | break; | 45 | break; |
| 46 | - case Vector::ESRI_V2: | 46 | + case Vendor::ESRI_V2: |
| 47 | provider = std::make_shared<DmpEsriBundleV2Provider>(tilePath); | 47 | provider = std::make_shared<DmpEsriBundleV2Provider>(tilePath); |
| 48 | + | ||
| 48 | break; | 49 | break; |
| 49 | default: | 50 | default: |
| 50 | provider = nullptr; | 51 | provider = nullptr; |
| @@ -18,7 +18,7 @@ | @@ -18,7 +18,7 @@ | ||
| 18 | 18 | ||
| 19 | namespace DmpWmts | 19 | namespace DmpWmts |
| 20 | { | 20 | { |
| 21 | - enum class Vector | 21 | + enum class Vendor |
| 22 | { | 22 | { |
| 23 | ESRI_V0 = 0, | 23 | ESRI_V0 = 0, |
| 24 | ESRI_V1 = 1, | 24 | ESRI_V1 = 1, |
| @@ -36,13 +36,5 @@ namespace DmpWmts | @@ -36,13 +36,5 @@ namespace DmpWmts | ||
| 36 | private: | 36 | private: |
| 37 | TileProviderFactory(); | 37 | TileProviderFactory(); |
| 38 | }; | 38 | }; |
| 39 | - | ||
| 40 | - // class CapabiliTileProviderFactory | ||
| 41 | - // { | ||
| 42 | - // public: | ||
| 43 | - // static std::shared_ptr<DmpCapabiliTilesProvider> GetProvider(); | ||
| 44 | - // private: | ||
| 45 | - // CapabiliTileProviderFactory(); | ||
| 46 | - // }; | ||
| 47 | } | 39 | } |
| 48 | #endif //__dmptileproviderfactory_h__ | 40 | #endif //__dmptileproviderfactory_h__ |
请
注册
或
登录
后发表评论