Source code:
fire.require(
function(){
var output = $("#output > pre > code");
output.append("Creating Group with Spatial Index...<br/>");
var group = new fire.gear.geom.Group({type: fire.gear.geom.SpatialIndexType.QuadTree});
var pm = new fire.gear.geom.PrecisionModel(fire.gear.geom.PrecisionModel.FLOATING);
var factory = new fire.gear.geom.GeometryFactory(pm);
var c1 = new fire.gear.geom.Coordinate(8, 43);
var pt1 = factory.createPoint(c1);
group.include(pt1);
output.append("Now group size is: " + group.size() + "<br/>");
var c2 = new fire.gear.geom.Coordinate(8, 44);
var c3 = new fire.gear.geom.Coordinate(9, 44);
var c4 = new fire.gear.geom.Coordinate(9, 43);
var ls = factory.createLineString([c2,c3,c4]);
group.include(ls);
output.append("Now group size is: " + group.size() + "<br/>");
} , {
modules : [fire.Modules.GEAR]
,mode : fire.Mode.BUILD
,otherScripts: []
,relative: "../lib/fire/"
}
);