[OpenLayers-Users] WMS layers and Gmaps V3 with OL 2.9.1

Bart van den Eijnden bartvde at osgis.nl
Sun Aug 29 04:12:06 EDT 2010


There is not Google V3 support in 2.9.1.

Try 2.10 RC1.

Best regards,
Bart

-- 
Looking for flexible support on OpenLayers or GeoExt? Please check out http://www.osgis.nl/support.html

Bart van den Eijnden
OSGIS
bartvde at osgis.nl

On Aug 29, 2010, at 6:38 AM, P Kishor wrote:

> I have the following, simplest possible code. Works without gmaps
> layer, but no WMS shows up when gmaps layer is included. What is it
> that I am doing wrong?
> 
>    <script type="text/javascript">
>        function init(){
>            var lon = -90.397;
>            var lat = 45.93;
>            var zoom = 5;
>            var map = new OpenLayers.Map( 'map' );
>            var layer = new OpenLayers.Layer.WMS(
>                "OpenLayers WMS",
>                "http://labs.metacarta.com/wms/vmap0",
>                {layers: 'basic'}
>            );
> 
>            var counties = new OpenLayers.Layer.WMS(
>                "Counties",
> 
> "http://mapserv.ssec.wisc.edu/cgi-bin/mapserv?map=/opt/fgs/www/htdocs/research/Projects/LakesTSI/lakestsi2.map",
>                {
>                    layers: "Counties",
>                    map_imagetype: "agga",
>                    transparent: true,
>                    reproject: true,
>                    singleTile: true
>                }
>            );
> 
>            var gphy = new OpenLayers.Layer.Google(
>                "Google Physical",
>                {type: google.maps.MapTypeId.TERRAIN}
>            );
> 
>            // the following doesn't work
>            map.addLayers([gphy, counties]);
> 
>            // the following works fine
>            map.addLayers([layer, counties]);
> 
>            map.setCenter(new OpenLayers.LonLat(lon, lat).transform(
>            	new OpenLayers.Projection("EPSG:4326"),
>            	map.getProjectionObject()
>        	), zoom);
> 
>            map.addControl( new OpenLayers.Control.LayerSwitcher() );
>        }
>    </script>
> 
> -- 
> Puneet Kishor
> _______________________________________________
> Users mailing list
> Users at openlayers.org
> http://openlayers.org/mailman/listinfo/users
> 




More information about the Users mailing list