I have added to my OpenLayers-based app two layers. A google maps layer and another WMS layer.
physical = new OpenLayers.Layer.Google( "Physical View", {type: google.maps.MapTypeId.PHYSICAL, numZoomLevels: 21, MAX_ZOOM_LEVEL: 21, MIN_ZOOM_LEVEL: 6} );ktl = new OpenLayers.Layer.WMS( "Ktl","http://gis.ktimanet.gr/wms/wmsopen/wmsserver.aspx", { layers: 'KTBASEMAP', }, { //format: "image/png", //displayOutsideMaxExtent: false, projection: new OpenLayers.Projection("EPSG:900913"), } );Both layers are displayed in my app but I face the following zoom-related problem.When I see the google maps layer the zoom level is different than when I see the WMS layer. I have added two screenshots which illustrate what I describe above.
This is quite unexpected as I set the center and zoom of my map as:
map.setCenter (lonLat, 1);Is it possible to change the default zoom of a layer?
أكثر...
physical = new OpenLayers.Layer.Google( "Physical View", {type: google.maps.MapTypeId.PHYSICAL, numZoomLevels: 21, MAX_ZOOM_LEVEL: 21, MIN_ZOOM_LEVEL: 6} );ktl = new OpenLayers.Layer.WMS( "Ktl","http://gis.ktimanet.gr/wms/wmsopen/wmsserver.aspx", { layers: 'KTBASEMAP', }, { //format: "image/png", //displayOutsideMaxExtent: false, projection: new OpenLayers.Projection("EPSG:900913"), } );Both layers are displayed in my app but I face the following zoom-related problem.When I see the google maps layer the zoom level is different than when I see the WMS layer. I have added two screenshots which illustrate what I describe above.
This is quite unexpected as I set the center and zoom of my map as:
map.setCenter (lonLat, 1);Is it possible to change the default zoom of a layer?
أكثر...