OpenLayers OpenLayers

Changeset 5534

Show
Ignore:
Timestamp:
12/20/07 03:54:25 (1 year ago)
Author:
pgiraud
Message:

merge from r5496 to trunk HEAD

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sandbox/GooglePopups/openlayers/apidoc_config/Languages.txt

    r3545 r5534  
    1 Format: 1.35 
     1Format: Development Release 12-07-2007 (1.35 base) 
    22 
    33# This is the Natural Docs languages file for this project.  If you change 
  • sandbox/GooglePopups/openlayers/apidoc_config/Menu.txt

    r5410 r5534  
    1 Format: 1.35 
     1Format: Development Release 12-07-2007 (1.35 base) 
    22 
    33 
     
    88# Footer: [text] 
    99# If you want to add a copyright notice, this would be the place to do it. 
     10 
     11# You can add a timestamp to your documentation like one of these: 
     12# Timestamp: Generated on month day, year 
     13# Timestamp: Updated mm/dd/yyyy 
     14# Timestamp: Last updated mon day 
     15# 
     16#   m     - One or two digit month.  January is "1" 
     17#   mm    - Always two digit month.  January is "01" 
     18#   mon   - Short month word.  January is "Jan" 
     19#   month - Long month word.  January is "January" 
     20#   d     - One or two digit day.  1 is "1" 
     21#   dd    - Always two digit day.  1 is "01" 
     22#   day   - Day with letter extension.  1 is "1st" 
     23#   yy    - Two digit year.  2006 is "06" 
     24#   yyyy  - Four digit year.  2006 is "2006" 
     25#   year  - Four digit year.  2006 is "2006" 
    1026 
    1127 
     
    5571      File: Attribution  (no auto-title, OpenLayers/Control/Attribution.js) 
    5672      File: DragFeature  (no auto-title, OpenLayers/Control/DragFeature.js) 
    57       File: DragPan  (no auto-title, OpenLayers/Control/DragPan.js) 
    5873      File: DrawFeature  (no auto-title, OpenLayers/Control/DrawFeature.js) 
    5974      File: EditingToolbar  (no auto-title, OpenLayers/Control/EditingToolbar.js) 
     
    7388      File: Scale  (no auto-title, OpenLayers/Control/Scale.js) 
    7489      File: SelectFeature  (no auto-title, OpenLayers/Control/SelectFeature.js) 
    75       File: ZoomBox  (no auto-title, OpenLayers/Control/ZoomBox.js) 
    76       File: ZoomToMaxExtent  (no auto-title, OpenLayers/Control/ZoomToMaxExtent.js) 
    7790      }  # Group: Control 
    7891 
     
    8194   Group: Feature  { 
    8295 
    83       File: Feature  (OpenLayers/Feature.js) 
     96      File: Feature  (no auto-title, OpenLayers/Feature.js) 
    8497      File: Vector  (no auto-title, OpenLayers/Feature/Vector.js) 
    8598      File: WFS  (no auto-title, OpenLayers/Feature/WFS.js) 
     
    88101   Group: Format  { 
    89102 
    90       File: Format  (OpenLayers/Format.js) 
     103      File: Format.js  (OpenLayers/Format.js) 
    91104      File: GeoJSON  (no auto-title, OpenLayers/Format/GeoJSON.js) 
    92105      File: GeoRSS  (no auto-title, OpenLayers/Format/GeoRSS.js) 
     
    94107      File: JSON  (no auto-title, OpenLayers/Format/JSON.js) 
    95108      File: KML  (no auto-title, OpenLayers/Format/KML.js) 
     109      File: Text  (no auto-title, OpenLayers/Format/Text.js) 
    96110      File: WFS  (no auto-title, OpenLayers/Format/WFS.js) 
    97111      File: WKT  (no auto-title, OpenLayers/Format/WKT.js) 
     
    101115   Group: Geometry  { 
    102116 
    103       File: Geometry  (OpenLayers/Geometry.js) 
     117      File: Geometry  (no auto-title, OpenLayers/Geometry.js) 
    104118      File: Collection  (no auto-title, OpenLayers/Geometry/Collection.js) 
    105119      File: Curve  (no auto-title, OpenLayers/Geometry/Curve.js) 
     
    117131   Group: Handler  { 
    118132 
    119       File: Handler  (OpenLayers/Handler.js) 
     133      File: Handler  (no auto-title, OpenLayers/Handler.js) 
    120134      File: Box  (no auto-title, OpenLayers/Handler/Box.js) 
     135      File: Click  (no auto-title, OpenLayers/Handler/Click.js) 
    121136      File: Drag  (no auto-title, OpenLayers/Handler/Drag.js) 
    122137      File: Feature  (no auto-title, OpenLayers/Handler/Feature.js) 
     
    133148   Group: Layer  { 
    134149 
    135       File: Layer  (OpenLayers/Layer.js) 
     150      File: Layer  (no auto-title, OpenLayers/Layer.js) 
    136151      File: Boxes  (no auto-title, OpenLayers/Layer/Boxes.js) 
    137152      File: EventPane  (no auto-title, OpenLayers/Layer/EventPane.js) 
     
    165180   Group: Marker  { 
    166181 
    167       File: Marker  (OpenLayers/Marker.js) 
     182      File: Marker  (no auto-title, OpenLayers/Marker.js) 
    168183      File: Box  (no auto-title, OpenLayers/Marker/Box.js) 
    169184      }  # Group: Marker 
    170185 
    171186   File: Projection  (no auto-title, OpenLayers/Projection.js) 
     187   File: Rule  (no auto-title, OpenLayers/Rule.js) 
     188   File: Style  (no auto-title, OpenLayers/Style.js) 
    172189 
    173190   Group: Popup  { 
     
    188205   Group: Tile  { 
    189206 
    190       File: Tile  (OpenLayers/Tile.js) 
     207      File: Tile  (no auto-title, OpenLayers/Tile.js) 
    191208      File: Image  (no auto-title, OpenLayers/Tile/Image.js) 
    192209      File: WFS  (no auto-title, OpenLayers/Tile/WFS.js) 
    193210      }  # Group: Tile 
     211 
     212   Group: Rule  { 
     213 
     214      File: Comparison  (no auto-title, OpenLayers/Rule/Comparison.js) 
     215      File: FeatureId  (no auto-title, OpenLayers/Rule/FeatureId.js) 
     216      File: Logical  (no auto-title, OpenLayers/Rule/Logical.js) 
     217      }  # Group: Rule 
    194218 
    195219   File: Util  (OpenLayers/Util.js) 
  • sandbox/GooglePopups/openlayers/apidoc_config/Topics.txt

    r3545 r5534  
    1 Format: 1.35 
     1Format: Development Release 12-07-2007 (1.35 base) 
    22 
    33# This is the Natural Docs topics file for this project.  If you change anything 
     
    5959#    Whether the topics are part of the class hierarchy.  Defaults to no. 
    6060# 
    61 # Variable Type: [yes|no] 
    62 #    Whether the topics can be a variable type.  Defaults to no. 
    63 # 
    6461# Page Title If First: [yes|no] 
    6562#    Whether the topic's title becomes the page title if it's the first one in 
  • sandbox/GooglePopups/openlayers/doc/readme.txt

    r3545 r5534  
    11Automatically generated OpenLayers API documentation is online: 
    22 
    3   http://dev.openlayers.org/docs/overview-tree.html 
     3  http://dev.openlayers.org/apidocs 
  • sandbox/GooglePopups/openlayers/doc_config/Languages.txt

    r3545 r5534  
    1 Format: 1.35 
     1Format: Development Release 12-07-2007 (1.35 base) 
    22 
    33# This is the Natural Docs languages file for this project.  If you change 
  • sandbox/GooglePopups/openlayers/doc_config/Menu.txt

    r5410 r5534  
    1 Format: 1.35 
     1Format: Development Release 12-07-2007 (1.35 base) 
    22 
    33 
     
    88# Footer: [text] 
    99# If you want to add a copyright notice, this would be the place to do it. 
     10 
     11# You can add a timestamp to your documentation like one of these: 
     12# Timestamp: Generated on month day, year 
     13# Timestamp: Updated mm/dd/yyyy 
     14# Timestamp: Last updated mon day 
     15# 
     16#   m     - One or two digit month.  January is "1" 
     17#   mm    - Always two digit month.  January is "01" 
     18#   mon   - Short month word.  January is "Jan" 
     19#   month - Long month word.  January is "January" 
     20#   d     - One or two digit day.  1 is "1" 
     21#   dd    - Always two digit day.  1 is "01" 
     22#   day   - Day with letter extension.  1 is "1st" 
     23#   yy    - Two digit year.  2006 is "06" 
     24#   yyyy  - Four digit year.  2006 is "2006" 
     25#   year  - Four digit year.  2006 is "2006" 
    1026 
    1127 
     
    8197   Group: Feature  { 
    8298 
    83       File: Feature  (OpenLayers/Feature.js) 
     99      File: Feature  (no auto-title, OpenLayers/Feature.js) 
    84100      File: Vector  (no auto-title, OpenLayers/Feature/Vector.js) 
    85101      File: WFS  (no auto-title, OpenLayers/Feature/WFS.js) 
     
    88104   Group: Format  { 
    89105 
    90       File: Format  (OpenLayers/Format.js) 
     106      File: Format  (no auto-title, OpenLayers/Format.js) 
    91107      File: GeoJSON  (no auto-title, OpenLayers/Format/GeoJSON.js) 
    92108      File: GeoRSS  (no auto-title, OpenLayers/Format/GeoRSS.js) 
     
    94110      File: JSON  (no auto-title, OpenLayers/Format/JSON.js) 
    95111      File: KML  (no auto-title, OpenLayers/Format/KML.js) 
     112      File: Text  (no auto-title, OpenLayers/Format/Text.js) 
    96113      File: WFS  (no auto-title, OpenLayers/Format/WFS.js) 
    97114      File: WKT  (no auto-title, OpenLayers/Format/WKT.js) 
     
    101118   Group: Geometry  { 
    102119 
    103       File: Geometry  (OpenLayers/Geometry.js) 
     120      File: Geometry  (no auto-title, OpenLayers/Geometry.js) 
    104121      File: Collection  (no auto-title, OpenLayers/Geometry/Collection.js) 
    105122      File: Curve  (no auto-title, OpenLayers/Geometry/Curve.js) 
     
    117134   Group: Handler  { 
    118135 
    119       File: Handler  (OpenLayers/Handler.js) 
     136      File: Handler  (no auto-title, OpenLayers/Handler.js) 
    120137      File: Box  (no auto-title, OpenLayers/Handler/Box.js) 
     138      File: Click  (no auto-title, OpenLayers/Handler/Click.js) 
    121139      File: Drag  (no auto-title, OpenLayers/Handler/Drag.js) 
    122140      File: Feature  (no auto-title, OpenLayers/Handler/Feature.js) 
     
    133151   Group: Layer  { 
    134152 
    135       File: Layer  (OpenLayers/Layer.js) 
     153      File: Layer  (no auto-title, OpenLayers/Layer.js) 
    136154      File: Boxes  (no auto-title, OpenLayers/Layer/Boxes.js) 
    137155      File: EventPane  (no auto-title, OpenLayers/Layer/EventPane.js) 
     
    170188 
    171189   File: Projection  (no auto-title, OpenLayers/Projection.js) 
     190   File: Rule  (no auto-title, OpenLayers/Rule.js) 
     191   File: Style  (no auto-title, OpenLayers/Style.js) 
    172192 
    173193   Group: Popup  { 
     
    188208   Group: Tile  { 
    189209 
    190       File: Tile  (OpenLayers/Tile.js) 
     210      File: Tile  (no auto-title, OpenLayers/Tile.js) 
    191211      File: Image  (no auto-title, OpenLayers/Tile/Image.js) 
    192212      File: WFS  (no auto-title, OpenLayers/Tile/WFS.js) 
    193213      }  # Group: Tile 
     214 
     215   Group: Rule  { 
     216 
     217      File: Comparison  (no auto-title, OpenLayers/Rule/Comparison.js) 
     218      File: FeatureId  (no auto-title, OpenLayers/Rule/FeatureId.js) 
     219      File: Logical  (no auto-title, OpenLayers/Rule/Logical.js) 
     220      }  # Group: Rule 
    194221 
    195222   File: Util  (OpenLayers/Util.js) 
  • sandbox/GooglePopups/openlayers/doc_config/Topics.txt

    r3545 r5534  
    1 Format: 1.35 
     1Format: Development Release 12-07-2007 (1.35 base) 
    22 
    33# This is the Natural Docs topics file for this project.  If you change anything 
     
    5656#    Whether the topics are part of the class hierarchy.  Defaults to no. 
    5757# 
    58 # Variable Type: [yes|no] 
    59 #    Whether the topics can be a variable type.  Defaults to no. 
    60 # 
    6158# Page Title If First: [yes|no] 
    6259#    Whether the topic's title becomes the page title if it's the first one in 
  • sandbox/GooglePopups/openlayers/examples/select-feature.html

    r5362 r5534  
    1414    <script src="../lib/OpenLayers.js"></script> 
    1515    <script type="text/javascript"> 
    16         var map, drawControls, select
     16        var map, drawControls
    1717        OpenLayers.Feature.Vector.style['default']['strokeWidth'] = '2'; 
    1818        function init(){ 
     
    3939                    vectors, OpenLayers.Handler.Polygon 
    4040                ), 
    41                 select: new OpenLayers.Control.SelectFeature(vectors), 
    42                 hover: new OpenLayers.Control.SelectFeature( 
    43                     vectors, {hover: true} 
     41                select: new OpenLayers.Control.SelectFeature( 
     42                    vectors, 
     43                    { 
     44                        clickout: false, toggle: false, 
     45                        multiple: false, hover: false, 
     46                        toggleKey: "ctrlKey", // ctrl key removes from selection 
     47                        multipleKey: "shiftKey" // shift key adds to selection 
     48                    } 
    4449                ) 
    4550            }; 
     
    6065                    control.deactivate(); 
    6166                } 
     67            } 
     68        } 
     69 
     70        function update() { 
     71            var clickout = document.getElementById("clickout").checked; 
     72            drawControls.select.clickout = clickout; 
     73            var hover = document.getElementById("hover").checked; 
     74            drawControls.select.hover = hover; 
     75            if(hover && drawControls.select.active) { 
     76                // turn on/off to clear feature property of handler 
     77                drawControls.select.deactivate(); 
     78                drawControls.select.activate(); 
    6279            } 
    6380        } 
     
    95112            <input type="radio" name="type" value="select" id="selectToggle" 
    96113                   onclick="toggleControl(this);" /> 
    97             <label for="selectToggle">select feature on click</label> 
     114            <label for="selectToggle">select feature</label> 
     115            <ul> 
     116                <li> 
     117                    <input id="clickout" type="checkbox" 
     118                           name="clickout" onchange="update()" /> 
     119                    <label for="clickout">click out to unselect features</label> 
     120                </li> 
     121                <li> 
     122                    <input id="hover" type="checkbox" 
     123                           name="hover" onchange="update()" /> 
     124                    <label for="hover">hover to select features</label> 
     125                </li> 
     126            </ul> 
    98127        </li> 
    99         <li> 
    100             <input type="radio" name="type" value="hover" id="hoverToggle" 
    101                    onclick="toggleControl(this);" /> 
    102             <label for="hoverToggle">select feature on hover</label> 
    103         </li> 
    104     </ul>         
     128    </ul> 
     129    <p>Use the shift key to select multiple features.  Use the ctrl key to 
     130    toggle selection on features one at a time.  Note: the "clickout" option has no 
     131    effect when "hover" is selected.</p> 
    105132  </body> 
    106133</html> 
  • sandbox/GooglePopups/openlayers/examples/spherical-mercator.html

    r5362 r5534  
    2626        function init(){ 
    2727            var options = { 
    28                 projection: "EPSG:900913", 
     28                projection: new OpenLayers.Projection("EPSG:900913"), 
     29                displayProjection: new OpenLayers.Projection("EPSG:4326"), 
    2930                units: "m", 
    3031                maxResolution: 156543.0339, 
     
    4041            ); 
    4142            var gsat = new OpenLayers.Layer.Google( 
    42                 "Google Sattelite", 
     43                "Google Satellite", 
    4344                {type: G_SATELLITE_MAP, 'sphericalMercator': true} 
    4445            ); 
     
    5051            // create Virtual Earth layers 
    5152            var veroad = new OpenLayers.Layer.VirtualEarth( 
    52                 "Virtual Earth Raods", 
     53                "Virtual Earth Roads", 
    5354                {'type': VEMapStyle.Road, 'sphericalMercator': true} 
    5455            ); 
     
    6869            ); 
    6970            var yahoosat = new OpenLayers.Layer.Yahoo( 
    70                 "Yahoo Sattelite", 
     71                "Yahoo Satellite", 
    7172                {'type': YAHOO_MAP_SAT, 'sphericalMercator': true} 
    7273            ); 
     
    105106            map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    106107            map.addControl(new OpenLayers.Control.EditingToolbar(vector)); 
     108            map.addControl(new OpenLayers.Control.Permalink()); 
     109            map.addControl(new OpenLayers.Control.MousePosition()); 
    107110            map.zoomToMaxExtent() 
    108111        } 
     
    137140 
    138141    <div id="docs"> 
    139         This is an example of using googles Mercator projection layers in a map window 
    140142    </div> 
    141143  </body> 
  • sandbox/GooglePopups/openlayers/examples/tilecache.html

    r5362 r5534  
    1414            map = new OpenLayers.Map( $('map')); 
    1515            layer = new OpenLayers.Layer.TileCache("TileCache Layer", 
    16                     ["http://c0.labs.metacarta.com/wms-c/cache/", 
    17                      "http://c1.labs.metacarta.com/wms-c/cache/", 
    18                      "http://c2.labs.metacarta.com/wms-c/cache/", 
    19                      "http://c3.labs.metacarta.com/wms-c/cache/", 
    20                      "http://c4.labs.metacarta.com/wms-c/cache/"], 
    21                     "basic", {'format': 'image/png'}); 
     16                ["http://c0.labs.metacarta.com/wms-c/cache/", 
     17                 "http://c1.labs.metacarta.com/wms-c/cache/", 
     18                 "http://c2.labs.metacarta.com/wms-c/cache/", 
     19                 "http://c3.labs.metacarta.com/wms-c/cache/", 
     20                 "http://c4.labs.metacarta.com/wms-c/cache/"], 
     21                "basic", 
     22                { 
     23                    'format': 'image/png', 
     24                    maxResolution: 180/256 // same as the TileCache config 
     25                } 
     26            ); 
    2227            map.addLayer(layer); 
    2328            map.setCenter(new OpenLayers.LonLat(0, 0), 0); 
     
    4247 
    4348    <p id="shortdesc"> 
    44         Demonstrates a TileCache layer that loads tiles from from a web accessible disk-based cache only. 
     49        Demonstrates a TileCache layer that loads tiles from from a web 
     50        accessible disk-based cache only. 
    4551    </p> 
    4652 
    47     <div id="map"> 
     53    <div id="map"></div> 
    4854 
    4955    <div id="docs"> 
     56        This layer should be used for web accessible disk-based caches only. 
     57        It is not used to request new tiles from TileCache.  Note that you 
     58        should specify resolutions explicitly on this layer so that they match 
     59        your TileCache configuration. 
    5060    </div> 
    5161  </body> 
  • sandbox/GooglePopups/openlayers/examples/vector-formats.html

    r5362 r5534  
    5656    <script type="text/javascript"> 
    5757        var map, vectors, formats; 
     58        function updateFormats() { 
     59            var in_options = { 
     60                'internalProjection': map.baseLayer.projection, 
     61                'externalProjection': new OpenLayers.Projection(OpenLayers.Util.getElement("inproj").value) 
     62            }     
     63            var out_options = { 
     64                'internalProjection': map.baseLayer.projection, 
     65                'externalProjection': new OpenLayers.Projection(OpenLayers.Util.getElement("outproj").value) 
     66            }     
     67            formats = { 
     68              'in': { 
     69                wkt: new OpenLayers.Format.WKT(in_options), 
     70                geojson: new OpenLayers.Format.GeoJSON(in_options), 
     71                georss: new OpenLayers.Format.GeoRSS(in_options), 
     72                gml: new OpenLayers.Format.GML(in_options), 
     73                kml: new OpenLayers.Format.KML(in_options) 
     74              },  
     75              'out': { 
     76                wkt: new OpenLayers.Format.WKT(out_options), 
     77                geojson: new OpenLayers.Format.GeoJSON(out_options), 
     78                georss: new OpenLayers.Format.GeoRSS(out_options), 
     79                gml: new OpenLayers.Format.GML(out_options), 
     80                kml: new OpenLayers.Format.KML(out_options) 
     81              }  
     82            }; 
     83        } 
    5884        function init(){ 
    5985            map = new OpenLayers.Map('map'); 
     
    74100            map.addControl(select); 
    75101            select.activate(); 
    76  
    77             formats = { 
    78                 wkt: new OpenLayers.Format.WKT(), 
    79                 geojson: new OpenLayers.Format.GeoJSON(), 
    80                 georss: new OpenLayers.Format.GeoRSS(), 
    81                 gml: new OpenLayers.Format.GML(), 
    82                 kml: new OpenLayers.Format.KML() 
    83             }; 
     102             
     103            updateFormats(); 
    84104 
    85105            map.setCenter(new OpenLayers.LonLat(0, 0), 1); 
     
    90110            // second argument for pretty printing (geojson only) 
    91111            var pretty = document.getElementById("prettyPrint").checked; 
    92             var str = formats[type].write(feature, pretty); 
     112            var str = formats['out'][type].write(feature, pretty); 
    93113            // not a good idea in general, just for this demo 
    94114            str = str.replace(/,/g, ', '); 
     
    99119            var element = document.getElementById('text'); 
    100120            var type = document.getElementById("formatType").value; 
    101             var features = formats[type].read(element.value); 
     121            var features = formats['in'][type].read(element.value); 
    102122            var bounds; 
    103123            if(features) { 
     
    165185                   name="prettyPrint" value="1" /> 
    166186            <br /> 
     187            Input Projection: <select id="inproj" onchange='updateFormats()'> 
     188              <option value="EPSG:4326" selected="selected">EPSG:4326</option> 
     189              <option value="EPSG:900913">Spherical Mercator</option> 
     190            </select> <br />  
     191            Output Projection: <select id="outproj" onchange='updateFormats()'> 
     192              <option value="EPSG:4326" selected="selected">EPSG:4326</option> 
     193              <option value="EPSG:900913">Spherical Mercator</option> 
     194            </select>  
     195            <br />  
    167196            <textarea id="text">paste text here...</textarea> 
    168197            <br /> 
  • sandbox/GooglePopups/openlayers/lib/OpenLayers.js

    r5438 r5534  
    178178            "OpenLayers/Format/WFS.js", 
    179179            "OpenLayers/Format/WKT.js", 
     180            "OpenLayers/Format/SLD.js", 
    180181            "OpenLayers/Format/Text.js", 
    181182            "OpenLayers/Format/JSON.js", 
  • sandbox/GooglePopups/openlayers/lib/OpenLayers/BaseTypes.js

    r5317 r5534  
    350350    }; 
    351351} 
     352 
     353/********************* 
     354 *                   * 
     355 *      ARRAY        *  
     356 *                   *  
     357 *********************/ 
     358 
     359OpenLayers.Array = { 
     360 
     361    /** 
     362     * APIMethod: OpenLayers.Array.filter 
     363     * Filter an array.  Provides the functionality of the 
     364     *     Array.prototype.filter extension to the ECMA-262 standard.  Where 
     365     *     available, Array.prototype.filter will be used. 
     366     * 
     367     * Based on well known example from http://developer.mozilla.org/en/docs/Core_JavaScript_1.5_Reference:Objects:Array:filter 
     368     * 
     369     * Parameters: 
     370     * array - {Array} The array to be filtered.  This array is not mutated. 
     371     *     Elements added to this array by the callback will not be visited. 
     372     * callback - {Function} A function that is called for each element in 
     373     *     the array.  If this function returns true, the element will be 
     374     *     included in the return.  The function will be called with three 
     375     *     arguments: the element in the array, the index of that element, and 
     376     *     the array itself.  If the optional caller parameter is specified 
     377     *     the callback will be called with this set to caller. 
     378     * caller - {Object} Optional object to be set as this when the callback 
     379     *     is called. 
     380     * 
     381     * Returns: 
     382     * {Array} An array of elements from the passed in array for which the 
     383     *     callback returns true. 
     384     */ 
     385    filter: function(array, callback, caller) { 
     386        var selected = []; 
     387        if (Array.prototype.filter) { 
     388            selected = array.filter(callback, caller); 
     389        } else { 
     390            var len = array.length; 
     391            if (typeof callback != "function") { 
     392                throw new TypeError(); 
     393            } 
     394            for(var i=0; i<len; i++) { 
     395                if (i in array) { 
     396                    var val = array[i]; 
     397                    if (callback.call(caller, val, i, array)) { 
     398                        selected.push(val); 
     399                    } 
     400                } 
     401            }         
     402        } 
     403        return selected; 
     404    } 
     405     
     406}; 
  • sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/ArgParser.js

    r4985 r5534  
    3131     */ 
    3232    layers: null, 
     33     
     34    /**  
     35     * APIProperty: displayProjection 
     36     * {<OpenLayers.Projection>} Requires proj4js support.  
     37     *     Projection used when reading the coordinates from the URL. This will 
     38     *     reproject the map coordinates from the URL into the map's 
     39     *     projection. 
     40     * 
     41     *     If you are using this functionality, be aware that any permalink 
     42     *     which is added to the map will determine the coordinate type which 
     43     *     is read from the URL, which means you should not add permalinks with 
     44     *     different displayProjections to the same map.  
     45     */ 
     46    displayProjection: null,  
    3347 
    3448    /** 
     
    5771            if ( (control != this) && 
    5872                 (control.CLASS_NAME == "OpenLayers.Control.ArgParser") ) { 
     73                 
     74                // If a second argparser is added to the map, then we  
     75                // override the displayProjection to be the one added to the 
     76                // map.  
     77                if (control.displayProjection != this.displayProjection) { 
     78                    this.displayProjection = control.displayProjection; 
     79                }     
     80                 
    5981                break; 
    6082            } 
     
    98120            this.map.events.unregister('changebaselayer', this,  
    99121                                       this.setCenter); 
    100                                         
     122             
     123            if (this.displayProjection) { 
     124                this.center.transform(this.displayProjection,  
     125                                      this.map.getProjectionObject());  
     126            }       
     127 
    101128            this.map.setCenter(this.center, this.zoom); 
    102129        } 
  • sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/ModifyFeature.js

    r5470 r5534  
    3030 
    3131    /** 
     32     * APIProperty: clickout 
     33     * {Boolean} Unselect features when clicking outside any feature. 
     34     *     Default is true. 
     35     */ 
     36    clickout: true, 
     37 
     38    /** 
     39     * APIProperty: toggle 
     40     * {Boolean} Unselect a selected feature on click. 
     41     *      Default is true. 
     42     */ 
     43    toggle: true, 
     44 
     45    /** 
    3246     * Property: layer 
    3347     * {<OpenLayers.Layer.Vector>} 
     
    166180        var selectOptions = { 
    167181            geometryTypes: this.geometryTypes, 
     182            clickout: this.clickout, 
     183            toggle: this.toggle, 
    168184            onSelect: function(feature) { 
    169185                control.selectFeature.apply(control, [feature]); 
  • sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/MousePosition.js

    r5490 r5534  
    5252     */ 
    5353    lastXy: null, 
     54 
     55    /** 
     56     * APIProperty: displayProjection 
     57     * {<OpenLayers.Projection>} A projection that the  
     58     * mousecontrol will display. 
     59     */ 
     60    displayProjection: null,  
    5461     
    5562    /** 
     
    114121                return; 
    115122            }     
     123            if (this.displayProjection) { 
     124                lonLat.transform(this.map.getProjectionObject(),  
     125                                 this.displayProjection ); 
     126            }       
    116127            this.lastXy = evt.xy; 
     128             
    117129        } 
    118130         
  • sandbox/GooglePopups/openlayers/lib/OpenLayers/Control/Navigation.js

    r5002 r5534  
    5858        this.dragPan.activate(); 
    5959        this.wheelHandler.activate(); 
     60        this.clickHandler.activate(); 
    6061        this.zoomBox.activate(); 
    6162        return OpenLayers.Control.prototype.activate.apply(this,arguments); 
     
    6869        this.zoomBox.deactivate(); 
    6970        this.dragPan.deactivate(); 
     71        this.clickHandler.deactivate(); 
    7072        this.wheelHandler.deactivate(); 
    7173        return OpenLayers.Control.prototype.deactivate.apply(this,arguments); 
     
    7678     */ 
    7779    draw: function() { 
    78         this.map.events.register( "dblclick", this, this.defaultDblClick ); 
     80        this.clickHandler = new OpenLayers.Handler.Click(this,  
     81                                        { 'dblclick': this.defaultDblClick }, 
     82