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
availableBackgroundLayers=wms;osm;bingr;binga;bingh;google;googler
availableBackgroundNames=WMS;Open Street Map;Bing Road Map;Bing Aerial Map;Bing Hybrid Map;Google Earth;Google Roads
availableMaxResolution=0.12;20000;20000;20000;20000;20000;20000 maxResolution=0.12 defaultLanguage=EN availableLanguages=EN;HI_IN;ES;ZH;DE restrictedExtent=-180,-90,180,90 mapBounds=-180,-90,180,90 baseLayerMenuOrientation=vertical menuDesign=topMenu
imageResolution=300

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). It is going to show as the default background layer the one you set in your XML layer file. The following image its a screenshot of this WebGIS site.

The default template can be tested here.

Default template

 

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 20000 (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 Google 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=googler
availableBackgroundLayers=googler;osm;bingr;binga;bingh;google
availableBackgroundNames=Google Roads;Open Street Map;Bing Road Map;Bing Aerial Map;Bing Hybrid Map;Google Earth
availableMaxResolution=20000;20000;20000;20000;20000;20000;20000 maxResolution=20000 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.

The next image is a screenshot of this new configuration.
Default template

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.

GitHub

GitHub of Olmo Zavala

GO

Collaborators

Collaborators in this project

GO

Sponsors

Our Sponsors

GO