Using GISFaces™ is easy. With the instructions below, you should be up and running in no time.
Requirements:
- Java 6 or greater.
- JavaServer Faces 2 or greater.
- Java web container such as Glassfish, Payara, WildFly, Tomcat, or WebSphere.
- Access to the ESRI® ArcGIS API For JavaScript API via Internet or local hosting.
- Some options may require map services hosted on ESRI® ArcGIS Server 10 or greater.
Setup:
- Download the latest GISFaces release.
- The downloaded .zip file contains the library .jar, JavaDoc .jar, examples .war, and documentation .pdf files.
- Copy the gisfaces .jar file to your project's
WEB-INF/lib
directory. - No configuration or setup is required.
Create a web page:
- The easiest way to get started is to use an .xhmtl page from the examples .war file.
- The simple.xhtml page from the examples .war file is shown below.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:gis="https://gisfaces.com"> <h:head> <title>GISFaces Example Map</title> </h:head> <h:body> <h:form> <h:panelGroup id="panel1" layout="block" styleClass="gisfacesMapPanel"></h:panelGroup> <gis:map mapPanel="panel1" background="streets" latitude="39.828175" longitude="-98.5795" zoom="4"></gis:map> </h:form> </h:body> </html>
Usage:
- Add the namespace
xmlns:gis="https://gisfaces.com"
to your page. - Add a
gis:map
component to your page. - Add zero or more
gis:service
components to thegis:map
component. - Add zero or more
gis:layer
components to agis:service
component.