Hi.
Has somebody experiences with WMS and JSF? Is there a existing component
which can be used or something similiar?
I've integrated the Community Map Builder (communitymapbuilder.org) into an
existing JSF application. This was quite easy, I only had to add few scripts to
the page:
<script>
// URL of Mapbuilder configuration file.
var mbConfigUrl='config.xml';
</script>
<script type="text/javascript"
src="../../../pi/mapbuilder/lib/Mapbuilder.js"><!--
//--></script>
...
<script><!--
init = function(objRef)
{
config.objects.boxForm.setElementIds('main:whereWest','main:whereNorth','main:whereEast','main:whereSouth');
config.objects.boundingBoxForm.setBoundingElementIds('main:viewWest','main:viewNorth','main:viewEast','main:viewSouth');
}
mbDoLoad(init);
//--></script>
<h:inputHidden id="viewWest" value="#{basicQueryDefinitionBean.viewWest}"/>
<h:inputHidden id="viewNorth" value="#{basicQueryDefinitionBean.viewNorth}"/>
<h:inputHidden id="viewEast" value="#{basicQueryDefinitionBean.viewEast}"/>
<h:inputHidden id="viewSouth" value="#{basicQueryDefinitionBean.viewSouth}"/>
<div class="preludio2-query-basic-stage">
<table border="1" align="center">
<tr>
<td colspan="2">
<div id="mainMapPane"/>
</td>
</tr>
<tr>
<td>
<span id="mainButtonBar"></span>
</td>
<td rowspan="2" width="100" valign="top">
<span id="locatorMap"></span>
</td>
</tr>
<tr>
<td>
<span id="cursorTrack"></span>
</td>
</tr>
<tr>
<td colspan="2">
<div id="scalebar" style="height:60px;"></div>
</td>
</tr>
</table>
</div>
MapBuilder is linked with JSF components via javascript. For instance, if the
user zooms or pans (i.e. changes the current bbox), the boundingBoxForm widget
updates viewWest, viewNorth, viewEast and viewSouth input fields. The same with
boxForm (I use MapBuilder as a bounding box selection tool).
Bye.
/lexi