Skip to content

Geospatial web framework that includes many geographical tools for Spring MVC based applications.

License

Notifications You must be signed in to change notification settings

gvSIGAssociation/gvsig-web-fw

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

gvSIG Web Framework

Geospatial web framework that includes many geographical tools for Spring MVC based applications.

features

  • OGC capability requests info for:

    • WMS
    • WMTS
    • CWS
  • gvNIX Geo add-on tools to include:

    • Predefined layers
    • User defined layers
      • WMS
      • WMTS
      • Tiles
      • Shp

Requirements

  • Spring web project generated by gvNIX 1.5.x and web mvc geo applied

Include on project

  • 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 and load-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 namespace xmlns: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 namespace xmlns: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 namespace xmlns: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/ to WEB-INF/i18n. Include them into the configuration of the bean ReloadableResourceBundleMessageSource modifying the file webmvc-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 folder views of your project.

  • copy default-empty.jspx into your layouts folder.

  • copy the definition default-dialog-empty (included inside the file gvsig-fw-msg-layouts.xml) into the file layout.xml.

Now you are able to use tools on your map view

About

Geospatial web framework that includes many geographical tools for Spring MVC based applications.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published