[fusion-commits] r2077 - in sandbox/adsk/2.2gp: layers/Generic lib
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Thu Feb 18 14:49:44 EST 2010
Author: madair
Date: 2010-02-18 14:49:44 -0500 (Thu, 18 Feb 2010)
New Revision: 2077
Modified:
sandbox/adsk/2.2gp/layers/Generic/Generic.js
sandbox/adsk/2.2gp/lib/ApplicationDefinition.js
Log:
re #315: set projection and units corrrectly for Generic layers
Modified: sandbox/adsk/2.2gp/layers/Generic/Generic.js
===================================================================
--- sandbox/adsk/2.2gp/layers/Generic/Generic.js 2010-02-18 19:48:54 UTC (rev 2076)
+++ sandbox/adsk/2.2gp/layers/Generic/Generic.js 2010-02-18 19:49:44 UTC (rev 2077)
@@ -166,12 +166,22 @@
}
if (!this.oLayerOL) {
- if (!this.mapTag.layerOptions.maxExtent) {
- this.mapTag.layerOptions.maxExtent = new OpenLayers.Bounds(-20037508.3427892, -20037508.3427892, 20037508.3427892, 20037508.3427892);
- }
if (typeof this.mapTag.layerOptions.sphericalMercator == 'undefined') {
this.mapTag.layerOptions.sphericalMercator = true;
}
+ if (this.mapTag.layerOptions.sphericalMercator) {
+ if (!this.mapTag.layerOptions.maxExtent) {
+ this.mapTag.layerOptions.maxExtent = new OpenLayers.Bounds(-20037508.3427892, -20037508.3427892, 20037508.3427892, 20037508.3427892);
+ }
+ this.mapTag.layerOptions.units = "m";
+ this.mapTag.layerOptions.projection = "EPSG:900913";
+ } else {
+ if (!this.mapTag.layerOptions.maxExtent) {
+ this.mapTag.layerOptions.maxExtent = new OpenLayers.Bounds(-180,-90,180,90);
+ }
+ this.mapTag.layerOptions.units = "dd";
+ this.mapTag.layerOptions.projection = "EPSG:4326";
+ }
if (typeof this.mapTag.layerOptions.numZoomLevels == 'undefined') {
this.mapTag.layerOptions.numZoomLevels = 20;
}
@@ -180,6 +190,7 @@
this.mapWidget.oMapOL.setOptions({fractionalZoom: false});
}
+
this.oLayerOL.events.register("loadstart", this, this.loadStart);
this.oLayerOL.events.register("loadend", this, this.loadEnd);
this.oLayerOL.events.register("loadcancel", this, this.loadEnd);
Modified: sandbox/adsk/2.2gp/lib/ApplicationDefinition.js
===================================================================
--- sandbox/adsk/2.2gp/lib/ApplicationDefinition.js 2010-02-18 19:48:54 UTC (rev 2076)
+++ sandbox/adsk/2.2gp/lib/ApplicationDefinition.js 2010-02-18 19:49:44 UTC (rev 2077)
@@ -526,6 +526,7 @@
}
//projection info from the extension
+ this.projCode = "EPSG:4326"; //default to WGS84 lat long
if (this.extension.ProjectionCode) {
this.projCode = this.extension.ProjectionCode[0];
}
More information about the fusion-commits
mailing list