<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 10pt;
font-family:Tahoma
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>
<br>Hello,<br><br>I think you're right, projection has something to do there, this link may help you: http://blog.sonxurxo.com/2011/04/28/tutorial-de-openlayers-ii-capas-de-google/<br><br>There is a lot of stuff about google maps and openlayers and projection, just google them.<br><br>Hope this helps,<br><br><br><br><div><div id="SkyDrivePlaceholder"></div>> Date: Thu, 24 May 2012 13:37:52 -0400<br>> From: jdmorgan@unca.edu<br>> To: openlayers-users@lists.osgeo.org<br>> Subject: [OpenLayers-Users] wms layer over openstreet base map<br>> <br>> Hello,<br>> I am trying to get a wms states layer to overlay on a base openstreet <br>> map. The openstreet map shows up fine but the wms layer never does. I <br>> am guessing this is a projection issue but can't figure out how to <br>> resolve it. Any tips would be greatly appreciated. Here is my code:<br>> <br>> <!DOCTYPE HTML><br>> <html><br>> <head><br>> <title>OpenLayers Demo</title><br>> <style type="text/css"><br>> html, body, #basicMap {<br>> width: 100%;<br>> height: 100%;<br>> margin: 0;<br>> }<br>> </style><br>> <script src="http://www.openlayers.org/api/OpenLayers.js"></script><br>> <script><br>> function init() {<br>> <br>> map = new OpenLayers.Map("basicMap", {projection: "EPSG:900913"});<br>> var mapnik = new OpenLayers.Layer.OSM();<br>> var fromProjection = new OpenLayers.Projection("EPSG:4326"); <br>> // Transform from WGS 1984<br>> var toProjection = new OpenLayers.Projection("EPSG:900913"); <br>> // to Spherical Mercator Projection<br>> var position = new OpenLayers.LonLat(-98.0859375, <br>> 39.095962936305476).transform(fromProjection, toProjection);<br>> var zoom = 5;<br>> <br>> var stateMap = new OpenLayers.Layer.WMS(<br>> 'States',<br>> 'http://pathToWMSlayer/vlayers',<br>> {layers: 'states', transparent: true}<br>> {<br>> isBaseLayer: false,<br>> }<br>> );<br>> <br>> map.addLayers([mapnik, stateMap]);<br>> map.setCenter(position, zoom);<br>> }<br>> </script><br>> </head><br>> <body onload="init();"><br>> <div id="basicMap"></div><br>> </body><br>> </html><br>> <br>> <br>> Thanks ahead of time,<br>> Derek<br>> _______________________________________________<br>> Users mailing list<br>> Users@lists.osgeo.org<br>> http://lists.osgeo.org/mailman/listinfo/openlayers-users<br></div>                                            </div></body>
</html>