Difference between revisions of "Sf wfs spat"

From ARK
Jump to: navigation, search
(Example Configuration)
(Additional Fields)
 
(11 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
===Description===
 
===Description===
The sf_wfs_spat is the subform for displaying spatial data.  It calls on layers as defined in the wfs (active) and wms (background) maps.
+
The sf_wfs_spat is the subform for displaying spatial data.  It calls on layers as defined from a wfs server (active) and overlays them on a map already setup using the map_admin page.
  
 
===Additional Fields===
 
===Additional Fields===
 
The sf_wfs_spat requires the following additional fields:
 
The sf_wfs_spat requires the following additional fields:
*'''wfs_layers''' - layers from the mapserver/mapfiles/ark_wfs.map to use in this subform
+
*'''query_layers''' - this is an array of the layers to be queried. It contains a set of arrays (one for each layer) named with the name of layer as set on the WFS server configuration. Each layer array takes the following values:
 +
**'''mod''' - the module that the layer is linked to
 +
**'''geom''' - the geometry of the wfs layer. This should be set to either pt, pl or pgn.
 +
**'''url''' - the URL of the wfs server.
 +
**'''style_array''' - OPTIONAL - this is for manually setting the style of the wfs information. It is a named array constructed from the style options explained on this [http://docs.openlayers.org/library/feature_styling.html#style-properties page] - the key should be the property name and the value the desired value.
 +
 
 
*'''wms_layers''' - layers from the mapserver/mapfiles/ark_wms.map to use in this subform
 
*'''wms_layers''' - layers from the mapserver/mapfiles/ark_wms.map to use in this subform
 
*'''op_buffer''' - the buffer in selected units around main item shape in subform
 
*'''op_buffer''' - the buffer in selected units around main item shape in subform
 +
*'''op_placetypes''' - an array of numeric placetype_ids. This can be used instead of [[sf_place]] - to provide an asynchronous query of the places (which may improve page loading times if you have many places in your database). OPTIONAL
  
The wms_layers acts as the background data while the wfs_layers contains the layers to be zoomed to.  
+
The wms_layers acts as the background data while the wfs_layers contains the layers to be zoomed to.
  
 
===Example Configuration===
 
===Example Configuration===
 
<pre>
 
<pre>
 +
// Spatial viewer (subform)
 
$conf_mcd_spat =  
 
$conf_mcd_spat =  
 
     array(
 
     array(
 
         'view_state' => 'max',
 
         'view_state' => 'max',
         'edit_state' => 'view',
+
         'edit_state' => 'edit',
 
         'sf_title' => 'spat_data',  
 
         'sf_title' => 'spat_data',  
         'sf_html_id' => 'cxt_spat_display',
+
         'sf_html_id' => 'spat_display',
 
         'sf_nav_type' => 'name',
 
         'sf_nav_type' => 'name',
 
         'script' => 'php/subforms/sf_wfs_spat.php',
 
         'script' => 'php/subforms/sf_wfs_spat.php',
 
         'query_layers' =>
 
         'query_layers' =>
 
             array(
 
             array(
            'contexts' => array(
+
                'sites' =>
                'mod' => 'cxt',
+
                    array(
                'geom' => 'pgn',
+
                        'mod' => 'fst',
                'url' => 'http://ark.lparchaeology.com/ark/php/map/ark_wxs_server.php?',
+
                        'geom' => 'pt',
                'style_array' =>  
+
                        'url' => 'http://ark.lparchaeology.com/ark/php/map/ark_wxs_server.php?',
                    array(
+
                    'style_array' =>  
                        'strokeColor' => '"black"',
+
                            array(
                        'fillColor' => '"grey"',
+
                            'strokeColor' => '"black"',
                    )
+
                            'fillColor' => '"grey"',
            ),
+
                    )
 +
                ),
 
         ),
 
         ),
         'background_map' => 'Google Overlay',
+
         'background_map' => 'Basic',
         'op_buffer' => 1,
+
         'op_buffer' => 100,
    );
+
);
 
</pre>
 
</pre>
 
[[category:Administrator]]
 
[[category:Administrator]]

Latest revision as of 15:24, 1 June 2012

Description

The sf_wfs_spat is the subform for displaying spatial data. It calls on layers as defined from a wfs server (active) and overlays them on a map already setup using the map_admin page.

Additional Fields

The sf_wfs_spat requires the following additional fields:

  • query_layers - this is an array of the layers to be queried. It contains a set of arrays (one for each layer) named with the name of layer as set on the WFS server configuration. Each layer array takes the following values:
    • mod - the module that the layer is linked to
    • geom - the geometry of the wfs layer. This should be set to either pt, pl or pgn.
    • url - the URL of the wfs server.
    • style_array - OPTIONAL - this is for manually setting the style of the wfs information. It is a named array constructed from the style options explained on this page - the key should be the property name and the value the desired value.
  • wms_layers - layers from the mapserver/mapfiles/ark_wms.map to use in this subform
  • op_buffer - the buffer in selected units around main item shape in subform
  • op_placetypes - an array of numeric placetype_ids. This can be used instead of sf_place - to provide an asynchronous query of the places (which may improve page loading times if you have many places in your database). OPTIONAL

The wms_layers acts as the background data while the wfs_layers contains the layers to be zoomed to.

Example Configuration

// Spatial viewer (subform)
$conf_mcd_spat = 
    array(
        'view_state' => 'max',
        'edit_state' => 'edit',
        'sf_title' => 'spat_data', 
        'sf_html_id' => 'spat_display',
        'sf_nav_type' => 'name',
        'script' => 'php/subforms/sf_wfs_spat.php',
        'query_layers' =>
            array(
                'sites' =>
                    array(
                        'mod' => 'fst',
                        'geom' => 'pt',
                        'url' => 'http://ark.lparchaeology.com/ark/php/map/ark_wxs_server.php?',
                    	'style_array' => 
                            array(
                            'strokeColor' => '"black"',
                            'fillColor' => '"grey"',
                    	)
                ),
        ),
        'background_map' => 'Basic',
        'op_buffer' => 100,
);