Weave Configuration
Datasource.
<jdbc:datasource id="ds.postgresql">
<jdbc:driver>org.postgresql.Driver</jdbc:driver>
<jdbc:url><![CDATA[jdbc:postgresql://localhost:5432/gisdb]]></jdbc:url>
<jdbc:username>postgres</jdbc:username>
<jdbc:password>p05tgr35</jdbc:password>
</jdbc:datasource>
Spatial Engine.
<spatial:spatialEngine id="se.postgresql">
<dbtype>postgis</dbtype>
<host>localhost</host>
<port>5432</port>
<database>postgres</database>
<schema>public</schema>
<user>postgres</user>
<passwd>p05tgr35</passwd>
<dynamic>true</dynamic>
<cache>false</cache>
<primarykeymetadata>
<table schema="public" name="graffiti" column="id" policy="autogenerated"/>
</primarykeymetadata>
<geometrymetadata>
<table schema="public" name="graffiti" type="point" srid="4326" dimension="2"/>
</geometrymetadata>
</spatial:spatialEngine>
Entity and Mapper.
<entity:entity id="graffiti" label="Graffiti" />
<mapper:mapper id="m.graffiti">
<spatialengine>se.postgresql</spatialengine>
<mapping entity="graffiti">
<table>graffiti</table>
<key>id</key>
</mapping>
</mapper:mapper>
MapEngines.
<weave:mapengine id='me.single' >
<spatialengine>se.postgresql</spatialengine>
<format>image/png32</format>
<layers>
<layer id='l_graffiti' label='Graffiti' layer='graffiti' style='/weave/platform/workspace/SpatialDataEditing/graffiti_p.sld'/>
</layers>
<crs>EPSG:4326</crs>
</weave:mapengine>
<!-- Define a Tiled map engine for Open Street Map -->
<tiled:mapengine id="me.osm">
<type>osm</type>
<url>http://a.tile.openstreetmap.org/${z}/${x}/${y}.png</url>
<url>http://b.tile.openstreetmap.org/${z}/${x}/${y}.png</url>
<url>http://c.tile.openstreetmap.org/${z}/${x}/${y}.png</url>
<format>image/png</format>
<layer>0</layer>
<label>OpenStreetMap</label>
</tiled:mapengine>
<!-- Define a Selection Map Engine -->
<selection:mapengine id="me.selection">
<format>image/png32</format>
<batchsize>100</batchsize>
</selection:mapengine>
Table Of Contents.
<!-- TOC including multi table layers -->
<toc:model id="toc.main">
<entry id="l_selection.active" label="Selections" layer="_selection.active" mapengine="me.selection"/>
<entry id="l_vector_graffiti" label="Graffiti" layer="l_graffiti" mapengine="me.single" entity="graffiti" checked="true"/>
<entry id="l_mapengine.osm_0" label="OpenStreetMap" layer="0" mapengine="me.osm"/>
</toc:model>
Styled Layer Descriptors.
Graffiti Points SLD.
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>Graffiti Point</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<PointSymbolizer>
<Graphic>
<Mark>
<WellKnownName>circle</WellKnownName>
<Fill>
<CssParameter name="fill">#FF0000</CssParameter>
</Fill>
</Mark>
<Size>12</Size>
</Graphic>
</PointSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Graffiti Areas SLD.
<?xml version="1.0" encoding="ISO-8859-1"?>
<StyledLayerDescriptor version="1.0.0" xmlns="http://www.opengis.net/sld" xmlns:ogc="http://www.opengis.net/ogc"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.opengis.net/sld http://schemas.opengis.net/sld/1.0.0/StyledLayerDescriptor.xsd">
<NamedLayer>
<Name>Graffiti Areas</Name>
<UserStyle>
<FeatureTypeStyle>
<Rule>
<PolygonSymbolizer>
<Fill>
<CssParameter name="fill">#AAAAAA</CssParameter>
<CssParameter name="fill-opacity">40</CssParameter>
</Fill>
<Stroke>
<CssParameter name="stroke">#000000</CssParameter>
<CssParameter name="stroke-width">1</CssParameter>
</Stroke>
</PolygonSymbolizer>
</Rule>
</FeatureTypeStyle>
</UserStyle>
</NamedLayer>
</StyledLayerDescriptor>
Client.
<?xml version="1.0" encoding="UTF-8"?>
<!-- Define the root config element and the Weave and xml namespaces required for this declaration-->
<config xmlns= "urn:com.cohga.server.config#1.0"
xmlns:xsi= "http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd= "http://www.w3.org/2001/XMLSchema"
xmlns:client= "urn:com.cohga.html.client#1.0"
xmlns:tocView= "com.cohga.html.client.main.tocView">
<!-- Define required configuration items -->
<client:config id="Edit">
<title>Spatial Editing</title>
<toolbar>
<item action="com.cohga.html.client.map.refreshMapAction"/>
<item component="com.cohga.html.client.components.entitySelectorComponent">
<label>Active Layer:</label>
<width>250</width>
</item>
<item>-></item>
<item action="com.cohga.client.actions.about"/>
</toolbar>
<perspective>
<label>Editing</label>
<layout>
<west width="280" type="tab"><layout><center name="west"/></layout></west>
<center type="border"><layout><center name="map"/></layout></center>
</layout>
<view id="com.cohga.html.client.map.mapView">
<location>map</location>
<label>Melbourne</label>
<crs>EPSG:3857</crs>
<toolbar>
<item action="weave.fixedZoomIn"/>
<item action="weave.fixedZoomOut"/>
<item action="weave.fullExtent"/>
<item action="weave.zoomIn"/>
<item action="weave.zoomOut"/>
<item action="weave.pan" isDefault="true"/>
<item>-</item>
<item action="weave.toggleToolbar" iconCls="icon-polygon" align="tl-bl" hideOnClick="true">
<tooltip>
<title>Interactive Select</title>
<text>Use a circle, point, line or polygon to interactively select features in the active layer</text>
</tooltip>
<toolbar>
<item action="com.cohga.html.client.map.select.circle.newAction" />
<item action="com.cohga.html.client.map.select.circle.addAction" />
<item action="com.cohga.html.client.map.select.circle.removeAction" />
<item action="com.cohga.html.client.map.select.circle.refineAction" />
<item>-</item>
<item action="com.cohga.html.client.map.select.point.newAction" />
<item action="com.cohga.html.client.map.select.point.addAction" />
<item action="com.cohga.html.client.map.select.point.removeAction" />
<item action="com.cohga.html.client.map.select.point.refineAction" />
<item>-</item>
<item action="com.cohga.html.client.map.select.polyline.newAction" />
<item action="com.cohga.html.client.map.select.polyline.addAction" />
<item action="com.cohga.html.client.map.select.polyline.removeAction" />
<item action="com.cohga.html.client.map.select.polyline.refineAction" />
<item>-</item>
<item action="com.cohga.html.client.map.select.polygon.newAction" />
<item action="com.cohga.html.client.map.select.polygon.addAction" />
<item action="com.cohga.html.client.map.select.polygon.removeAction" />
<item action="com.cohga.html.client.map.select.polygon.refineAction" />
</toolbar>
</item>
</toolbar>
<control id="com.cohga.client.mapctrl.mousePosition" />
<resolutions>
156543.03390625,
78271.516953125,
39135.7584765625,
19567.87923828125,
9783.939619140625,
4891.9698095703125,
2445.9849047851562,
1222.9924523925781,
611.4962261962891,
305.74811309814453,
152.87405654907226,
76.43702827453613,
38.218514137268066,
19.109257068634033,
9.554628534317017,
4.777314267158508,
2.388657133579254,
1.194328566789627,
0.5971642833948135,
0.298582142
</resolutions>
<mapEngine id="me.osm"/>
<mapEngine id="me.single"/>
<mapEngine id="me.selection"/>
<toc ref="toc.main" />
<extents>
<initial minx="16129800" miny= "-4558400" maxx="16141200" maxy="-4547600" />
<full minx="16129800" miny= "-4558400" maxx="16141200" maxy="-4547600" />
</extents>
<control id="weave.mapctrl.scalebar">
<!-- For display of scale text & scale bar -->
<showText>true</showText>
<!-- Allow menu to change units by right mouse click over scale bar -->
<showMenu>true</showMenu>
<!-- For placement of scale bar -->
<bottom>5</bottom>
</control>
</view>
<!-- Add TOC View to the client -->
<view id="com.cohga.html.client.map.tocView">
<label>Layers</label>
<location>west</location>
<contextmenu>
<item action="weave.toc.zoomToLayer"/>
<item action="weave.toc.selectLayer"/>
</contextmenu>
</view>
</perspective>
<defaults>
<entities>
<entity id="graffiti" isDefault="true"/>
</entities>
</defaults>
<statusbar>
<item component="com.cohga.html.client.components.loadingComponent" />
<item component="com.cohga.html.client.components.statusMessageComponent"/>
</statusbar>
</client:config>
</config>
, multiple selections available,