Symaptic Web GIS Client – Configuration for your own Database

To configure you own database, it is best to start with the Cambridge Database example and modify to suit your own needs.

First, review the camdb_sync.magik script stored in the smallworld\install_config_scripts directory of your Symaptic Web and Mobile Package installation. This script contains the key 9 configuration parameters that you need to set in order to get the Symaptic Web and Mobile Package going. You can of course configure much more if you like, but a basic working installation requires only 11 parameters to be set.

The key parameters are at the top of the script and located between the following comments:

####################################################################
## SET THESE KEY VARIABLES                                        ##
####################################################################

... key parameters in here

####################################################################
####################################################################

Parameters 1-3 – The Installation Location and Google/OSM Selection

The first parameter to set is the location of where the Symaptic Web and Mobile Package was installed. In this documentation we will assume is is C:\symaptic.

You can also choose between using Google Maps or Open Street Maps for your base layer. For Google Maps you need to have your own API key. Google Maps also enables Street View and searching of Google Places.

# The base directory for the Symaptic Web and Mobile Package
system.putenv("SYMAPTIC_BASE_DIR", "C:\geodrive")

# Use "google" or "osm" - NOTE Make sure you switch the Google API key if you
# intend to use Google Maps as the base map - the current key shown is the
# Symaptic demo key to be used for demo purposes only
_local google_or_osm << "google"
_local google_api_key << "YOUR_GOOGLE_API_KEY"

Parameter 4 – The Alternative Nama

This parameter to set is the Smallworld alternative where you would like to calculate the difference updates in. This could be top (“|”) or your Design Manager top (eg. “|DM Top”) or as in the default setting in the Symaptic alternative (“|Symaptic”).

# The alternative(s) to use to calculate differences for
# updates with format:
#     property_list.new_with(:dataset, "|Alternative2",
#                            :dataset2, "|Alternative2")

_local alts << property_list.new_with(:gis, "|Symaptic")

Parameter 5 – The Extract Type

This parameter defines whether the script runs a full extract or a diff/delta extract. The first extract should always be a full extract, after which you can run diff extracts.

# Extract type - :full or :diff - a :full extract must be
# performed the first time this script is run
_local shadow_extract_type << :full

Parameter 6 – The Tables to Extract

This parameter describes which tables to include in the extract and hence which tables are displayed in the Symaptic Web GIS Client. It also includes a grouping which combines the layers into a single theme. At this point we are not configuring which fields to extract, just the table names. To fine tune which fields are extracted, it is easiest to use this first and then fine tune later (see Configuring the Extract Settings for more details on this). No more than 5-10 groups in which all layers belong is a good target to aim for as it reduces web traffic and maintains performance.

# The layers and tables to include using format:
#    {{dataset1, layer1, "Group 1"},
#     {dataset2, layer2, "Group 2"},...

_local layers &amp;lt;&amp;lt; {{:gis,:min_road,"Roads"},
		  {:gis,:pub_rest,"Landbase"},
		  {:gis,:pl_of_interest,"Landbase"},
		  {:gis,:road_works,"Roads"},
		  {:gis,:footpath,"Roads"},
		  {:gis,:play_area,"Landbase"},
		  {:gis,:car_park,"Roads"},
		  {:gis,:roundabout,"Roads"},
		  {:gis,:shop,"Landbase"},
		  {:gis,:park,"Landbase"},
		  {:gis,:trunk_road,"Roads"},
		  {:gis,:slip_road,"Roads"},
		  {:gis,:walk,"Landbase"},
		  {:gis,:hotel,"Landbase"},
		  {:gis,:seat,"Landbase"},
		  {:gis,:rail_line,"Rail"}}

Parameters 7-9 – Styles

This parameter sets the ACE, Style Namd and Style Type on which to base the object styles in the Symaptic Web GIS Client. As per the previous parameter, this provides a base set of styles which then can be further enhanced later (see Customising Styles).

# Information required for style generation
_local ace << "Electricity"
_local style_name << "Default"
_local style_type << "normal"

Parameters 10-11 – Bookmarks

These two parameters define what bookmark list should be used in the Symaptic Web GIS Client. In Smallworld, bookmarks are maintained in the database xml format. The bookmark_xml is typically the the name of the application take away the “application” and add “bookmarks.xml” – see the following example for Cambridge.

# Information for the bookmarks - the bookmark_xml is typically the
# the name of the application take away the "application" and add
# "bookmarks.xml"
_local bookmark_xml << "cam_db_swaf_professional_bookmarks.xml"
_local bookmark_application << "cam_db_swaf_professional_application"

Map Markup in Smallworld

If you are going to use the Map Markup module in Smallworld, review one of the example startup scripts in the symaptic\smallworld\install_config_scripts directory and update the following:

  • Set the location of the Symaptic folder
  • Set the plugin name of the Smallworld Map Manager for your Smallworld application
  • Set the plugin name of the Smallworld Editor Manager for your Smallworld application
  • Set the Smallworld database and table that contains the coordinate system definitions
  • Adjust the size of the markup symbols to match your Smallworld database units so that the markups display appropriately sized
  • Set the default Smallworld world for the markups to display in

Once all parameters have been configured…

Once you have configured all 11 parameters, you are ready to run the script as per the same steps documented at Cambridge Database Example Configuration.