Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Geoserver URL

{http://localhost:8090/geoserver/Test/wms?service=WMS&version=1.1.0&request=GetMap&layers=Test:B901_AS&styles=&bbox=638500.0,5309500.0,639000.0,5310000.0&width=512&height=512&srs=EPSG:4326&format=application/openlayers}

HTML code

<html>
<head>

<title> A Basic GeoExt Page </title>
<script src="ext-3.4.0/adapter/ext/ext-base.js" type="text/javascript"></script>
<script src="ext-3.4.0/ext-all.js"  type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="ext-3.4.0/resources/css/ext-all.css"></link>
<script src="OpenLayers-2.12/OpenLayers.js" type="text/javascript"></script>
<script src="GeoExt/lib/GeoExt.js" type="text/javascript"></script>
<link rel="stylesheet" type="text/css" href="GeoExt/resources/geoext-all-debug.css"></link>

<script type="text/javascript">
    Ext.onReady(function() {

        var map = new OpenLayers.Map();
        var layer = new OpenLayers.Layer.WMS(
            "Global Imagery",
            "http://localhost:8090/geoserver/Test/wms?service=WMS&version=1.1.0&request=GetMap&layers=Test:B901_AS&styles=&bbox=638500.0,5309500.0,639000.0,5310000.0&width=512&height=512&srs=EPSG:4326&format=application/openlayers",
            {layers: "bluemarble"}
        );
        map.addLayer(layer);

        new GeoExt.MapPanel({
            renderTo: 'gxmap',
            height: 400,
            width: 600,
            map: map,
            title: 'A Simple GeoExt Map'
        });
    });
</script>
</head>
<body>
<div id="gxmap"></div>
</body>
</html>

What is the problem? Pls help me.

share|improve this question
1  
Indeed, what is the problem? Exactly what goes wrong? –  whuber Jul 25 '12 at 15:32
add comment

1 Answer 1

Your projections are wrong.

bbox=638500.0,5309500.0,639000.0,5310000.0&width=512&height=512&srs=EPSG:4326

says that you want a map in lat/lon (epsg:4326) while your bounding box says that you want a map in meters (? epsg:900913?). GeoServer has given you exactly what you asked for - a very small map somewhere in the lower left corner (-180,-90 180,90) of the larger image requested.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.