@@ -40,23 +40,23 @@ public JavaScriptObject call(JavaScriptObject event) {
4040 });
4141 }
4242
43- // public void testMapRemove(){
44- // InjectedLeafletResources.whenReady(new Function(){
45- // public JavaScriptObject call(JavaScriptObject event) {
46- // HTMLElement div = Document.createElement("div");
47- // div.id = "test5";
48- // Document.getBody().appendChild(div);
49- // MapOptions options = new MapOptions.Builder(L.latLng(52.51, 13.40), 12, 7).maxZoom(20).build();
50- // Map map = L.map("test5", options);
51- //
52- // assertNotNull(map);
53- // map.remove();
54- //
55- //
56- // return null;
57- // }
58- // });
59- // }
43+ public void testMapRemove (){
44+ InjectedLeafletResources .whenReady (new Function (){
45+ public JavaScriptObject call (JavaScriptObject event ) {
46+ HTMLElement div = Document .createElement ("div" );
47+ div .id = "test5" ;
48+ Document .getBody ().appendChild (div );
49+ MapOptions options = new MapOptions .Builder (L .latLng (52.51 , 13.40 ), 12.0 , 7.0 ).maxZoom (20.0 ).build ();
50+ Map map = L .map ("test5" , options );
51+
52+ assertNotNull (map );
53+ map .remove ();
54+
55+
56+ return null ;
57+ }
58+ });
59+ }
6060
6161
6262 public void testMapView (){
@@ -67,7 +67,7 @@ public JavaScriptObject call(JavaScriptObject event) {
6767 Document .getBody ().appendChild (div );
6868
6969 Map map = L .map ("test2" , null );
70- map .setView (L .latLng (52.51 , 13.40 ), 12 , null );
70+ map .setView (L .latLng (52.51 , 13.40 ), 12.0 , null );
7171 assertNotNull (map );
7272 assertEquals (map .getCenter ().lat , 52.51 );
7373 assertEquals (map .getCenter ().lng , 13.40 );
@@ -85,21 +85,19 @@ public JavaScriptObject call(JavaScriptObject event) {
8585 HTMLElement div = Document .createElement ("div" );
8686 div .id = "test3" ;
8787 Document .getBody ().appendChild (div );
88- MapOptions options = new MapOptions .Builder (L .latLng (52.51 , 13.40 ), 12 , 7 ).dragging (true ).maxZoom (20 ).build ();
88+ MapOptions options = new MapOptions .Builder (L .latLng (52.51 , 13.40 ), 12.0 , 7.0 ).dragging (true ).maxZoom (20.0 ).build ();
8989 Map map = L .map ("test3" , options );
90-
90+
9191 assertNotNull (map );
9292 assertEquals (String .valueOf (map .getZoom ()), "12" );
9393 assertEquals (String .valueOf (map .getMinZoom ()), "7" );
9494 assertEquals (String .valueOf (map .getMaxZoom ()), "20" );
9595
96- //Zoom In/Zoom Out has weird behavior *** Fails
96+ //Zoom In method has weird behavior *** Fails
97+
9798
98- // map.zoomIn(3, null);
99- // assertEquals(String.valueOf(map.getZoom()), "15");
100- //
101- // map.zoomOut(5, null);
102- // assertEquals(String.valueOf(map.getMaxZoom()), "10");
99+ map .zoomOut (5.0 , null );
100+ assertEquals ("7" , map .getZoom ().toString ());
103101
104102 return null ;
105103 }
@@ -112,7 +110,7 @@ public JavaScriptObject call(JavaScriptObject event) {
112110 HTMLElement div = Document .createElement ("div" );
113111 div .id = "test4" ;
114112 Document .getBody ().appendChild (div );
115- MapOptions options = new MapOptions .Builder (L .latLng (52.51 , 13.40 ), 12 , 7 ).maxZoom (20 ).build ();
113+ MapOptions options = new MapOptions .Builder (L .latLng (52.51 , 13.40 ), 12.0 , 7.0 ).maxZoom (20.0 ).build ();
116114 Map map = L .map ("test4" , options );
117115
118116 assertNotNull (map );
0 commit comments