正在显示
7 个修改的文件
包含
71 行增加
和
4 行删除
... | ... | @@ -43,7 +43,9 @@ public: |
43 | 43 | std::string domain() const { return domain_; } |
44 | 44 | std::string port() const { return port_; } |
45 | 45 | std::string path() const { return path_; } |
46 | + std::string enpath() const { return enpath_; } | |
46 | 47 | void setPath(const std::string &path) { path_ = path;} |
48 | + void setEnPath(const std::string &enPath) { enpath_ = enPath;} | |
47 | 49 | std::string query() const { return query_; } |
48 | 50 | void setQuery(const std::string &queryString); |
49 | 51 | std::string header( const std::string &name ) const; |
... | ... | @@ -67,6 +69,7 @@ protected: |
67 | 69 | std::string domain_; |
68 | 70 | std::string port_; |
69 | 71 | std::string path_; |
72 | + std::string enpath_; | |
70 | 73 | std::string query_; |
71 | 74 | bool isRestful_; |
72 | 75 | ... | ... |
... | ... | @@ -47,6 +47,7 @@ DmpSpServerRequest::DmpSpServerRequest(SP_HttpRequest* request) |
47 | 47 | if (pos != std::string::npos) { |
48 | 48 | std::string path = deurl.substr(0, pos); |
49 | 49 | setPath(path); |
50 | + setEnPath(url.substr(0, url.find("?"))); | |
50 | 51 | std::string queryString; |
51 | 52 | queryString = deurl.substr(pos+1,deurl.length()); |
52 | 53 | setQuery(queryString); |
... | ... | @@ -54,6 +55,7 @@ DmpSpServerRequest::DmpSpServerRequest(SP_HttpRequest* request) |
54 | 55 | else { |
55 | 56 | isRestful_ = true; |
56 | 57 | setPath(deurl); |
58 | + setEnPath(url); | |
57 | 59 | } |
58 | 60 | |
59 | 61 | // for(int i=0; i< request->getParamCount(); i++) { | ... | ... |
... | ... | @@ -22,6 +22,7 @@ SET (MAPSERVER_SRCS |
22 | 22 | wms/dmpwmsgetmap.cpp |
23 | 23 | wms/dmpwmsserviceinfo.cpp |
24 | 24 | wms/dmpwmsgetfeatureinfo.cpp |
25 | + wms/dmpprint.cpp | |
25 | 26 | mapping/dmpmapping.cpp |
26 | 27 | mapping/dmpeditservice.cpp |
27 | 28 | mapping/dmpmappingparameters.cpp |
... | ... | @@ -48,6 +49,7 @@ SET (MAPSERVER_HDRS |
48 | 49 | wms/dmpwmsgetmap.h |
49 | 50 | wms/dmpwmsserviceinfo.h |
50 | 51 | wms/dmpwmsgetfeatureinfo.h |
52 | + wms/dmpprint.h | |
51 | 53 | mapping/dmpmapping.h |
52 | 54 | mapping/dmpeditservice.h |
53 | 55 | mapping/dmpmappingparameters.h | ... | ... |
... | ... | @@ -30,11 +30,11 @@ namespace DmpWfs |
30 | 30 | std::string port = context.request()->port(); |
31 | 31 | if(port == "80" || port =="") |
32 | 32 | { |
33 | - sprintf(char_hrefUrl, "http://%s%s", domain.c_str(), context.request()->path().c_str()); | |
33 | + sprintf(char_hrefUrl, "http://%s%s", domain.c_str(), context.request()->enpath().c_str()); | |
34 | 34 | } |
35 | 35 | else |
36 | 36 | { |
37 | - sprintf(char_hrefUrl, "http://%s:%s%s", domain.c_str(),port.c_str(), context.request()->path().c_str()); | |
37 | + sprintf(char_hrefUrl, "http://%s:%s%s", domain.c_str(),port.c_str(), context.request()->enpath().c_str()); | |
38 | 38 | } |
39 | 39 | hrefUrl = char_hrefUrl; |
40 | 40 | // hrefUrl = "http://172.26.40.51:8821/?mapService=test"; | ... | ... |
... | ... | @@ -10,7 +10,66 @@ |
10 | 10 | #ifndef __dmpprint_h__ |
11 | 11 | #define __dmpprint_h__ |
12 | 12 | |
13 | +#include <string> | |
14 | +#include <string.h> | |
15 | +#include <vector> | |
16 | +#include <map> | |
13 | 17 | |
18 | +#include "clsCrSurf.h" | |
19 | +#include "clsRect.h" | |
20 | +#include "clsUtil.h" | |
21 | +using namespace std; | |
22 | +using namespace DmapCore_30; | |
23 | +namespace DmpWms | |
24 | +{ | |
25 | + class DmpPrint | |
26 | + { | |
27 | + private: | |
28 | + std::string m_name; | |
29 | + std::string m_spatialReference; | |
30 | + double xmin; | |
31 | + double ymin; | |
32 | + double xmax; | |
33 | + double ymax; | |
34 | + int m_width; | |
35 | + int m_height; | |
36 | + int spatialReference_node; | |
37 | + int m_wkid; | |
38 | + int m_dpi; | |
39 | + double m_scale; | |
40 | + int isPicture; | |
14 | 41 | |
42 | + private: | |
43 | + bool DoSetBackGround(clsCrSurf *pClsCS, int iColor); | |
44 | + double RecalculateScale(double right, double left, double top, double bottom, double width, double height); | |
45 | + string GetFilePath(string path); | |
46 | + int GetCurrentFolderPath(char *processdir, size_t len); | |
47 | + bool InitTemplateValue(string templateValue); | |
48 | + bool ToPrint(std::string &responseData); | |
49 | + | |
50 | + public: | |
51 | + DmpPrint(int isPicture); | |
52 | +/* | |
53 | + bool getPrint(AppendBuffer *ab, map<string, shared_ptr<WMSServer>> &mapWmsServer, const char *xml, string servername); | |
54 | + bool getPrint(AppendBuffer *ab, map<string, shared_ptr<WMSServer>> &mapWmsServer, string servername, const char *printTemp, const char *bbox); | |
55 | + | |
56 | + bool getPrintLayout(AppendBuffer *ab, | |
57 | + shared_ptr<WMSServer> pWmsServer, | |
58 | + const char *xml, | |
59 | + const char *bbox); | |
60 | + | |
61 | + bool getPrintTempFile(AppendBuffer *ab, | |
62 | + shared_ptr<WMSServer> pWmsServer, | |
63 | + const char *tempName, | |
64 | + const char *bbox); | |
65 | + | |
66 | + bool Test(AppendBuffer *ab, map<string, shared_ptr<WMSServer>> &mapWmsServer, string servername); | |
67 | + | |
68 | + vector<shared_ptr<DmapPrintLayout>> vector_dmapPrintLayout; | |
69 | + | |
70 | + vector<shared_ptr<OperationalLayer>> vector_operationalLayer; | |
71 | + */ | |
72 | + }; | |
73 | +} | |
15 | 74 | |
16 | 75 | #endif // __dmpprint_h__ | ... | ... |
... | ... | @@ -25,11 +25,11 @@ namespace DmpWms |
25 | 25 | std::string title = context.serverProject()->title(); |
26 | 26 | if(port == "80" || port =="") |
27 | 27 | { |
28 | - sprintf(char_hrefUrl, "http://%s%s", domain.c_str(), context.request()->path().c_str()); | |
28 | + sprintf(char_hrefUrl, "http://%s%s", domain.c_str(), context.request()->enpath().c_str()); | |
29 | 29 | } |
30 | 30 | else |
31 | 31 | { |
32 | - sprintf(char_hrefUrl, "http://%s:%s%s", domain.c_str(),port.c_str(), context.request()->path().c_str()); | |
32 | + sprintf(char_hrefUrl, "http://%s:%s%s", domain.c_str(),port.c_str(), context.request()->enpath().c_str()); | |
33 | 33 | } |
34 | 34 | hrefUrl = char_hrefUrl; |
35 | 35 | // hrefUrl = "http://172.26.40.51:8821/?mapService=test"; | ... | ... |
请
注册
或
登录
后发表评论