提交 1eb9cf538d258cf330f5dc0b5abfa31b48833acb

作者 WZP 万忠平
1 个父辈 a9f08b3f

wan

@@ -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,21 +29,21 @@ namespace DmpWmts @@ -29,21 +29,21 @@ 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 break; 48 break;
49 default: 49 default:
@@ -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,
@@ -35,13 +35,5 @@ namespace DmpWmts @@ -35,13 +35,5 @@ namespace DmpWmts
35 private: 35 private:
36 TileProviderFactory(); 36 TileProviderFactory();
37 }; 37 };
38 -  
39 - // class CapabiliTileProviderFactory  
40 - // {  
41 - // public:  
42 - // static std::shared_ptr<DmpCapabiliTilesProvider> GetProvider();  
43 - // private:  
44 - // CapabiliTileProviderFactory();  
45 - // };  
46 } 38 }
47 #endif //__dmptileproviderfactory_h__ 39 #endif //__dmptileproviderfactory_h__
注册登录 后发表评论