google 900913 resolutions

来源:百度文库 编辑:神马文学网 时间:2024/07/03 08:52:27
Hi there..I have an openlayers application overlaying some WMS layers (that i amserving locally from geoserver) over the top of google maps.Everything is running perfectly there using the " 'sphericalMercator':true" parameter in the googlemaps layers' config.What I am trying to do now is point openlayers at my tilecache insteadof directly to geoserver for my local wms layers. I have previouslygot this working no worries when no google layers were involved. Ihave read a lot of information about getting tilecache to work whenusing google maps as the client, but is it able to request tiles whenopenlayers is the client (and google is involved) ? I have aligned the'resolutions' parameter between openlayers and tilecache, and used thetms_type and spherical_mercator tags in TC but still tilecachereturns:An error occurred: Current x value 8004688.542400 is too far from tilecorner x 7514065.626400So the problem is aligning openlayers with tilecache.. but i can't seewhat i'm missing. Is what i'm trying to do even possible ? Anycomments or suggestions would be greatly appreciated.cheers,-ivanheres my tilecache config:[landsat]type=WMSurl=http://localhost:8080/geoserver/wmsextension=jpegresolutions=156543.033900000,78271.516950000,39135.758475000,19567.879237500,9783.939618750,4891.969809375,2445.984904688,1222.992452344,611.496226172,305.748113086,152.874056543,76.437028271,38.218514136,19.109257068,9.554628534,4.777314267,2.388657133,1.194328567,0.59716428337097171575,0.298582142srs=EPSG:900913maxResolution=156543.0339bbox=-20037508.3427892,-20037508.3427892,20037508.3427892,20037508.3427892tms_type=googlespherical_mercator=truelayers=xxxxxopenlayers layer config: map = new OpenLayers.Map('map', { controls: [], resolutions:[156543.033900000,78271.516950000,39135.758475000,19567.879237500,9783.939618750,4891.969809375,2445.984904688,1222.992452344,611.496226172,305.748113086,152.874056543,76.437028271,38.218514136,19.109257068,9.554628534,4.777314267,2.388657133,1.194328567,0.59716428337097171575,0.298582142], projection: new OpenLayers.Projection("EPSG:900913"), displayProjection: new OpenLayers.Projection("EPSG:4326"), units: "m", maxExtent: new OpenLayers.Bounds(-20037508.34, -20037508.34,20037508.34, 20037508.34) numZoomLevels: 18, maxResolution: 156543.0339 });(cut) var layer_image_landsat = new OpenLayers.Layer.WMS( "Local Imagery", "/tilecache/tilecache.cgi", { layers: 'landsat', srs: 'EPSG:4326', format: 'image/png', transparent:true }, { isBaseLayer: true, singleTile: false, opacity:1} );(cut)