<div dir="ltr"><div>Thank you Gery and Phil!<br><br></div><div>Passing the Google projection on the constructor options fixed the issue. Something as simple as:<br><br><span style="font-family:courier new,monospace"> var options = {<br>
projection: "EPSG:900913" <br> };<br> <br> map = new OpenLayers.Map('map', options);</span><br><br></div><div>made all the difference: now maxExtent has a utm value as it should and WMS overlay is rendered in all zoom levels.<br>
</div><div><br></div><div>Last note: it believe it wouldn't hurt if openlayers examples that use google maps made use of this projection parameter too since this is required...<br></div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Sun, Apr 21, 2013 at 6:30 PM, Phil Scadden <span dir="ltr"><<a href="mailto:p.scadden@gns.cri.nz" target="_blank">p.scadden@gns.cri.nz</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF"><div class="im">
function test1() {<br>
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div><span style="font-family:courier new,monospace">
var bounds = new OpenLayers.Bounds(-3785006.7128486,
2429373.3721214, 3729058.9146514, 8064922.5927464);<br>
var maxExtent = new OpenLayers.Bounds(-180, -90,
180, 90);<br>
var worldBounds = new
OpenLayers.Bounds(-20037508.34, -20037508.34,
20037508.34, 20037508.34);<br>
<br>
if (bounds.intersectsBounds(maxExtent, {inclusive:
false, worldBounds: worldBounds})) {<br>
return "Intersected";<br>
} <br>
<br>
return "Not intersected";<br>
}</span></div>
</div>
</div>
</div>
</div>
</blockquote>
<br></div>
Hmm, I cant see how this would work when you have bounds in
different projections. I always explicitly set projections and
maxExtent in my map options. Can you verify that the OL thinks the
map projection is 900913?<br>
<div>
<div style="border-top:solid 1px black;border-bottom:solid 1px black;padding:10px 0;margin:20px 0;font-size:8pt;font-family:Verdana,Arial,Helvetica,sans-serif">Notice: This email and any attachments are confidential. If received in error please destroy and immediately notify us. Do not copy or disclose the contents.<br>
</div>
</div>
</div>
<br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.osgeo.org">Users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/openlayers-users" target="_blank">http://lists.osgeo.org/mailman/listinfo/openlayers-users</a><br>
<br></blockquote></div><br></div>