[OpenLayers-Users] GETinfofeature
summer7310
xia-huadong at 163.com
Sun Aug 11 18:06:25 PDT 2013
Hi,
Using OpenLayers WFS service has a cross-domain access problem , if you
want to use it normal you must set the proxy method , set as follows .
1,open directory "Openlayers/examples",find the "proxy.cgi"file,copy it to
the network application folder"\WEB-INF\cgi"
2,Edit the" proxy.cgi" documents,add remote address in "allowedHosts" array
segment .eg: geoserver Server Pages is "192.168.0.4:8888 / geoserver /" then
add '192 .168.0.4:8888 ' .
3,Install python27 to the default directory "c :/ Python27 / ", tested
python27 can normal use , the new version can not ensure the normal use ,
such as python33 not normally use the proxy .
4,In the application file " web.xml ", add the following content
<servlet>
<servlet-name>cgi</servlet-name>
<servlet-class>org.apache.catalina.servlets.CGIServlet</servlet-class>
<init-param>
<param-name>debug</param-name>
<param-value>0</param-value>
</init-param>
<init-param>
<param-name>cgiPathPrefix</param-name>
<param-value>WEB-INF/cgi</param-value>
</init-param>
<init-param>
<param-name>executable</param-name>
<param-value>c:/Python27/python.exe</param-value>
</init-param>
<init-param>
<param-name>passShellEnvironment</param-name>
<param-value>true</param-value>
</init-param>
<load-on-startup>5</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>default</servlet-name>
<url-pattern>/</url-pattern>
</servlet-mapping>
<servlet-mapping>
<servlet-name>cgi</servlet-name>
<url-pattern>/cgi/*</url-pattern>
</servlet-mapping>
5,Modify the file in the Tomcat directory" Tomcat / conf / context.xml ",
modify the <Context> as <Context privileged="true">
6,Run the test. Assuming that the application is deployed as
http://localhost:8080/map/. Browser access :
http://localhost:8080/map/cgi/proxy.cgi, under normal circumstances, the
feedback is OpenLayers home page.
--
View this message in context: http://osgeo-org.1560.x6.nabble.com/GETinfofeature-tp5071845p5071952.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
More information about the Users
mailing list