Development Environment Setup
Here we will guide you through the process of setting up a development environment so you can access our geoserver that is serving data.
OpenLayers
Apache Web Server
Before we can run any examples, we must set up a proxy so that requests from your domain match our WFS. Setting up a proxy is very simple and the details can be found here.
Running Examples
Solving Same Origin Policy Problem (or cross-site script)
"Same Origin Policy" is a security restriction for client (browser)-side scripting. (Read: http://en.wikipedia.org/wiki/Same_origin_policy). This policy make JS development tricky in developer's local machine. Here is how to solve the problem. Helpful links are:
- http://trac.openlayers.org/wiki/FrequentlyAskedQuestions#ProxyHost
- http://n2.nabble.com/GeoServer-Proxy-Extension-OpenLayers-td3998936.html
How to
...
- CGI script is in python. You may need to install python and change the header of the CGI script
...
- If proxy.cgi shows openlayers home page, it's working.
...
- Add your geoserver host name to allowedHosts list
...