1
|
/*
|
2
|
Author: Cameron Shorter cameronATshorter.net
|
3
|
License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
|
4
|
|
5
|
$Id$
|
6
|
*/
|
7
|
|
8
|
// Ensure this object's dependancies are loaded.
|
9
|
mapbuilder.loadScript(baseDir+"/widget/MapContainerBase.js");
|
10
|
|
11
|
/**
|
12
|
* This is a GML rendering widget that does all the pre-processing but doesn't
|
13
|
* actually render to the page. It is used for debugging purposes.
|
14
|
* @constructor
|
15
|
* @param widgetNode The widget's XML object node from the configuration document.
|
16
|
* @param model The model object that this widget belongs to.
|
17
|
*/
|
18
|
function GmlRendererTest(widgetNode, model) {
|
19
|
|
20
|
/**
|
21
|
* Override of the widget paint method to just pop up an alert with the
|
22
|
* transformed GML document.
|
23
|
* @param objRef Pointer to this object.
|
24
|
*/
|
25
|
this.paint = function(objRef) {
|
26
|
//var response = postLoad("/mapbuilder/writeXml", objRef.model.doc);
|
27
|
var features = objRef.model.doc.selectNodes("//gml:featureMember");
|
28
|
alert("pretending to paint:"+features.length+" features"+Sarissa.serialize(objRef.model.doc));
|
29
|
}
|
30
|
|
31
|
var base = new MapContainerBase(this,widgetNode,model)
|
32
|
}
|