There are two applicable file formats for use as Symbols within Geo Web Publisher:
- PNG raster image files (with and without transparency definition)
- DPR vector files
This wiki will demonstrate potential outcomes of each type, including topical procedural notes.
Geo Web Publisher MapViewer Client:
The MapViewer client is most often embedded within site published via the Geo Web Publisher Site Author.
Inherent to the MapViewer client is the ability to add map elements from selectable map layers to a selection set.
As part of a selection set, the map element is highlighted using the color specified by the MapViewer instance’s Highlight color property.
To examine the highlight color property:
- launch the Geo Web Publisher Site Author and open the desired site's dat file. e.g. GeoWebPublisher/Examples/Data/Samplewebsite.dat
- within the navigation pane locate the 'Main' node expand to select the 'Viewer' definition.
MapViewer properties including the Highlight color will then display in the content pane:
Highlight color experimentation may be performed without saving the changes to the original *.dat site file.
Note that the site will need to be republished (CTRL+P), prior to application of any changes.
Symbol libraries:
Symbol libraries (directory paths) are defined within the Geo Web Publisher Administrator.
To examine the existing Symbol library definitions, navigate to the Map Publishing > Symbols node.
When new symbols are created, they must thus be added to a symbol library’s path.
The ensuing examples utilize the delivered ‘Images’ library , thus the applicable path is: … GeoWebPublisher\Examples\Data\SiteMaterial\Symbols
PNG Raster
We begin with a baseline, the Folio layer of the delivered example map: Whistler.
Opening the Map Author, Whistler map, we can navigate to the symbology definition of the Folio map layer.
The symbol assignment is natively set to 'Email_transparent.png' .
To better visualize the distinction in results, we will enlarge the symbol size, changing Symbology Screen Mode (Pixels) value from 24 to 48:
Note: When experimenting the MapViewer view extent can remain unchanged. Changes to a map’s definition (e.g. symbol definitions) can be refreshed using the MapViewer ‘Refresh All Layers’ tool
The GeoWebSite example can then be loaded from the examples page: http://localhost/Examples/default.aspx, or directly http://localhost/Examples/completemapexample/default.aspx
For this series of examples, we zoom to the vicinity of the ‘City Hall’ symbol, from the Landmark layer.
Once the area of interest is established, disengage display of the layers: Parcel, Aerial. Engage display of the Folio layer.
Using the Map Viewer tool ‘Select map Elements’, we can then add the element (Folio layer address symbol) to observe the nascent highlight behavior:
Baseline: Email_transparent.png
Result:
As the delivered Email_transparent.png symbol lacks specific color shading the highlight color appears nominally as expected when applied to ‘white’ (nominal) as seen within the body.
i.e. the interior of the envelope appears as white on the highlight color, thus (fuchsia).
Transparency is present in this symbol, but misleading, as only the pixels external to the outline of the envelope, are transparent.
Comparison: Email_BLU_YEL_TRA.png
Email_BLU_YEL_TRA.png contains 2 filled wings (blue, yellow).
Transparency is set nominally to ‘White’ which affects the top flap, bottom, and as with the baseline example, the surrounding pixels external to the envelope border.
Color filled areas are modified in an additive color process.
When the fuscia highlight color is applied, the blue wing shifts towards purple and the yellow, towards Orange.
Comparison: Email_BLU_YEL.png
As in the previous example, Email_BLU_YEL.png contains 2 filled wings (blue, yellow).
A transparency definition is not present.
Without transparency, all areas are modified in an additive color process as in the previous example.
When the fuscia highlight color is applied, the blue wing shifts towards purple and the yellow, towards orange.
White and greyscale values reflect the true nature of the highlight color.
Notice that without transparency, the entire extent of the image (comprised of the pixels external to the envelope border) is resymbolized.
DPR vector
Vector DPR files are available from various Bentley software products.
In our case, Geo Web Publisher allows creation of symbols from MicroStation cell library contents.
In lieu of MicroStation proper, we’ve used the GWPMSEngine.exe […\GeoWebPublisher\Engine\GWPMSEngine\GWPMSEngine.exe] for creation of the cell and cell library.
The cell is based upon the original Email_transparent raster graphic, as displayed within a *.DGN via the Raster Manager.
Notes on cell creation:
- keyin ‘dialog cellmaintenance’ to load the Cell Library dialog. Attach an existing or new library.
- to enable the ‘Create’ function within the Cell Library dialog, a cell origin must be placed and present, and the cell contents part of a selection set or enclosed with a fence.
- the cell type is graphic, to ensure preservation of the original element symbology
- the cell is comprised of 3 filled shapes: left wing (blue), top flap (white), right wing (yellow). The remaining ‘body’ of the envelope (bottom) is represented only by linework and not a filled shape. Notice that this is evident in the Cell Library dialog with the preview set to Smooth Shading.
Creation of Vector DPR symbols from a cell library is accomplished specifically via command line iDPR conversion. Automated iDPR definitions cannot be utilized.
Notes on iDPR conversion:
- iDPR command line conversion is most easily formulated and executed via a batch (*.bat) command file as shown below
- syntax: notice the double backslash present on the output argument. This is uniquely required when -type=CELL
- addition of the -trace argument, and PAUSE command will allow the command window to persist after completion, allowing for review of the process and troubleshooting when necessary.
- output DPR file naming consists of the cell library name, with the cell name appended .
Comparison: nelscell3_ENV.dpr
No additive color processing occurs, resulting vector DPR containing filled shapes thus resymbolize using the highlight color evenly across all filled shapes.