diff --git a/examples/custom-control.html b/examples/custom-control.html index ae684f05a6..b6f1d58ccc 100644 --- a/examples/custom-control.html +++ b/examples/custom-control.html @@ -33,7 +33,13 @@ }, notice: function (bounds) { - alert(bounds); + console.log(bounds); + var ll = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.left, bounds.bottom)); + var ur = map.getLonLatFromPixel(new OpenLayers.Pixel(bounds.right, bounds.top)); + alert(ll.lon.toFixed(4) + ", " + + ll.lat.toFixed(4) + ", " + + ur.lon.toFixed(4) + ", " + + ur.lat.toFixed(4)); } });