package ol;

import ol.View;
import ol.MapOptions;
import ol.ViewOptions;
import ol.proj.Projection;
import ol.OLFactory;
import ol.proj.ProjectionOptions;

/**
 * 
 * @author Tino Desjardins
 *
 */
public class MapTest extends GwtOL3BaseTestCase {

    public void testMapCreation() {
        
        injectUrlAndTest(new TestWithInjection() {
            
            @Override
            public void test() {
                
                ProjectionOptions projectionOptions = OLFactory.createOptions();
                projectionOptions.setCode("EPSG:21781");
                projectionOptions.setUnits("m");
                
                Projection projection = OLFactory.createProjection(projectionOptions);
                
                ViewOptions viewOptions = OLFactory.createOptions();
                viewOptions.setProjection(projection);
                View view = OLFactory.createView(viewOptions);

                Coordinate centerCoordinate = OLFactory.createCoordinate(660000, 190000);
                
                view.setCenter(centerCoordinate);
                view.setZoom(9);
                
                final MapOptions mapOptions = OLFactory.createOptions();
                mapOptions.setTarget("map");
                mapOptions.setView(view);
                
                /*Map map = Map.newInstance(mapOptions);
                assertNotNull(map);*/
                
            }
            
        });

    }

}

@@ -156,18 +156,17 @@
 %0A%0A/**%0A *
- 
 %0A
+
  * @auth
@@ -278,25 +278,17 @@
 ion() %7B%0A
-        
 %0A
+
         
@@ -330,29 +330,17 @@
 ion() %7B%0A
-            
 %0A
+
         
@@ -386,33 +386,17 @@
 est() %7B%0A
-                
 %0A
+
         
@@ -574,32 +574,16 @@
 s(%22m%22);%0A
-                
 %0A       
@@ -615,32 +615,20 @@
 ction = 
-OLFactory.create
+new 
 Projecti
@@ -650,32 +650,16 @@
 tions);%0A
-                
 %0A       
@@ -803,32 +803,20 @@
  view = 
-OLFactory.create
+new 
 View(vie
@@ -917,33 +917,17 @@
 90000);%0A
-                
 %0A
+
         
@@ -1001,33 +1001,17 @@
 oom(9);%0A
-                
 %0A
+
         
@@ -1162,32 +1162,16 @@
 (view);%0A
-                
 %0A       
@@ -1179,18 +1179,16 @@
         
-/*
 Map map 
@@ -1193,23 +1193,15 @@
 p = 
-Map.newInstance
+new Map
 (map
@@ -1249,27 +1249,9 @@
 ap);
-*/%0A                
+%0A
 %0A   
@@ -1261,28 +1261,16 @@
       %7D%0A
-            
 %0A       

Refactor test for map