Changeset 815

Show
Ignore:
Timestamp:
11/06/08 14:24:10 (22 months ago)
Author:
sbenthall
Message:

setting maxExtent to fit with tile service's 'world wide grid' to prevent odd tiles (see #372). Also, made mapOptions in configuration to allow map configurability.

Location:
branches/landgate
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • branches/landgate/LandgateConfig.js

    r814 r815  
    22 
    33LandgateConfig.proxy =  "/cgi-bin/proxy.cgi?url=", 
     4 
     5LandgateConfig.mapOptions = { 
     6    units: "m" 
     7} 
     8 
    49LandgateConfig.wfsvUrl = "http://geo.openplans.org/geoserver/ows", 
    510LandgateConfig.wmsUrl = [ 
    6     //"http://geo.openplans.org/geoserver/gwc/service/wms" 
    7     "http://artois.openplans.org/tc/tilecache.py", 
     11    "http://geo.openplans.org/geoserver/gwc/service/wms" 
     12    //"http://artois.openplans.org/tc/tilecache.py", 
    813]; 
    914 
    1015LandgateConfig.wmsOptions = { 
    11                 layers: "nyc", // "topp:nyc_background", //  
     16                layers: "topp:nyc_background", //  
    1217        bgcolor: '0xECECC6',  
    1318        format: 'image/png8' 
     
    169174 
    170175LandgateConfig.projection = "EPSG:900913"; 
    171 LandgateConfig.maxExtent = new OpenLayers.Bounds(-8264065.748928515, 4962874.707924211, -8202916.126311328, 4998532.581612859); 
     176 
     177/* 
     178 * Be careful about changing this maxExtent. 
     179 *  
     180 * This needs to line up with the "world wide grid" used for EPSG:900913 on the tiling server. 
     181 */  
     182LandgateConfig.maxExtent = new OpenLayers.Bounds(-8296780.797031253,4852834.05109375,-8140237.763125002,5009377.085); 
     183 
    172184LandgateConfig.maxResolution = 38.21851413574219; 
    173 LandgateConfig.overviewResolutions = [611.49622617187504, 305.74811308593752, 
    174                                     152.87405654296876, 76.43702827148438, 
    175                                     38.21851413574219, 19.109257067871095, 
    176                                     9.5546285339355475, 4.7773142669677737, 
    177                                     2.3886571334838869, 1.1943285667419434, 
    178                                     0.59716428337097172, 0.29858214168548586, 
    179                                     0.14929107084274293, 0.074645535421371464, 
    180                                     0.037322767710685732, 0.018661383855342866] 
     185 
    181186LandgateConfig.defaultZoomLevel = 2; 
     187LandgateConfig.defaultZoomCenter = new OpenLayers.LonLat(-8233844.45887568, 4980388.342026915); 
    182188 
    183189LandgateConfig.startInViewMode = false; 
  • branches/landgate/Vespucci/Application.js

    r798 r815  
    7777         
    7878        if (this.configuration.defaultZoomLevel) { 
    79             this.map.zoomTo(this.configuration.defaultZoomLevel); 
     79            this.map.setCenter(this.configuration.defaultZoomCenter, this.configuration.defaultZoomLevel); 
    8080        } else { 
    8181            this.map.zoomToMaxExtent(); 
     
    172172        var options = { 
    173173            projection: this.configuration.projection, 
    174             units: "m", 
    175174            maxExtent: this.configuration.maxExtent, 
    176175            restrictedExtent: restrictedExtent, 
     
    180179            theme: Vespucci._getScriptLocation() + "Vespucci/Theme/map.css" 
    181180        }; 
     181         
     182        OpenLayers.Util.extend(options, this.configuration.mapOptions); 
    182183         
    183184        this.map = new OpenLayers.Map(this.configuration.mapDivId, options);