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.

I am tring to overlay my WMS layer on Google but at a particular scale it doesn't show the data of my layer. What can be the problem?

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>Untitled Page</title>
    <script type="text/javascript" src="http://maps.google.com/maps/api/js?v=2&amp;sensor=false"></script>
    <script type="text/javascript" src="http://openlayers.org/api/OpenLayers.js"></script>
    <script type="text/javascript">
        var map;
        function init() {
            map = new OpenLayers.Map('map', { allOverlays: true });
            map.addControl(new OpenLayers.Control.LayerSwitcher());
            var gmap = new OpenLayers.Layer.Google("Google Streets");
            var wms = new OpenLayers.Layer.WMS("OpenLayers WMS", "http://localhost:5555/geoserver/cite/wms",
            {
                layers: 'cite:view_test',
                transparent: true,
                projection: "EPSG:4326"
            });
            map.addLayers([gmap, wms]);
            map.zoomToMaxExtent(); 
        }
</script>
</head>
<body onload='init();'>
    <div id='map' style='width: 500px; height: 500px; background-color:Gray'>
</div>
</body>
</html>

I am new to Openlayers: can anyone help me?

share|improve this question
3  
It may just be that the WMS has a style that does not show anything at certain scales. See docs.geoserver.org/latest/en/user/styling/sld-reference/… –  Andrea Aime Jun 23 '12 at 13:46
    
When we showing only WMS layer than this Problem is not arise, but it only happens when we try to overlay WMS on Google Map... –  ripalhiral Jun 25 '12 at 5:24
    
And we are using default point style...which dont have scales setting –  ripalhiral Jun 25 '12 at 9:29
    
What is the particular scale you're not seeing the data at? Is it a range, if so, can you specify it? –  Andrea Aime Jun 25 '12 at 12:13
add comment

Your Answer

 
discard

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

Browse other questions tagged or ask your own question.