[fusion-commits] r2439 - in trunk: layers/MapGuide lib/OpenLayers
lib/Proj4js templates/mapguide/standard
svn_fusion at osgeo.org
svn_fusion at osgeo.org
Fri Oct 21 15:35:22 EDT 2011
Author: madair
Date: 2011-10-21 12:35:22 -0700 (Fri, 21 Oct 2011)
New Revision: 2439
Modified:
trunk/layers/MapGuide/MapGuide.js
trunk/lib/OpenLayers/OpenLayers.js
trunk/lib/Proj4js/proj4js-combined.js
trunk/templates/mapguide/standard/ApplicationDefinition.xml
trunk/templates/mapguide/standard/index.html
Log:
re #468: changes to support tiled MGOS overlays on commercial layers
Modified: trunk/layers/MapGuide/MapGuide.js
===================================================================
--- trunk/layers/MapGuide/MapGuide.js 2011-10-12 02:14:38 UTC (rev 2438)
+++ trunk/layers/MapGuide/MapGuide.js 2011-10-21 19:35:22 UTC (rev 2439)
@@ -204,7 +204,7 @@
this.mapWidget._addWorker();
this._fScale = -1;
- this._nDpi = 96;
+ //this._nDpi = 96;
options = options || {};
Modified: trunk/lib/OpenLayers/OpenLayers.js
===================================================================
--- trunk/lib/OpenLayers/OpenLayers.js 2011-10-12 02:14:38 UTC (rev 2438)
+++ trunk/lib/OpenLayers/OpenLayers.js 2011-10-21 19:35:22 UTC (rev 2439)
@@ -1,127 +1,127 @@
-/*
-
- OpenLayers.js -- OpenLayers Map Viewer Library
-
- Copyright 2005-2011 OpenLayers Contributors, released under the FreeBSD
- license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt
- for the full text of the license.
-
- Includes compressed code under the following licenses:
-
- (For uncompressed versions of the code used please see the
- OpenLayers SVN repository: <http://openlayers.org/>)
-
-*/
-
-/* Contains portions of Prototype.js:
- *
- * Prototype JavaScript framework, version 1.4.0
- * (c) 2005 Sam Stephenson <sam at conio.net>
- *
- * Prototype is freely distributable under the terms of an MIT-style license.
- * For details, see the Prototype web site: http://prototype.conio.net/
- *
- *--------------------------------------------------------------------------*/
-
-/**
-*
-* Contains portions of Rico <http://openrico.org/>
-*
-* Copyright 2005 Sabre Airline Solutions
-*
-* Licensed under the Apache License, Version 2.0 (the "License"); you
-* may not use this file except in compliance with the License. You
-* may obtain a copy of the License at
-*
-* http://www.apache.org/licenses/LICENSE-2.0
-*
-* Unless required by applicable law or agreed to in writing, software
-* distributed under the License is distributed on an "AS IS" BASIS,
-* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
-* implied. See the License for the specific language governing
-* permissions and limitations under the License.
-*
-**/
-
-/**
- * Contains XMLHttpRequest.js <http://code.google.com/p/xmlhttprequest/>
- * Copyright 2007 Sergey Ilinsky (http://www.ilinsky.com)
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- * http://www.apache.org/licenses/LICENSE-2.0
- */
-
-/**
- * Contains portions of Gears <http://code.google.com/apis/gears/>
- *
- * Copyright 2007, Google Inc.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions are met:
- *
- * 1. Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- * 3. Neither the name of Google Inc. nor the names of its contributors may be
- * used to endorse or promote products derived from this software without
- * specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
- * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
- * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
- * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
- * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
- * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
- * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
- * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- *
- * Sets up google.gears.*, which is *the only* supported way to access Gears.
- *
- * Circumvent this file at your own risk!
- *
- * In the future, Gears may automatically define google.gears.* without this
- * file. Gears may use these objects to transparently fix bugs and compatibility
- * issues. Applications that use the code below will continue to work seamlessly
- * when that happens.
- */
-
-/**
- * OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is
- * Copyright (c) 2006, Yahoo! Inc.
- * All rights reserved.
- *
- * Redistribution and use of this software in source and binary forms, with or
- * without modification, are permitted provided that the following conditions
- * are met:
- *
- * * Redistributions of source code must retain the above copyright notice,
- * this list of conditions and the following disclaimer.
- *
- * * Redistributions in binary form must reproduce the above copyright notice,
- * this list of conditions and the following disclaimer in the documentation
- * and/or other materials provided with the distribution.
- *
- * * Neither the name of Yahoo! Inc. nor the names of its contributors may be
- * used to endorse or promote products derived from this software without
- * specific prior written permission of Yahoo! Inc.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
- * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
- * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
- * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
- * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
- * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
- * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
- * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
- * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
- * POSSIBILITY OF SUCH DAMAGE.
+/*
+
+ OpenLayers.js -- OpenLayers Map Viewer Library
+
+ Copyright 2005-2011 OpenLayers Contributors, released under the FreeBSD
+ license. Please see http://svn.openlayers.org/trunk/openlayers/license.txt
+ for the full text of the license.
+
+ Includes compressed code under the following licenses:
+
+ (For uncompressed versions of the code used please see the
+ OpenLayers SVN repository: <http://openlayers.org/>)
+
+*/
+
+/* Contains portions of Prototype.js:
+ *
+ * Prototype JavaScript framework, version 1.4.0
+ * (c) 2005 Sam Stephenson <sam at conio.net>
+ *
+ * Prototype is freely distributable under the terms of an MIT-style license.
+ * For details, see the Prototype web site: http://prototype.conio.net/
+ *
+ *--------------------------------------------------------------------------*/
+
+/**
+*
+* Contains portions of Rico <http://openrico.org/>
+*
+* Copyright 2005 Sabre Airline Solutions
+*
+* Licensed under the Apache License, Version 2.0 (the "License"); you
+* may not use this file except in compliance with the License. You
+* may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an "AS IS" BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
+* implied. See the License for the specific language governing
+* permissions and limitations under the License.
+*
+**/
+
+/**
+ * Contains XMLHttpRequest.js <http://code.google.com/p/xmlhttprequest/>
+ * Copyright 2007 Sergey Ilinsky (http://www.ilinsky.com)
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ * http://www.apache.org/licenses/LICENSE-2.0
+ */
+
+/**
+ * Contains portions of Gears <http://code.google.com/apis/gears/>
+ *
+ * Copyright 2007, Google Inc.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are met:
+ *
+ * 1. Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ * 3. Neither the name of Google Inc. nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED
+ * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
+ * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
+ * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Sets up google.gears.*, which is *the only* supported way to access Gears.
+ *
+ * Circumvent this file at your own risk!
+ *
+ * In the future, Gears may automatically define google.gears.* without this
+ * file. Gears may use these objects to transparently fix bugs and compatibility
+ * issues. Applications that use the code below will continue to work seamlessly
+ * when that happens.
+ */
+
+/**
+ * OpenLayers.Util.pagePosition is based on Yahoo's getXY method, which is
+ * Copyright (c) 2006, Yahoo! Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use of this software in source and binary forms, with or
+ * without modification, are permitted provided that the following conditions
+ * are met:
+ *
+ * * Redistributions of source code must retain the above copyright notice,
+ * this list of conditions and the following disclaimer.
+ *
+ * * Redistributions in binary form must reproduce the above copyright notice,
+ * this list of conditions and the following disclaimer in the documentation
+ * and/or other materials provided with the distribution.
+ *
+ * * Neither the name of Yahoo! Inc. nor the names of its contributors may be
+ * used to endorse or promote products derived from this software without
+ * specific prior written permission of Yahoo! Inc.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+ * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
+ * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+ * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
+ * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
+ * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
+ * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
+ * POSSIBILITY OF SUCH DAMAGE.
*//* ======================================================================
OpenLayers/SingleFile.js
====================================================================== */
@@ -41017,7 +41017,7 @@
* sz - {<OpenLayers.Size>}
*
* Returns:
- * {DOMElement} A new DOM Image with this marker´s icon set at the
+ * {DOMElement} A new DOM Image with this marker�s icon set at the
* location passed-in
*/
draw: function(px, sz) {
@@ -41094,6 +41094,20 @@
**/
useHttpTile: false,
+ /**
+ * APIProperty: zoomOffset
+ * {Number} If your cache has more zoom levels than you want to provide
+ * access to with this layer, supply a zoomOffset. This zoom offset
+ * is added to the current map zoom level to determine the level
+ * for a requested tile. For example, if you supply a zoomOffset
+ * of 3, when the map is at the zoom 0, tiles will be requested from
+ * level 3 of your cache. Default is 0 (assumes cache level and map
+ * zoom are equivalent). Using <zoomOffset> is an alternative to
+ * setting <serverResolutions> if you only want to expose a subset
+ * of the server resolutions.
+ */
+ zoomOffset: 0,
+
/**
* APIProperty: singleTile
* {Boolean} use tile server or request single tile image.
@@ -41388,7 +41402,7 @@
{
tilecol: colidx,
tilerow: rowidx,
- scaleindex: this.resolutions.length - this.map.zoom - 1
+ scaleindex: this.resolutions.length - this.map.zoom - 1 + this.zoomOffset
});
} else {
@@ -41396,7 +41410,7 @@
{
tilecol: colidx,
tilerow: rowidx,
- scaleindex: this.resolutions.length - this.map.zoom - 1
+ scaleindex: this.resolutions.length - this.map.zoom - 1 + this.zoomOffset
}, altUrl);
}
}
Modified: trunk/lib/Proj4js/proj4js-combined.js
===================================================================
--- trunk/lib/Proj4js/proj4js-combined.js 2011-10-12 02:14:38 UTC (rev 2438)
+++ trunk/lib/Proj4js/proj4js-combined.js 2011-10-21 19:35:22 UTC (rev 2439)
@@ -1,14 +1,14 @@
-/*
- proj4js.js -- Javascript reprojection library.
-
- Authors: Mike Adair madairATdmsolutions.ca
- Richard Greenwood richATgreenwoodmap.com
- Didier Richard didier.richardATign.fr
- Stephen Irons
- License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
- Note: This program is an almost direct port of the C library
- Proj4.
-*/
+/*
+ proj4js.js -- Javascript reprojection library.
+
+ Authors: Mike Adair madairATdmsolutions.ca
+ Richard Greenwood richATgreenwoodmap.com
+ Didier Richard didier.richardATign.fr
+ Stephen Irons
+ License: LGPL as per: http://www.gnu.org/copyleft/lesser.html
+ Note: This program is an almost direct port of the C library
+ Proj4.
+*/
/* ======================================================================
proj4js.js
====================================================================== */
@@ -884,9 +884,9 @@
}
if (!this.axis) { this.axis= "enu"; }
switch(name) {
- case 'X': this.axis= value + this.axis.substr(1,2); break;
- case 'Y': this.axis= this.axis.substr(0,1) + value + this.axis.substr(2,1); break;
- case 'Z': this.axis= this.axis.substr(0,2) + value ; break;
+ case 'x': this.axis= value + this.axis.substr(1,2); break;
+ case 'y': this.axis= this.axis.substr(0,1) + value + this.axis.substr(2,1); break;
+ case 'z': this.axis= this.axis.substr(0,2) + value ; break;
default : break;
}
case 'MORE_HERE':
@@ -991,7 +991,7 @@
Proj4js.extend(this, ellipse);
}
if (this.rf && !this.b) this.b = (1.0 - 1.0/this.rf) * this.a;
- if (Math.abs(this.a - this.b)<Proj4js.common.EPSLN) {
+ if (this.rf === 0 || Math.abs(this.a - this.b)<Proj4js.common.EPSLN) {
this.sphere = true;
this.b= this.a;
}
@@ -1049,11 +1049,12 @@
'WGS84': "+title=long/lat:WGS84 +proj=longlat +ellps=WGS84 +datum=WGS84 +units=degrees",
'EPSG:4326': "+title=long/lat:WGS84 +proj=longlat +a=6378137.0 +b=6356752.31424518 +ellps=WGS84 +datum=WGS84 +units=degrees",
'EPSG:4269': "+title=long/lat:NAD83 +proj=longlat +a=6378137.0 +b=6356752.31414036 +ellps=GRS80 +datum=NAD83 +units=degrees",
- 'EPSG:3785': "+title= Google Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"
+ 'EPSG:3875': "+title= Google Mercator +proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs"
};
-Proj4js.defs['GOOGLE'] = Proj4js.defs['EPSG:3785'];
-Proj4js.defs['EPSG:900913'] = Proj4js.defs['EPSG:3785'];
-Proj4js.defs['EPSG:102113'] = Proj4js.defs['EPSG:3785'];
+Proj4js.defs['EPSG:3785'] = Proj4js.defs['EPSG:3875']; //maintain backward compat, official code is 3875
+Proj4js.defs['GOOGLE'] = Proj4js.defs['EPSG:3875'];
+Proj4js.defs['EPSG:900913'] = Proj4js.defs['EPSG:3875'];
+Proj4js.defs['EPSG:102113'] = Proj4js.defs['EPSG:3875'];
Proj4js.common = {
PI : 3.141592653589793238, //Math.PI,
@@ -1794,6 +1795,7 @@
"Lambert Tangential Conformal Conic Projection": "lcc",
"Mercator": "merc",
"Popular Visualisation Pseudo Mercator": "merc",
+ "Mercator_1SP": "merc",
"Transverse_Mercator": "tmerc",
"Transverse Mercator": "tmerc",
"Lambert Azimuthal Equal Area": "laea",
Modified: trunk/templates/mapguide/standard/ApplicationDefinition.xml
===================================================================
--- trunk/templates/mapguide/standard/ApplicationDefinition.xml 2011-10-12 02:14:38 UTC (rev 2438)
+++ trunk/templates/mapguide/standard/ApplicationDefinition.xml 2011-10-21 19:35:22 UTC (rev 2439)
@@ -9,6 +9,47 @@
****************************************** -->
<MapSet>
+ <MapGroup id="ticket468-test">
+ <Map id="mg1">
+ <Type>MapGuide</Type>
+ <SingleTile>false</SingleTile>
+ <Extension>
+ <ResourceId>Library://Samples/Sheboygan/MapsTiled/SheboyganMerc.MapDefinition</ResourceId>
+ </Extension>
+ </Map>
+ </MapGroup>
+ <MapGroup id="ticket468">
+ <InitialView>
+ <MinX>-9774168</MinX>
+ <MinY>5415995</MinY>
+ <MaxX>-9754637</MaxX>
+ <MaxY>5434757</MaxY>
+ </InitialView>
+ <Map>
+ <Type>Google</Type>
+ <Extension>
+ <ResourceId>google</ResourceId>
+ <Options>
+ <name>GoogleLayer</name>
+ <type>G_PHYSICAL_MAP</type>
+ <isBaseLayer>true</isBaseLayer>
+ <sphericalMercator>true</sphericalMercator>
+ </Options>
+ </Extension>
+ </Map>
+ <Map id="mg1">
+ <Type>MapGuide</Type>
+ <SingleTile>false</SingleTile>
+ <Extension>
+ <ResourceId>Library://Samples/Sheboygan/MapsTiled/SheboyganSphericalMerc.MapDefinition</ResourceId>
+ <Options>
+ <isBaseLayer>false</isBaseLayer>
+ <useOverlay>true</useOverlay>
+ <zoomOffset>9</zoomOffset>
+ </Options>
+ </Extension>
+ </Map>
+ </MapGroup>
<MapGroup id="sheboygan">
<Map>
<Type>MapGuide</Type>
@@ -56,6 +97,9 @@
<SingleTile>false</SingleTile>
<Extension>
<ResourceId>Library://Samples/Sheboygan/MapsTiled/Sheboygan.MapDefinition</ResourceId>
+ <Options>
+ <useHttpTile>true</useHttpTile>
+ </Options>
</Extension>
</Map>
</MapGroup>
@@ -467,7 +511,7 @@
<MenuContainer>MapContextMenu</MenuContainer>
<!--Scales>100000,50000,25000,12500,8000,4000</Scales-->
</Extension>
- <MapId>sheboygan</MapId>
+ <MapId>ticket468</MapId>
</MapWidget>
<!-- ******************************************
@@ -1188,7 +1232,7 @@
<Disabled/>
</Widget>
-<!-- OVERVIEW MAP -->
+<!-- OVERVIEW MAP
<Widget>
@@ -1199,6 +1243,7 @@
<MapId>sheboygan</MapId>
</Extension>
</Widget>
+ -->
<!-- PRINT -->
Modified: trunk/templates/mapguide/standard/index.html
===================================================================
--- trunk/templates/mapguide/standard/index.html 2011-10-12 02:14:38 UTC (rev 2438)
+++ trunk/templates/mapguide/standard/index.html 2011-10-21 19:35:22 UTC (rev 2439)
@@ -4,7 +4,7 @@
<head>
<title>Sample Fusion Application</title>
<!-- uncomment for Google layers -->
-<!-- script type="text/javascript" src='http://maps.google.com/maps/api/js?sensor=false'></script-->
+<script type="text/javascript" src='http://maps.google.com/maps/api/js?sensor=false'></script>
<!-- uncomment for Bing layers -->
<!-- script src='http://dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.1'></script-->
<!-- change the source of the following tag to point to your fusion installation -->
More information about the fusion-commits
mailing list