package de.desjardins.ol3.demo.client.utils;

import ol.Collection;
import ol.OLFactory;
import ol.control.Control;

/**
 * 
 * @author Tino Desjardins
 *
 */
public final class DemoUtils {
    
    private DemoUtils() {
        throw new AssertionError();
    }
    
    /**
     * Creates some default controls.
     * 
     * @param controls
     */
    public static void addDefaultControls(final Collection<Control> controls) {

        controls.push(OLFactory.createFullScreen());
        controls.push(OLFactory.createZoomSlider());
        controls.push(OLFactory.createMousePosition());
        controls.push(OLFactory.createZoomToExtent());

    }
    
}

@@ -71,25 +71,65 @@
 port ol.
-OLFactory
+Coordinate;%0Aimport ol.OLFactory;%0Aimport ol.OLUtil
 ;%0Aimport
@@ -148,16 +148,40 @@
 Control;
+%0Aimport ol.geom.Polygon;
 %0A%0A/**%0A *
@@ -649,24 +649,24 @@
 osition());%0A
-
         cont
@@ -709,16 +709,942 @@
 nt());%0A%0A
+    %7D%0A    %0A    /**%0A     * Creates a test polygon geometry (triangle).%0A     * %0A     * @return test polygon geometry (EPSG:3857)%0A     */%0A    public static Polygon createTestPolygon() %7B%0A    %09%0A    %09Coordinate%5B%5D%5B%5D coordinates = new Coordinate%5B1%5D%5B4%5D;%0A    %09%0A    %09Coordinate point1 = OLFactory.createCoordinate(13.36, 52.53);%0A    %09Coordinate point2 = OLFactory.createCoordinate(13.36, 52.51);%0A    %09Coordinate point3 = OLFactory.createCoordinate(13.37, 52.52);%0A    %09Coordinate point4 = OLFactory.createCoordinate(13.36, 52.53);%0A    %09%0A    %09coordinates%5B0%5D%5B0%5D = point1;%0A    %09coordinates%5B0%5D%5B1%5D = point2;%0A    %09coordinates%5B0%5D%5B2%5D = point3;%0A    %09coordinates%5B0%5D%5B3%5D = point4;%0A     %09%0A    %09Coordinate%5B%5D%5B%5D tranformedCoordinates = new Coordinate%5Bcoordinates.length%5D%5Bcoordinates%5B0%5D.length%5D;%0A    %09%0A    %09tranformedCoordinates%5B0%5D = OLUtil.transform(coordinates%5B0%5D, %22EPSG:4326%22, %22EPSG:3857%22);%0A    %09return OLFactory.createPolygon(tranformedCoordinates);%0A%0A
     %7D%0A  

Add method to create a test polygon geometry