tilecache config

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

tilecache config

vmon
hi!!

  how can i define my tilecache configuration  for map with proj 4326 to work  with google maps layer proj:900913?.

I am working with 2 layer(my baselayer 4326 tilecache and 900913 google maps) but when a change the layer  to google maps my center move to other continent :/.

if i call a WMS with google maps i have no problem. if i change the WSM to TILECACHE using the same mapfile i have error from resolution

pleasee help

RG
VM
Reply | Threaded
Open this post in threaded view
|

Re: tilecache config

vmon
sorry my code:
  var x_left   = -112.888238;
        var y_bottom = -57.06133625;
        var x_right  = -7.419488000000001;
        var y_top    =  13.25116375;
        var v_maxResolution=0.07902398403828125;
        var v_numZoomLevels = 20;    
               
         var options = {
      projection: new OpenLayers.Projection("EPSG:900913")
       ,displayProjection: new OpenLayers.Projection("EPSG:4326")
       ,units: "m"
       ,maxResolution: 156543.0339
       ,maxExtent:new OpenLayers.Bounds(x_left,y_bottom,x_right,y_top).transform( new OpenLayers.Projection("EPSG:4326"),  new OpenLayers.Projection("EPSG:900913"))
  };
  map = new OpenLayers.Map('map',options);
 
  map.addControl(new OpenLayers.Control.LayerSwitcher());


WMS/google maps WORKS!

 layer = new OpenLayers.Layer.WMS( "maps",
         "http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/tilecache/mapa.map", {projection: new OpenLayers.Projection("EPSG:3857"),layers: 'mapa_layer', Image:'image/png'} );
   
    var gsat = new OpenLayers.Layer.Google(
        "Google Satellite",
        {'sphericalMercator': true}
    );

WMS TIlecache/googlemaps Does not work

layer = new OpenLayers.Layer.WMS( "VMap0",
                  "http://localhost/tilecache/tilecache.cgi?", {layers: 'mapa', format: 'image/png' } );

var gsat = new OpenLayers.Layer.Google(
        "Google Satellite",
        {'sphericalMercator': true}
    );

tilecache conf

[mapa]
type=WMS
url=http://localhost/cgi-bin/mapserv.exe?map=c:/ms4w/Apache/htdocs/tilecache/mapa.map
layers=mapa_layer


RG
VM