Wiki Markup |
---|
Warning |
This information is for the previous upload bundle, pre-3.0.0, and is no longer supported. {warn} The following contains the new bundles that need to be extracted and started using the usual procedures. |
The following contains the new bundles that need to be extracted and started using the usual procedures.
https://dl.dropbox.com/u/6745119/plugins/com.cohga.spatial.upload.zip
...
Then
...
a
...
dummy
...
map
...
engine
...
must
...
be
...
setup
...
to
...
draw
...
the
...
uploaded
...
layers
...
(hopefully
...
this
...
will
...
be
...
simplified
...
in
...
future).
...
This
...
map
...
engine
...
should
...
be
...
added
...
to
...
the
...
client
...
configurations
...
map
...
view.
...
The
...
default
...
name
...
for
...
the
...
map
...
engine
...
is
...
mapengine.upload
...
,
...
and
...
would
...
need
...
to
...
be
...
explicitly
...
specified
...
in
...
the
...
upload
...
configuration
...
if
...
a
...
different
...
name
...
is
...
used.
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<wms:mapengine id="mapengine.upload">
<url><![CDATA[http://localhost:8081/geoserver/wms]]></url>
<format>image/png</format>
<transparent>true</transparent>
<layers>
<layer>dummy</layer>
</layers>
<selection>false</selection>
<acetate>false</acetate>
</wms:mapengine>
{code}
|
The
...
namespace
...
for
...
the
...
upload
...
parameters
...
is
...
urn:com.cohga.spatial.upload#1.0
...
,
...
so
...
the
...
following
...
should
...
be
...
added
...
to
...
the
...
list
...
of
...
namespaces
...
at
...
the
...
top
...
of
...
the
...
config
...
file:
...
xmlns:upload=
...
"urn:com.cohga.spatial.upload#1.0"
...
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<upload:parameter tempPath="temp" destinationDir="dest" memFileSizeThreshold="1" sizeMax="5">
<projections label="Choose Projection">
<entry value="EPSG:4283">Geographic (GDA94)</entry>
<entry value="EPSG:20254">MGA Zone 54 (AGD66)</entry>
<entry value="EPSG:20255">MGA Zone 55 (AGD66)</entry>
<entry value="EPSG:28354">MGA Zone 54 (GDA94)</entry>
<entry value="EPSG:28355" default="true">MGA Zone 55 (GDA94)</entry>
<entry value="EPSG:3111">VicGrid94 (GDA94)</entry>
</projections>
<colors label="Choose Colour">
<entry value="#FF0000" default="true">Red</entry>
<entry value="#FF7F7F">Light Red</entry>
<entry value="#008000">Green</entry>
<entry value="#209C20">Light Green</entry>
<entry value="#0000FF">Blue</entry>
<entry value="#ADD8E6">Light Blue</entry>
<entry value="#00FFFF">Cyan</entry>
<entry value="#FF00FF">Magenta</entry>
<entry value="#808080">Grey</entry>
<entry value="#D3D3D3">Light Grey</entry>
</colors>
<layername label="Input Layer Name" />
<csv xLabel="X Field Column" yLabel="Y Field Column" />
<cleaning maximumFileAgeInHours="96" checkDelayInHours="6" />
<drawing>
<markShape>circle</markShape>
<markShapeSize>8</markShapeSize>
<strokeWidth>1</strokeWidth>
<timeout>60</timeout>
</drawing>
</upload:parameter>
{code}
|
Valid
...
markShape
...
values
...
are:
...
- cross
- circle
- triangle
- X
- star
- arrow
- hatch
- square
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<item action="com.cohga.spatial.upload.uploadFile">
{code}
{code:xml|title=Advanced button to add to toolbar in client config with default values customised} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<item action="com.cohga.spatial.upload.uploadFile">
<mapEngine>mapengine.upload</mapEngine>
<windowTitle>Upload File</windowTitle>
<windowWidth>400</windowWidth>
<windowHeight>160</windowHeight>
<addText>Add</addText>
<addTooltip>Add local files</addTooltip>
<clearAllText>Clear</clearAllText>
<clearAllTooltip>Clear all uploading files</clearAllTooltip>
<uploadText>Upload</uploadText>
<uploadTooltip>Upload All Files</uploadTooltip>
<stopText>Stop</stopText>
<stopTooltip>Stop uploading</stopTooltip>
<step1Heading>Step 1: Upload file(s)</step1Heading>
<step1PromtText><![CDATA[<p>Please select files</p>]]></step1PromtText>
<step2Heading>Step 2: Input parameters</step2Heading>
<tocGroupLabel>Upload</tocGroupLabel>
<tocGroupDescription>Uploaded Layers</tocGroupDescription>
</item>
{code}
{code:xml|title=Alternative customised button} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<item action="com.cohga.spatial.upload.uploadFile">
<text>Import CSV File</text>
<mapEngine>mapengine.upload</mapEngine>
<windowTitle>Import CSV file as a New Layer</windowTitle>
<windowWidth>400</windowWidth>
<windowHeight>300</windowHeight>
<addText>Browse</addText>
<addTooltip>Browse Local Files</addTooltip>
<clearAllText>Clear</clearAllText>
<clearAllTooltip>Clear All Files</clearAllTooltip>
<uploadText>Import</uploadText>
<uploadTooltip>Import All Files</uploadTooltip>
<step1Heading>Step 1: Import CSV file</step1Heading>
<step2Heading>Step 2: Choose parameters</step2Heading>
<step1PromtText><![CDATA[<p>Please select the CSV file to import. (.csv or .txt and 5MB limit).</p><p> </p>]]></step1PromtText>
<tocGroupLabel>Uploads</tocGroupLabel>
<tocGroupDescription>Uploaded Layers</tocGroupDescription>
</item>
{code}
{code:xml|title=Example ToC view with shapefile and csv upload} |
Code Block | ||||||
---|---|---|---|---|---|---|
| ||||||
<view id='com.cohga.html.client.map.tocView'>
<label>Layers</label>
<location>west</location>
<toolbar>
<item>-></item>
<item action="com.cohga.client.actions.menuAction">
<iconCls>icon-database_go</iconCls>
<text>Add Data</text>
<item action="com.cohga.spatial.upload.uploadFile">
<tocId>toc.main</tocId>
<mapEngine>mapengine.upload</mapEngine>
<text>Import CSV File</text>
<windowTitle>Import CSV file as a New Layer</windowTitle>
<windowWidth>400</windowWidth>
<windowHeight>400</windowHeight>
<addText>Browse</addText>
<addTooltip>Browse Local Files</addTooltip>
<clearAllText>Clear</clearAllText>
<clearAllTooltip>Clear All Files</clearAllTooltip>
<uploadText>Import</uploadText>
<uploadTooltip>Import All Files</uploadTooltip>
<step1Heading>Step 1: Import CSV file</step1Heading>
<step2Heading>Step 2: Choose parameters</step2Heading>
<step1PromtText><![CDATA[<p>Please select the CSV file to import. (.csv or .txt and 5MB limit).</p><p> </p>]]></step1PromtText>
<tocGroupLabel>Uploads</tocGroupLabel>
<tocGroupDescription>Uploaded Layers</tocGroupDescription>
</item>
<item action="com.cohga.spatial.upload.uploadFile">
<maxFileCount>4</maxFileCount>
<tocId>toc.main</tocId>
<mapEngine>mapengine.upload</mapEngine>
<text>Import Shapefile</text>
<windowTitle>Import Shapefile as a New Layer</windowTitle>
<windowWidth>400</windowWidth>
<windowHeight>300</windowHeight>
<addText>Browse</addText>
<addTooltip>Browse Local Files</addTooltip>
<clearAllText>Clear</clearAllText>
<clearAllTooltip>Clear All Files</clearAllTooltip>
<uploadText>Import</uploadText>
<uploadTooltip>Import All Files</uploadTooltip>
<step1Heading>Step 1: Select .shp, .dbf and .shx files</step1Heading>
<step2Heading>Step 2: Choose parameters</step2Heading>
<step1PromtText><![CDATA[<p>Please select the shapefile to import. (.shp, .shx and .dbf and 5MB limit).</p><p> </p>]]></step1PromtText>
<tocGroupLabel>Uploads</tocGroupLabel>
<tocGroupDescription>Uploaded Layers</tocGroupDescription>
</item>
</item>
</toolbar>
</view>
{code} |