Np web ii-devel-installation
Transcript of Np web ii-devel-installation
1 (7)
NPWeb II
Introduction to the new NPWeb
Kalle Kuparinen
7/1/2013
ContentsVisual Studio
Setting up IIS
Localhost environment
Installing GeoServer
Setting up Layers
Workspaces
Stores
Layer
Database
The environment
2 (7)
Visual StudioThe version in use is Visual Studio 2010. ASP.NET MVC 3 must be installed with correct framework updates to support it. You can find MVC 3 download below.
http://www.asp.net/mvc/mvc3
Setting up IISThere is only one thing to be taken into consideration when installing IIS to develop the NPWeb II. Since the OpenLayers is javascript based you need to handle cross-domain policies so that it won’t restrict usage of scripts when connection to another server or domain. This is why in addition to IIS you need to install an add-in called URL Rewritehttp://www.iis.net/downloads/microsoft/url-rewrite
3 (7)
You need to add this rule to your Default Web Site in IIS Manager. The new rule option can be found under IIS Manager > Default Web Site > URL Rewrite. After opening URL Rewrite, add a new blank rule with the data shown in the picture above.
Localhost environmentYou need to create an application under Default Web Site in IIS Manager which contains your project.
4 (7)
Adding and application is easy. You only need to provide a name for your application and the path which contains the base folder of the site. After this, the project should be accessible through http://localhost/name_of_your_application.
Installing GeoServerThe current version that we are using is GeoServer 2.3.3. Installation is simple, just remember not to install GeoServer as service if you are using it for development.http://geoserver.org/display/GEOS/GeoServer+2.3.3
After installing GeoServer, you should be able to access it after you start it from localhost:8080/geoserver/web
Setting up LayersThe basic layers from PostgreSQL-database will not work unless they are added to GeoServer. Currently we are unable to use the GeoServer which is located in the same server as the database because of cross-domain policy problems.
WorkspacesUnder Data in GeoServer, create a workspace with following data. Make sure to enter the exact namespace as quoted.
Name of workspace | Namespace
5 (7)
“Oulu” | “http://www.ouka.fi/”
“Kuopio” | “http://www.kuopio.fi/”
“Tampere” | “http://www.tampere.fi/”
StoresStores are used to connect to a database. There are currently 3 databases existing, named as lowercase letters oulu, kuopio and tampere. To create a store, select the Workspace you created, name your store according to the customer and select the right database.
This is an example of connection to Kuopios database. The connection string is the same for Tampere and Oulu. Remember lowercase database names. The password can be asked from employees of Vianova Systems Finland.
LayerTo add a layer, you select your Workspace and Store which you created into that Workspace. After that it should show you the available tables which contain data for features. Publish those tables
6 (7)
Remember to compute the values by clicking the blue links before publishing
If you go to layer preview, you should be able to see the GML Preview which opens a XML which should show data. If it doesn’t show anything, something is wrong.
DatabaseThe database can be accessed through pgAdmin. If you need to fiddle with the data, you need to download the pgAdmin Tools program.
http://www.pgadmin.org/download/windows.php
Connection to developer database in pgAdmin.
The environmentAlways remember to start up your GeoServer from the start menu for the features to display on the maps. You should be
7 (7)
now able to access http://localhost/name_of_your_application and start exploring the wonders of NPWeb II