<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
I believe you cannot overlay EPSG:4269 on top of EPSG:900913 without
reprojection, because these are different coordinate systems.<br>
<br>
Google maps uses a fixed projection: spherical mercator (EPSG:900913
alias EPSG:3857 alias EPSG:102113). This projection cannot be
changed.<br>
Your openlayers code uses google maps as a base layer and thus will
send requests to overlay layers using the base layer projection
(epsg:900913). Google maps can only be used as base layer and so
your overlay layers must be made to support spherical mercator.<br>
<br>
If you want to overlay with some other dataset such as Tiger, you
should reproject the other dataset to spherical mercator. If the
source data is EPSG:4269, then you can either reproject on the fly
by adding a rendering projection in the map rendering software or
you should reproject the source data.<br>
<br>
The problem is not in openlayers but in the geoserver configuration,
where you should try to make the tiger data to render in
epsg:900913.<br>
<br>
Anne<br>
<br>
On 8/3/2010 3:58 PM, Alessandro Ferrucci wrote:
<blockquote
cite="mid:AANLkTi=uSgzcyqtanpHQJuoECjt0tGNo4t1oFRc_fadD@mail.gmail.com"
type="cite"><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 moz-do-not-send="true"
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 moz-do-not-send="true"
href="http://openlayers.org/api/OpenLayers.js">http://openlayers.org/api/OpenLayers.js</a>"
type="text/javascript"></script><br>
<script src="<a moz-do-not-send="true"
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 moz-do-not-send="true"
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 moz-do-not-send="true"
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>
<pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
Users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Users@openlayers.org">Users@openlayers.org</a>
<a class="moz-txt-link-freetext" href="http://openlayers.org/mailman/listinfo/users">http://openlayers.org/mailman/listinfo/users</a>
</pre>
</blockquote>
<br>
<div class="moz-signature"><br>
</div>
</body>
</html>