| | 40 | function test_02_Control_MousePosition_redraw_noLayer_displayProjection(t) { |
|---|
| | 41 | t.plan(3); |
|---|
| | 42 | control = new OpenLayers.Control.MousePosition(); |
|---|
| | 43 | map = new OpenLayers.Map('map'); |
|---|
| | 44 | map.addControl(control); |
|---|
| | 45 | t.eq(control.div.innerHTML, "0.00000, 0.00000", "innerHTML set correctly"); |
|---|
| | 46 | control.redraw({'xy': new OpenLayers.Pixel(10,10)}); |
|---|
| | 47 | control.redraw({'xy': new OpenLayers.Pixel(12,12)}); |
|---|
| | 48 | t.eq(control.div.innerHTML, "0.00000, 0.00000", "innerHTML set correctly"); |
|---|
| | 49 | l = new OpenLayers.Layer('name', {'isBaseLayer': true}); |
|---|
| | 50 | map.addLayer(l); |
|---|
| | 51 | map.zoomToMaxExtent(); |
|---|
| | 52 | control.redraw({'xy': new OpenLayers.Pixel(10,10)}); |
|---|
| | 53 | control.redraw({'xy': new OpenLayers.Pixel(12,12)}); |
|---|
| | 54 | t.eq(control.div.innerHTML, "-175.78125, 85.78125", "innerHTML set correctly when triggered."); |
|---|
| | 55 | } |
|---|
| | 56 | |
|---|