I am using the Ordnance map as a backdrop in my website. when overlays the WMS from Geoserver, I am unable to increase the zoom level. Please see my code and kindly suggest it.
var options = {
maxResolution: 0.55804443359375,
projection: "EPSG:27700",
units: 'm'
};
map = new OpenSpace.Map('map', options);
// Define or get the vector layer to be used
var vlayer = osMap.getVectorLayer();
var mlayer = osMap.getMarkerLayer();
vlayer.displayInLayerSwitcher = false;
mlayer.displayInLayerSwitcher = false;
// setup tiled layer
format = 'image/png';
var tiled = new OpenLayers.Layer.WMS(
"Oxford_Example",
"http://192.168.0.126:8080/geoserver/cite/wms",
{
transparent: 'true',
LAYERS: 'cite:Oxford_ExampleCapture',
STYLES: '',
format: format,
tiled: true,
tilesOrigin: osMap.maxExtent.left + ',' + osMap.maxExtent.bottom
},
{
buffer: 0,
displayOutsideMaxExtent: true,
singleTile: true,
ratio: 1,
isBaseLayer: false,
yx: { 'EPSG:27700': false }
}
);
osMap.addLayers([tiled]);
//Show Co-Ordinate on mouse over
osMap.addControl(new OpenLayers.Control.MousePosition());
//OverViewMap
var control = new OpenSpace.Control.OverviewMap();
osMap.addControl(control);
control.maximizeControl();
//ScaleBar
osMap.addControl(new OpenLayers.Control.ScaleLine({ displayClass: 'olControlScaleLine' }));
// osMap.addControl(new OpenLayers.Control.Scale({ displayClass: 'olControlScale' }));
//Layer Switcher
// var layerSwitch = new OpenLayers.Control.LayerSwitcher();
var layerSwitch = new OpenLayers.Control.LayerSwitcher({
div: OpenLayers.Util.getElement('layerswitcher')
});
osMap.addControl(layerSwitch)
But i can zoom in this level only. I am unable to the particular feature. See the below image:
No comments:
Post a Comment