Allow testing for projection equality with string.

This commit is contained in:
tschaub
2011-10-26 16:22:51 -06:00
parent fb790424a5
commit 98d6e74314
2 changed files with 10 additions and 1 deletions
+3
View File
@@ -101,6 +101,9 @@ OpenLayers.Projection = OpenLayers.Class({
equals: function(projection) {
var p = projection, equals = false;
if (p) {
if (!(projection instanceof OpenLayers.Projection)) {
projection = new OpenLayers.Projection(projection);
}
if (window.Proj4js && this.proj.defData && p.proj.defData) {
equals = this.proj.defData.replace(this.titleRegEx, "") ==
p.proj.defData.replace(this.titleRegEx, "");