worldImage.setBounds(new Bbox(-2000000, -2000000, 4000000, 4000000)); // Mercator coordinates
worldImage.setStyle(new PictureStyle(0.8));
// And some geometries
final GfxGeometry worldGeometry = new GfxGeometry("MultiPolygonInWorldSpace");
final GeometryFactory gf = new GeometryFactory(map.getMapModel().getSrid(), map.getMapModel().getPrecision());
Polygon p1 = gf.createPolygon(gf.createLinearRing(new Bbox(10000000d, 1000d, 1000000d, 1000000d)), null);
Polygon p2 = gf.createPolygon(gf.createLinearRing(new Bbox(12000000d, 1000d, 500000d, 500000d)), null);
MultiPolygon mp = gf.createMultiPolygon(new Polygon[] {p1, p2});
worldGeometry.setStyle(new ShapeStyle("#FF0000", 0.5f, "#FF0000", 1.0f, 2));
worldGeometry.setGeometry(mp);
final GfxGeometry worldGeometry2 = new GfxGeometry("MultiPointInWorldSpace");
SymbolInfo si = new SymbolInfo();
CircleInfo ci = new CircleInfo();
ci.setR(8.0f);
si.setCircle(ci);
Point pt1 = gf.createPoint(new Coordinate(6000000, -5000000));
Point pt2 = gf.createPoint(new Coordinate(8000000, -5000000));
Point pt3 = gf.createPoint(new Coordinate(7000000, -7000000));
worldGeometry2.setStyle(new ShapeStyle("#0000FF", 0.3f, "#0000FF", 1.0f, 2));
worldGeometry2.setGeometry(gf.createMultiPoint(new Point[] {pt1, pt2, pt3}));
worldGeometry2.setSymbolInfo(si);
button2.addClickHandler(new ClickHandler() {
// Draw an image and some geometries in world space: