[GIS] Increasing OpenLayers2 Max Zoom Level

geoserverjavascriptopenlayers-2

I develop HTML pages by using OpenLayers, which points to a local GeoServer WMS service. On displaying a layer, it stops at its available max zoom level, but it is still too small to manipulate (a polygon of 10 meter square). Is there a way to increase the zoom level? Where should I do the workaround — on the OpenLayers or the layer setting in GeoServer?
This is my OpenLayers code:

    var xwms = new OpenLayers.Layer.WMS( "Central Java",
    "http://localhost:8080/geoserver/myneighborhood/wms/", 
    {
        layers: 'basemap',
        styles: 'tlx_map_land',
        bgcolor: '0xBED0DE'
    } );
    var map = new OpenLayers.Map({
       div: "map",
       layers: [xwms],
       controls: [
           new OpenLayers.Control.Navigation({
               dragPanOptions: {
                   enableKinetic: true
               }
           }),
           new OpenLayers.Control.PanZoom(),
           new OpenLayers.Control.Attribution()
       ],
       center: [110.248191,-7.477177],
       zoom: 13
    });



         ============================ solved ===============================

Finally, I decided to utilise Klokantech's tool to generate custom bounding box(es), set it into both layer publishing in GeoServer and OpenLayers map options. To everyone who participate, thanks for your time and attention.

Best Answer

Have you tried adding numZoomlevels in the openlayers call??

from the doc:

numZoomLevels

{Integer} Number of zoom levels for the map.  Defaults to 16.  Set a different value in the map options if needed.

This is how I added it to display OSM-like tiles:

        var map; 
        function init() {

            map = new OpenLayers.Map ("map", {
            controls:[ new OpenLayers.Control.Zoomlevel(),
                       new OpenLayers.Control.Navigation(),
                       new OpenLayers.Control.PanZoomBar(),
                       new OpenLayers.Control.ScaleLine({geodesic: true}),
                       new OpenLayers.Control.MousePosition(),
                       new OpenLayers.Control.LayerSwitcher({'asscending':true}),

                       new OpenLayers.Control.KeyboardDefaults()],
                maxExtent: new OpenLayers.Bounds(-20037508.34,-20037508.34,20037508.34,20037508.34),
                maxResolution: 156543.0399,
                numZoomLevels: 19,
                units: 'm',
                projection: new OpenLayers.Projection("EPSG:900913"),
                displayProjection: new OpenLayers.Projection("EPSG:4326")
            } );

            var MyMapnikLayer = new OpenLayers.Layer.OSM("myMapnik", "file:///D:/Tiles/myMapnik/${z}/${x}/${y}.png", {numZoomLevels: 16, alpha: true, isBaseLayer: true, visibility: true});
            map.addLayer(MyMapnikLayer);

It is added for the map and for the layer object. Both can be different (and every layer may have a different level below the map elements zoom level).