OpenLayers OpenLayers

Changeset 103

Show
Ignore:
Timestamp:
05/17/06 12:20:12 (3 years ago)
Author:
euzuro
Message:

another round of LatLon -> LonLat [99] revisions

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/openlayers/google.html

    r99 r103  
    1515    <script type="text/javascript"> 
    1616        <!-- 
     17        var lon = 5; 
    1718        var lat = 40; 
    18         var lon = 5; 
    1919        var zoom = 5; 
    2020        var map, layer; 
  • trunk/openlayers/lib/OpenLayers/Map.js

    r99 r103  
    223223    */ 
    224224    getLonLatFromPixel: function (point) { 
    225         var center = this.getCenter();        //map center lat/lon 
     225        var center = this.getCenter();        //map center lon/lat 
    226226        var res  = this.getResolution(); 
    227227        var size = this.getSize(); 
  • trunk/openlayers/lib/OpenLayers/Util.js

    r101 r103  
    149149 
    150150/** 
    151 * @class This class represents a latitude and longitude pair 
     151* @class This class represents a longitude and latitude pair 
    152152*/ 
    153153OpenLayers.LonLat = Class.create(); 
     
    161161    */ 
    162162    initialize: function(lon, lat) { 
     163        this.lon = lon; 
    163164        this.lat = lat; 
    164         this.lon = lon; 
    165165    }, 
    166166     
     
    234234/** 
    235235* @class This class represents a bounding box.  
    236 *        Data stored as Min and Max Latitudes and Longitudes 
     236*        Data stored as Min and Max Longitudes and Latitudes 
    237237*/ 
    238238OpenLayers.Bounds = Class.create(); 
  • trunk/openlayers/tests/test_Bounds.html

    r32 r103  
    88        bounds = new OpenLayers.Bounds(1,2,3,4); 
    99        t.ok( bounds instanceof OpenLayers.Bounds, "new OpenLayers.Bounds returns Bounds object" ); 
     10        t.eq( bounds.minlon, 2, "bounds.minlon is set correctly" ); 
    1011        t.eq( bounds.minlat, 1, "bounds.minlat is set correctly" ); 
    11         t.eq( bounds.minlon, 2, "bounds.minlon is set correctly" ); 
     12        t.eq( bounds.maxlon, 4, "bounds.maxlon is set correctly" ); 
    1213        t.eq( bounds.maxlat, 3, "bounds.maxlat is set correctly" ); 
    13         t.eq( bounds.maxlon, 4, "bounds.maxlon is set correctly" ); 
    1414     
    1515     } 
  • trunk/openlayers/tests/test_LonLat.html

    r99 r103  
    88        lonlat = new OpenLayers.LonLat(6, 5); 
    99        t.ok( lonlat instanceof OpenLayers.LonLat, "new OpenLayers.LonLat returns LonLat object" ); 
     10        t.eq( lonlat.lon, 6, "lonlat.lon is set correctly"); 
    1011        t.eq( lonlat.lat, 5, "lonlat.lat is set correctly"); 
    11         t.eq( lonlat.lon, 6, "lonlat.lon is set correctly"); 
    1212    } 
    1313  // --> 
  • trunk/openlayers/tests/test_Map.html

    r99 r103  
    2828        t.eq( map.getZoom(), 0, "map.zoom is correct after calling setCenter"); 
    2929        t.eq( map.getResolution(), map.maxResolution, "map.getResolution() == map.maxResolution"); 
     30        t.eq( map.getCenter().lon, 2, "map center lon is correct after calling setCenter"); 
    3031        t.eq( map.getCenter().lat, 1, "map center lat is correct after calling setCenter"); 
    31         t.eq( map.getCenter().lon, 2, "map center lon is correct after calling setCenter"); 
    3232    } 
    3333    function test_03_Map_add_layers(t) { 
     
    6060        map.zoomIn(); 
    6161        t.eq( map.getZoom(), 1, "map.zoom is correct after calling setCenter,zoom in"); 
     62        t.eq( map.getCenter().lon, 2, "map center lon is correct after calling setCenter, zoom in"); 
    6263        t.eq( map.getCenter().lat, 1, "map center lat is correct after calling setCenter,zoom in"); 
    63         t.eq( map.getCenter().lon, 2, "map center lon is correct after calling setCenter, zoom in"); 
    6464        map.zoomOut(); 
    6565        t.eq( map.getZoom(), 0, "map.zoom is correct after calling setCenter,zoom in, zoom out"); 
  • trunk/openlayers/tests/test_Marker.html

    r99 r103  
    1111        t.ok( marker.icon instanceof OpenLayers.Icon, "new marker.Icon returns Icon object" ); 
    1212        t.ok( marker.lonlat instanceof OpenLayers.LonLat, "new marker.lonlat returns LonLat object" ); 
     13        t.eq( marker.lonlat.lon, 2, "marker.lonlat.lon returns correct lon" ); 
    1314        t.eq( marker.lonlat.lat, 1, "marker.lonlat.lat returns correct lat" ); 
    14         t.eq( marker.lonlat.lon, 2, "marker.lonlat.lon returns correct lon" ); 
    1515    } 
    1616 
  • trunk/openlayers/tests/test_Tile.html

    r88 r103  
    1212        t.ok( tile instanceof OpenLayers.Tile, "new OpenLayers.Tile returns Tile object" ); 
    1313        t.ok( tile.bounds instanceof OpenLayers.Bounds, "tile.bounds is a Bounds object" ); 
     14        t.eq( tile.bounds.minlon, 2, "tile.bounds.minlon is set correctly"); 
    1415        t.eq( tile.bounds.minlat, 1, "tile.bounds.minlat is set correctly"); 
     16        t.eq( tile.bounds.maxlon, 4, "tile.bounds.maxlon is set correctly"); 
    1517        t.eq( tile.bounds.maxlat, 3, "tile.bounds.maxlat is set correctly"); 
    16         t.eq( tile.bounds.minlon, 2, "tile.bounds.minlon is set correctly"); 
    17         t.eq( tile.bounds.maxlon, 4, "tile.bounds.maxlon is set correctly"); 
    1818        t.ok( tile.size instanceof OpenLayers.Size, "tile.size is a Size object" ); 
    1919        t.eq( tile.size.w, 5, "tile.size.w is set correctly"); 
  • trunk/openlayers/tests/test_Tile_Image.html

    r98 r103  
    1212        t.ok( tile instanceof OpenLayers.Tile.Image, "new OpenLayers.Tile returns Tile object" ); 
    1313        t.ok( tile.bounds instanceof OpenLayers.Bounds, "tile.bounds is a Bounds object" ); 
     14        t.eq( tile.bounds.minlon, 2, "tile.bounds.minlon is set correctly"); 
    1415        t.eq( tile.bounds.minlat, 1, "tile.bounds.minlat is set correctly"); 
     16        t.eq( tile.bounds.maxlon, 4, "tile.bounds.maxlon is set correctly"); 
    1517        t.eq( tile.bounds.maxlat, 3, "tile.bounds.maxlat is set correctly"); 
    16         t.eq( tile.bounds.minlon, 2, "tile.bounds.minlon is set correctly"); 
    17         t.eq( tile.bounds.maxlon, 4, "tile.bounds.maxlon is set correctly"); 
    1818        t.ok( tile.size instanceof OpenLayers.Size, "tile.size is a Size object" ); 
    1919        t.eq( tile.size.w, 5, "tile.size.w is set correctly");