OpenLayers OpenLayers

Changeset 4091

Show
Ignore:
Timestamp:
08/28/07 21:08:18 (1 year ago)
Author:
crschmidt
Message:

svn merge -r3961:HEAD http://svn.openlayers.org/trunk/openlayers/ .

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/tschaub/feature/apidoc_config/Menu.txt

    r3776 r4091  
    5555      File: ZoomToMaxExtent  (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js) 
    5656      File: OverviewMap  (no auto-title, OpenLayers/Control/OverviewMap.js) 
     57      File: DragFeature  (no auto-title, OpenLayers/Control/DragFeature.js) 
    5758      File: DragPan  (no auto-title, OpenLayers/Control/DragPan.js) 
    5859      File: DrawFeature  (no auto-title, OpenLayers/Control/DrawFeature.js) 
     
    8687 
    8788      File: Format  (no auto-title, OpenLayers/Format.js) 
     89      File: GeoJSON  (OpenLayers/Format/GeoJSON.js) 
    8890      File: GeoRSS  (OpenLayers/Format/GeoRSS.js) 
    8991      File: GML  (OpenLayers/Format/GML.js) 
     92      File: JSON  (OpenLayers/Format/JSON.js) 
    9093      File: KML  (OpenLayers/Format/KML.js) 
    9194      File: WFS  (OpenLayers/Format/WFS.js) 
    9295      File: WKT  (no auto-title, OpenLayers/Format/WKT.js) 
     96      File: XML  (OpenLayers/Format/XML.js) 
    9397      }  # Group: Format 
    9498 
     
    132136      File: GeoRSS  (no auto-title, OpenLayers/Layer/GeoRSS.js) 
    133137      File: GML  (no auto-title, OpenLayers/Layer/GML.js) 
    134       File: Gooogle  (OpenLayers/Layer/Google.js) 
     138      File: Gooogle  (no auto-title, OpenLayers/Layer/Google.js) 
    135139      File: Grid  (OpenLayers/Layer/Grid.js) 
    136140      File: HTTPRequest  (OpenLayers/Layer/HTTPRequest.js) 
  • sandbox/tschaub/feature/build/license.txt

    r1721 r4091  
    33  OpenLayers.js -- OpenLayers Map Viewer Library 
    44 
    5   Copyright 2005-2006 MetaCarta, Inc., released under a modified BSD license. 
     5  Copyright 2005-2007 MetaCarta, Inc., released under a modified BSD license. 
    66  Please see http://svn.openlayers.org/trunk/openlayers/repository-license.txt 
    77  for the full text of the license. 
  • sandbox/tschaub/feature/doc_config/Menu.txt

    r3776 r4091  
    5555      File: ZoomToMaxExtent  (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js) 
    5656      File: OverviewMap  (no auto-title, OpenLayers/Control/OverviewMap.js) 
     57      File: DragFeature  (no auto-title, OpenLayers/Control/DragFeature.js) 
    5758      File: DragPan  (no auto-title, OpenLayers/Control/DragPan.js) 
    5859      File: DrawFeature  (no auto-title, OpenLayers/Control/DrawFeature.js) 
     
    8687 
    8788      File: Format  (no auto-title, OpenLayers/Format.js) 
     89      File: GeoJSON  (OpenLayers/Format/GeoJSON.js) 
    8890      File: GeoRSS  (OpenLayers/Format/GeoRSS.js) 
    8991      File: GML  (OpenLayers/Format/GML.js) 
     92      File: JSON  (OpenLayers/Format/JSON.js) 
    9093      File: KML  (OpenLayers/Format/KML.js) 
    9194      File: WFS  (OpenLayers/Format/WFS.js) 
    9295      File: WKT  (no auto-title, OpenLayers/Format/WKT.js) 
     96      File: XML  (OpenLayers/Format/XML.js) 
    9397      }  # Group: Format 
    9498 
     
    132136      File: GeoRSS  (no auto-title, OpenLayers/Layer/GeoRSS.js) 
    133137      File: GML  (no auto-title, OpenLayers/Layer/GML.js) 
    134       File: Gooogle  (OpenLayers/Layer/Google.js) 
     138      File: Google  (OpenLayers/Layer/Google.js) 
    135139      File: Grid  (OpenLayers/Layer/Grid.js) 
    136140      File: HTTPRequest  (OpenLayers/Layer/HTTPRequest.js) 
  • sandbox/tschaub/feature/examples/mapserver_untiled.html

    r2979 r4091  
    99    </style> 
    1010    <script src="../lib/OpenLayers.js"></script> 
    11     <script src="../lib/OpenLayers/Layer/MapServer/Untiled.js"></script> 
    1211    <script type="text/javascript"> 
    1312        window.onload = function(){ 
    1413            var map = new OpenLayers.Map( 'map', {maxResolution: 'auto'} ); 
    15             var layer = new OpenLayers.Layer.MapServer.Untiled( "MapServer Untiled",  
    16                     "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'} ); 
     14            var layer = new OpenLayers.Layer.MapServer( "MapServer Untiled",  
     15                    "http://labs.metacarta.com/wms/vmap0", {layers: 'basic'}, {singleTile: true} ); 
    1716            map.addLayer(layer); 
    1817            map.setCenter(new OpenLayers.LonLat(0, 0), 1); 
  • sandbox/tschaub/feature/lib/OpenLayers.js

    r4057 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
     
    173173            "OpenLayers/Format/WFS.js", 
    174174            "OpenLayers/Format/WKT.js", 
     175            "OpenLayers/Format/JSON.js", 
     176            "OpenLayers/Format/GeoJSON.js", 
    175177            "OpenLayers/Layer/WFS.js", 
    176178            "OpenLayers/Control/MouseToolbar.js", 
  • sandbox/tschaub/feature/lib/OpenLayers/Ajax.js

    r3876 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/BaseTypes.js

    r3876 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
     
    126126 */ 
    127127Number.prototype.limitSigDigs = function(sig) { 
    128     var number = (sig > 0) ? this.toString() : 0; 
    129     if (sig < number.length) { 
    130         var exp = number.length - sig; 
    131         number = Math.round( this / Math.pow(10, exp)) * Math.pow(10, exp); 
     128    var numStr = (sig > 0) ? this.toString() : "0"; 
     129    if (numStr.contains(".")) { 
     130        var msg = "limitSigDig can not be called on a floating point number"; 
     131        OpenLayers.Console.error(msg); 
     132        return null; 
    132133    } 
    133     return parseInt(number); 
     134    if ( (sig > 0) && (sig < numStr.length) ) { 
     135        var exp = numStr.length - sig; 
     136        numStr = Math.round( this / Math.pow(10, exp)) * Math.pow(10, exp); 
     137    } 
     138    return parseInt(numStr); 
    134139} 
    135140 
     
    163168     
    164169    return function(moreargs) { 
    165         for (var i = 0; i < arguments.length; i++) { 
    166             args.push(arguments[i]); 
     170        var i; 
     171        var newArgs = []; 
     172        for (i = 0; i < args.length; i++) { 
     173            newArgs.push(args[i]); 
    167174        } 
    168         return __method.apply(object, args); 
     175        for (i = 0; i < arguments.length; i++) { 
     176            newArgs.push(arguments[i]); 
     177        } 
     178        return __method.apply(object, newArgs); 
    169179    }; 
    170180}; 
  • sandbox/tschaub/feature/lib/OpenLayers/BaseTypes/Bounds.js

    r3876 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
     
    66 * Class: OpenLayers.Bounds 
    77 * Instances of this class represent bounding boxes.  Data stored as left, 
    8  * bottom, right, top floats 
     8 * bottom, right, top floats. All values are initialized to null, however, 
     9 * you should make sure you set them before using the bounds for anything. 
     10 * Possible use case: 
     11 * 
     12 * > bounds = new OpenLayers.Bounds(); 
     13 * > bounds.extend(new OpenLayers.LonLat(4,5)); 
     14 * > bounds.extend(new OpenLayers.LonLat(5,6)); 
     15 * > bounds.toBBOX() // returns 4,5,5,6 
    916 */ 
    1017OpenLayers.Bounds = OpenLayers.Class({ 
     
    1421     * {Number} 
    1522     */ 
    16     left: 0.0
     23    left: null
    1724 
    1825    /** 
     
    2027     * {Number} 
    2128     */ 
    22     bottom: 0.0
     29    bottom: null
    2330 
    2431    /** 
     
    2633     * {Number} 
    2734     */ 
    28     right: 0.0
     35    right: null
    2936 
    3037    /** 
     
    3239     * {Number} 
    3340     */ 
    34     top: 0.0,     
     41    top: null,     
    3542 
    3643    /** 
     
    4754     */ 
    4855    initialize: function(left, bottom, right, top) { 
    49         this.left = parseFloat(left); 
    50         this.bottom = parseFloat(bottom); 
    51         this.right = parseFloat(right); 
    52         this.top = parseFloat(top); 
     56        if (left != null) { 
     57            this.left = parseFloat(left); 
     58        } 
     59        if (bottom != null) { 
     60            this.bottom = parseFloat(bottom); 
     61        } 
     62        if (right != null) { 
     63            this.right = parseFloat(right); 
     64        } 
     65        if (top != null) { 
     66            this.top = parseFloat(top); 
     67        } 
    5368    }, 
    5469 
     
    99114                 + " right-top=(" + this.right + "," + this.top + ")" ); 
    100115    }, 
     116 
     117    /** 
     118     * APIMethod: toArray 
     119     * 
     120     * Return: 
     121     * {Array} array of left, bottom, right, top 
     122     */ 
     123    toArray: function() { 
     124        return [this.left, this.bottom, this.right, this.top]; 
     125    },     
    101126 
    102127    /**  
     
    228253     
    229254            if (bounds) { 
    230                this.left = (bounds.left < this.left) ? bounds.left  
    231                                                      : this.left; 
    232                this.bottom = (bounds.bottom < this.bottom) ? bounds.bottom  
    233                                                            : this.bottom; 
    234                this.right = (bounds.right > this.right) ? bounds.right  
    235                                                         : this.right; 
    236                this.top = (bounds.top > this.top) ? bounds.top  
    237                                                   : this.top; 
     255                if ( (this.left == null) || (bounds.left < this.left)) { 
     256                    this.left = bounds.left; 
     257                } 
     258                if ( (this.bottom == null) || (bounds.bottom < this.bottom) ) { 
     259                    this.bottom = bounds.bottom; 
     260                }  
     261                if ( (this.right == null) || (bounds.right > this.right) ) { 
     262                    this.right = bounds.right; 
     263                } 
     264                if ( (this.top == null) || (bounds.top > this.top) ) {  
     265                    this.top = bounds.top; 
     266                } 
    238267            } 
    239268        } 
  • sandbox/tschaub/feature/lib/OpenLayers/BaseTypes/Class.js

    r3876 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/BaseTypes/Element.js

    r3674 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/BaseTypes/LonLat.js

    r3794 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/BaseTypes/Pixel.js

    r3794 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/BaseTypes/Size.js

    r3794 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/Console.js

    r3794 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/Control.js

    r3794 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/Control/ArgParser.js

    r3876 r4091  
    1 /* Cpyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Cpyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
     
    6262        if (i == this.map.controls.length) { 
    6363 
    64             var args = OpenLayers.Util.getArgs(); 
     64            var args = OpenLayers.Util.getParameters(); 
    6565            if (args.lat && args.lon) { 
    6666                this.center = new OpenLayers.LonLat(parseFloat(args.lon), 
  • sandbox/tschaub/feature/lib/OpenLayers/Control/DragFeature.js

    r3948 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/Control/DragPan.js

    r3931 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/Control/DrawFeature.js

    r3794 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/Control/EditingToolbar.js

    r3876 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/Control/KeyboardDefaults.js

    r3794 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/Control/LayerSwitcher.js

    r3931 r4091  
    1 /* Copyright (c) 2006 MetaCarta, Inc., published under a modified BSD license. 
     1/* Copyright (c) 2006-2007 MetaCarta, Inc., published under a modified BSD license. 
    22 * See http://svn.openlayers.org/trunk/openlayers/repository-license.txt  
    33 * for the full text of the license. */ 
  • sandbox/tschaub/feature/lib/OpenLayers/Control/MouseDefaults.js