Hi people, i know that this thread is out of afinity of this list, but this threat is problem for many people that i know,
the problem is that i want to enable geowebcache that comes with geoserver, i enable the option in geoserver administration web, and i use this way to use it with openlayers, and i get that all levels that i had working in my system about zoom levels are not working, for example this is no working anymore , i need some help please.
//--------------------------------------------------------------------------------------
map.events.on({
“zoomend” : function (e) {
scaleCombo.setValue(map.getScale());
console.debug(this);
if (this.getZoom() < 2) {
zoomtoggle.onCtrlDeactivate();
aprotegidas.setVisibility(false);
municipios.setVisibility(false);
provincias.setVisibility(true);
ferreas.setVisibility(false);
autopistas.setVisibility(false);
l110.setVisibility(false);
l220.setVisibility(false);
s220.setVisibility(false);
s110.setVisibility(false);
vlayerMunicipios.setVisibility(true);
asentamientos.setVisibility(false);
manzanas.setVisibility(false);
carreteras.setVisibility(false);
if ( vlayerMunicipios.visibility == false )
{
inventario.setVisibility(true);
vlayer.setVisibility(true);
tree.getRootNode().eachChild(function(n){
n.enable();
});
selectvlayerMunicipios.deactivate();
modifyControl.activate();
tree.getSelectionModel().select(tree.getRootNode().item(3), null, true);
}
else
{
inventario.setVisibility(false);
vlayer.setVisibility(false);
tree.getRootNode().eachChild(function(n){
n.enable();
});
selectvlayerMunicipios.activate();
modifyControl.deactivate();
selectvlayerMunicipios.unselectAll();
tree.getSelectionModel().select(tree.getRootNode().item(3), null, true);
}
}
}
});
//---------------------------------------------------------------------------------------
//this is my code of the variant using GWC
OpenLayers.ProxyHost = “/geoserver/rest/proxy?url=”;
var bounds = new OpenLayers.Bounds(
-84.956, 19.825,
-74.132, 23.984
);
var bounds2 = new OpenLayers.Bounds(-180.0,-90.0,180.0,90.0);
OpenLayers.DOTS_PER_INCH = 90.71428571428572;
var nav = new OpenLayers.Control.NavigationHistory();
var loadingpanel = new OpenLayers.Control.LoadingPanel();
var controls =
[ new OpenLayers.Control.Navigation(),
new OpenLayers.Control.PanZoom(),
new OpenLayers.Control.Attribution(),
new OpenLayers.Control.ScaleLine(),
new OpenLayers.Control.OverviewMap({mapOptions:{projection:“EPSG:4326”, units:‘degrees’, maxExtent:bounds, numZoomLevels: 1}}),
new OpenLayers.Control.MousePosition(), loadingpanel,
nav];
nav.activate();
options = {
controls : controls,
maxExtent : bounds2,
restrictedExtent : bounds,
projection : “EPSG:4326”,
units : ‘degrees’};
var map = new OpenLayers.Map(‘map’, options);
var base = new OpenLayers.Layer.WMS(
titulo, “http://10.8.192.221:8080/geoserver/gwc/service/wms”,
{
LAYERS: “raster_all”,
STYLES: ‘’,
format: ‘image/png’,
tiled: true
},
{
isBaseLayer: false,
tileOrigin: new OpenLayers.LonLat(map.maxExtent.left,map.maxExtent.bottom),
transitionEffect : ‘resize’
}
);
map.addLayer(base);
//-----------------------------------------------------------------------------------------------------------------------
thanks for all
This message was sent using IMP, the Internet Messaging Program.