BMcBride wrote:
> 
> 
> There are several issues going on here...
> 
> 1) You are trying to use Google v3 layers with OL v 2.9.1 and this is
> currently only implemented in the development version
> (http://openlayers.org/dev/OpenLayers.js).

I guess this means that I either have to specify an older OL version, or put
the dev one in my script tags as so:
<script src="http://openlayers.org/dev/OpenLayers.js";></script>

If that is the case, I have made the changes you have suggested to me and
still nothing :-/

Also, I do use firefox + firebug and do not get any errors from the
JavaScript...


Below is my script with the changes you suggested:

Thanks,

elshae


<html>
  <head>
    <link rel="stylesheet"
href="http://openlayers.org/api/theme/default/style.css"; type="text/css" />
    <link rel="stylesheet"
href="http://openlayers.org/dev/examples/style.css"; type="text/css" />
    <script src="http://openlayers.org/dev/OpenLayers.js";></script>
        <script type="text/javascript"
src="http://maps.google.com/maps/api/js?sensor=false";></script>
    <script type="text/javascript">
    
var map;

function init() {
    map = new OpenLayers.Map('map');
    map.addControl(new OpenLayers.Control.LayerSwitcher()); 
    
    // the SATELLITE layer has all 22 zoom level, so we add it first to
    // become the internal base layer that determines the zoom levels of the
    // map.
    var gsat = new OpenLayers.Layer.Google(
        "Google Satellite",
        {type: google.maps.MapTypeId.SATELLITE, numZoomLevels: 22}
    );

        map.addLayers(gsat);
        
    // Google.v3 uses EPSG:900913 as projection, so we have to
    // transform our coordinates
    map.setCenter(new OpenLayers.LonLat(10.2, 48.9).transform(
        new OpenLayers.Projection("EPSG:4326"),
        map.getProjectionObject()
    ), 5);

        
}
    </script>
  </head>

  <body onload="init()">
    <h1 id="title">OpenLayers: Google Layer Example</h1>
    <div id="map" class="smallmap" style="width: 1500; height: 500"></div>
  </body>

</html>
-- 
View this message in context: 
http://osgeo-org.1803224.n2.nabble.com/Geoserver-WMS-Layer-Does-Not-Display-tp5511643p5512344.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users

Reply via email to