Geospatial web framework that includes many geographical tools for Spring MVC based applications.
-
OGC capability requests info for:
- WMS
- WMTS
- CWS
-
gvNIX Geo add-on tools to include:
- Predefined layers
- User defined layers
- WMS
- WMTS
- Tiles
- Shp
- Spring web project generated by gvNIX 1.5.x and
web mvc geo
applied
-
include dependency and repository on
pom.xml
file:.... <repositories> .... .... <repository> <id>gvsig-public-http-repository</id> <name>gvSIG maven public HTTP repository</name> <url>http://devel.gvsig.org/m2repo/j2se</url> <releases> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>warn</checksumPolicy> </releases> <snapshots> <enabled>true</enabled> <updatePolicy>daily</updatePolicy> <checksumPolicy>warn</checksumPolicy> </snapshots> </repository> </repositories> .... .... <dependencies> .... .... <dependency> <groupId>org.gvsig</groupId> <artifactId>org.gvsig.web.framework</artifactId> <version>${gvsig.web.fw.version}</version> </dependency> .... </dependencies> .... <properties> .... .... .... <gvsig.web.fw.version>Include_version_here</gvsig.web.fw.version> .... </properties>
-
register service and controller on
webmvc-config.xml
:.... .... <!-- gvSIG Web Framework integration --> <bean class="org.gvsig.framework.web.service.impl.OGCInfoServiceImpl" name="ogcInfoService"/> <bean class="org.gvsig.framework.web.controllers.OGCInfoController" name="ogcInfoController"/> .... ....
-
include web resources on
load-scripts.tagx
andload-styles.tagx
:
<jsp:root xmlns:c="http://java.sun.com/jsp/jstl/core"
xmlns:fn="http://java.sun.com/jsp/jstl/functions"
xmlns:jsp="http://java.sun.com/JSP/Page"
xmlns:spring="http://www.springframework.org/tags"
xmlns:gvsig="http://gvsig.org/web-framework/TLD/util"
version="2.0">
....
<!-- js -->
....
<gvsig:load-scripts/>
....
<!-- styles -->
....
<gvsig:load-styles/>
</jsp:root>
-
remove on
load-scripts.tagx
the following load of scripts:- leaflet.ext.gvnix.map.js
- leaflet.ext.gvnix.map.fancytreelayercontrol.js
- leaflet.ext.gvnix.map.clean.tool.js
- leaflet.ext.gvnix.map.coordinates.component.js
- leaflet.ext.gvnix.map.draw.tool.js
- leaflet.ext.gvnix.map.filter.tool.js
- leaflet.ext.gvnix.map.generic.tool.js
- leaflet.ext.gvnix.map.geosearch.tool.js
- leaflet.ext.gvnix.map.measure.tool.js
- leaflet.ext.gvnix.map.print.tool.js
- leaflet.ext.gvnix.map.scale.component.js
- leaflet.ext.gvnix.map.zoomselect.tool.js
- leaflet.ext.gvnix.map.zoomselectall.tool.js
-
search in your project
xmlns:components="urn:jsptagdir:/WEB-INF/tags/geo/components"
and include in the file where appear the definition of the xml namespacexmlns:gvsig-components="http://gvsig.org/web-framework/TLD/components"
-
search in your project
xmlns:layer-tool="urn:jsptagdir:/WEB-INF/tags/geo/layers/tools
and include in the file where appear the definition of the xml namespacexmlns:gvsig-layers-tools="http://gvsig.org/web-framework/TLD/layers-tools"
-
search in your project
xmlns:tool="urn:jsptagdir:/WEB-INF/tags/geo/tools"
and include in the file where appear the definition of the xml namespacexmlns:gvsig-tools="http://gvsig.org/web-framework/TLD/tools"
-
search and replace:
<tool:...>
by<gvsig-tools:...>
<layer-tool:...>
by<gvsig-layers-tools:...>
<components:...>
by<gvsig-components:...>
-
copy files that contains the messages from
src/main/resources/templates/i18n/
toWEB-INF/i18n
. Include them into the configuration of the beanReloadableResourceBundleMessageSource
modifying the filewebmvc-config.xml
:
....
<bean class="org.springframework.context.support.ReloadableResourceBundleMessageSource" id="messageSource" p:basenames="WEB-INF/i18n/messages,WEB-INF/i18n/application,WEB-INF/i18n/gvsig-fw-msg" p:fallbackToSystemLocale="false"/>
....
-
copy the content of the folder
src/main/resources/templates/views
into the folderviews
of your project. -
copy
default-empty.jspx
into yourlayouts
folder. -
copy the definition
default-dialog-empty
(included inside the filegvsig-fw-msg-layouts.xml
) into the filelayout.xml
.
Now you are able to use tools on your map view