Skip to content
This repository has been archived by the owner on May 6, 2021. It is now read-only.

AdvancedSnappingAgent

Tobia edited this page Jun 30, 2014 · 4 revisions

This component wraps the OpenLayers's Snapping control in order to snap feature's vertex during the editing operations. He interacts with the gxp.FeatureManager and gxp.FeatureEditor in order to manage snapping's operations.

Configuration

    //..
    {
        "ptype": "gxp_featuremanager",
        "id": "featuremanager",
        "paging": true,
		"pagingType": 1,
        "autoLoadFeatures": false
    },{
        "ptype": "gxp_featureeditor",
        "featureManager": "featuremanager",
		"toggleGroup": "toolGroup",
        "autoLoadFeatures": false,
        "actionTarget":{
            "target":"paneltbar",
            "index":24
        },
		"snappingAgent": "snapping-agent"
    },{
		"ptype": "gxp_advancedsnappingagent",
		"id": "snapping-agent",
		"actionTarget":{
            "target":"paneltbar",
            "index":16
        }
    },
    //...
  • ptype: The plugin type (gxp_advancedsnappingagent).

  • id: The plugin's id.

  • targets: (Optional) Array of objects. Allows to specify layers (source and name) for wich enable the snapping. By default the snapping will be enabled for each selected layers inside the LayerTree. An example below.

      {
      	"ptype": "gxp_advancedsnappingagent",
      	"id": "snapping-agent",
      	"actionTarget":{
              "target":"paneltbar",
              "index":16
          },
          "targets": [{
              "source": "geosolutions",
              "name": "topp:states"
          }]
      }
    
  • actionTarget: As usually, this means the action target location inside the Viewport.

Clone this wiki locally