Patch from funky_c to move all alert()s in the library to a single

OpenLayers.Console.userError function. This allows for easy overriding of this
function for people who need to report errors at an application level (or
hiding these errors entirely), with the same default behavior as previous
releases. Patch from funky_c, r=me, (Closes #1651)


git-svn-id: http://svn.openlayers.org/trunk/openlayers@7675 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
crschmidt
2008-08-01 22:21:50 +00:00
parent ba561a9fb5
commit 64fc4fcb1b
10 changed files with 30 additions and 15 deletions

View File

@@ -497,7 +497,7 @@ OpenLayers.Control.OverviewMap = OpenLayers.Class(OpenLayers.Control, {
// as the base layer for the main map. This should be made more robust.
if(this.map.getUnits() != 'degrees') {
if(this.ovmap.getProjection() && (this.map.getProjection() != this.ovmap.getProjection())) {
alert(OpenLayers.i18n("sameProjection"));
OpenLayers.Console.userError(OpenLayers.i18n("sameProjection"));
}
}
var pxBounds = this.getRectBoundsFromMapBounds(this.map.getExtent());