GENERAL MAP OPTIONS
In this tutorial we describe how to configure the general parameters of OWGIS for building new maps. These parameters are modified in the Java properties file at:
OWGIS_PATH/web/WEB-INF/conf/MapViewConfig.properties
The default MapViewConfig.properties file looks like this:
mapcenter=lat=0,lon=0 zoomLevels=18 zoom=1 zoomFactor=2 backgroundLayer=wms maxResolution=0.18 defaultLanguage=EN availableLanguages=EN;HI_IN;ES;ZH;DE restrictedExtent=-180,-90,180,90 mapBounds=-180,-90,180,90 baseLayerMenuOrientation=vertical menuDesign=topMenu
This default configuration centers the map at 0,0, has an initial zoom where part of Africa and South America is visible, and does not have any restriction when panning the map (you can move around the whole world). The following image its a screenshot of this WebGIS site.
The default template can be tested here or download the war file from here.
Modifying default parameters
But what should we do if we are working only on a smaller region and we are located close to Japan. And even change the background map. In this case we can modfiy the maxResolution to 10000 (km) to restrict how far the map can be viewed; modify the center of the map so we are in Japan (lon=138.25,lat=35.91) and change the background layer to use the MapQuest roads map. We can also define chinese as the default language of the website (we still don't have Japanese).
mapcenter=lat=39.91,lon=138.25 zoomLevels=10 zoom=2 zoomFactor=2 backgroundLayer=mapquestr maxResolution=10000 defaultLanguage=ZH availableLanguages=EN;HI_IN;ES;ZH;DE restrictedExtent=-180,-90,180,90 mapBounds=-180,-90,180,90 baseLayerMenuOrientation=vertical menuDesign=topMenu
The new configuration can be tested here or download the war file from here.
The next image is a screenshot of this new configuration.
More information about each of the Map parameters can be found directly on the properties file.
SUMMARY. The parameters in MapViewConfig.properties are normally modified only once for each new project. This file controls the basic positions and initial view of the map.