Project

General

Profile

1
/*
2
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
3
$Id: EditPolygon.js 3807 2008-01-18 13:57:21Z ahocevar $
4
*/
5

    
6
// Ensure this object's dependancies are loaded.
7
mapbuilder.loadScript(baseDir+"/widget/EditButtonBase.js");
8

    
9
/**
10
 * When this button is selected, clicks on the MapPane will add a
11
 * new point to a polygon.
12
 * @constructor
13
 * @base EditButtonBase
14
 * @author Simon Flannery simonDOTflanneryATbigpondDOTcom
15
 * @sponser VPAC
16
 * @param widgetNode The node from the Config XML file.
17
 * @param model The ButtonBar widget.
18
 */
19
function EditPolygon(widgetNode, model) {
20
  // Extend EditButtonBase
21
  EditButtonBase.apply(this, new Array(widgetNode, model));
22

    
23
  this.instantiateControl = function(objRef, Control) {
24
    return new Control(objRef.featureLayer, OpenLayers.Handler.Polygon);
25
  }
26

    
27
}
28

    
(29-29/145)