<span class="gI">Hello,<br>I have a map. Base layer is standard google maps, SRS of map is EPSG:900913. I have a PostGIS database with Tiger state boundaries, native SRS is EPSG:4269.<br><br>I would like to overlay the tiger data on top of google maps.<br>
<br>Here is the entire HTML/Javascript snippet:<br><br><html xmlns="<a href="http://www.w3.org/1999/xhtml">http://www.w3.org/1999/xhtml</a>"><br> <head><br> <title>WMS Reprojection Example</title><br>
<script src="<a href="http://openlayers.org/api/OpenLayers.js">http://openlayers.org/api/OpenLayers.js</a>" type="text/javascript"></script><br> <script src="<a href="http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true_or_false&amp;key=ABQIAAAAo2c5r7VgSxo43IHrZeBAoBTWcxCzB35ZqF_ujzxzX_fuKZ1t-BRfAjPqLC0WSahNI2hYIsaJL6PKVA">http://maps.google.com/maps?file=api&amp;v=2&amp;sensor=true_or_false&amp;key=ABQIAAAAo2c5r7VgSxo43IHrZeBAoBTWcxCzB35ZqF_ujzxzX_fuKZ1t-BRfAjPqLC0WSahNI2hYIsaJL6PKVA</a>" type="text/javascript"></script><br>
<script defer="defer" type="text/javascript"><br> function init()<br> {<br> var mercator = new OpenLayers.Projection("EPSG:900913");<br> var geographic = new OpenLayers.Projection("EPSG:4269");<br>
var maxExt = new OpenLayers.Bounds( -20037508, -20037508, 20037508, 20037508 );<br><br> map = new OpenLayers.Map(<br> 'map',<br> {<br> projection: mercator,<br>
displayProjection: geographic,<br> units: 'm',<br> maxResolution: 156543.0039,<br> maxExtent: maxExt<br> }<br>
);<br><br> var googleLayer = new OpenLayers.Layer.Google(<br> "Google Layer",<br> {spericalMercator: true}<br> );<br><br> var wms = new OpenLayers.Layer.WMS(<br>
"State Boundaries WMS",<br> "<a href="http://localhost:8080/geoserver/wms">http://localhost:8080/geoserver/wms</a>",<br> {<br> layers: "state_boundaries",<br>
srs: 'EPSG:4269',<br> format:'image/png8',<br> transparent:'true',<br> tiled: 'true'<br> },<br>
{'isBaseLayer': false}/*,<br> { projection: "EPSG:4269" }*/<br> );<br><br> map.addLayer( googleLayer );<br><br> map.addLayer( wms );<br>
<br> var ddBounds = new OpenLayers.Bounds( -73.839111, 40.287907, -68.214111, 44.441624 );<br> map.zoomToExtent( ddBounds.transform(geographic, mercator) );<br> }<br>
</script><br> </head><br><br> <body onload="init()"><br> <div style="width:100%; height:100%; background-color: #99B3CC" id="map"></div><br> </body><br>
<br></html><br></span><br>An interesting point is.<br><br>All the WMS requests that are made to my local geoserver instance do in fact return blank tiles.<br><br>When I look at all the WMS requests there are google WMS requests and WMS requests to my local host for the "wms" layer. The local WMS requests look like this:<br>
<br><br><a href="http://localhost:8080/geoserver/wms?LAYERS=state_boundaries&STYLES=stateBoundaries&SRS=EPSG%3A900913&FORMAT=image%2Fpng8&TRANSPARENT=true&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=-88,32.9375,-85.1875,35.75&WIDTH=256&HEIGHT=256">http://localhost:8080/geoserver/wms?LAYERS=state_boundaries&STYLES=stateBoundaries&SRS=EPSG%3A900913&FORMAT=image%2Fpng8&TRANSPARENT=true&TILED=true&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&EXCEPTIONS=application%2Fvnd.ogc.se_inimage&BBOX=-88,32.9375,-85.1875,35.75&WIDTH=256&HEIGHT=256</a><br>
<br>Notice the SRS=EPSG%3A900913<br><br>When I change this URL to have SRS=EPSG%3A4269 I get snippets of state boundaries but they look stretched vertically.<br><br>Any thoughts/ideas?<br>thank you<br><br>-- <br>Signed,<br>
Alessandro Ferrucci<br>