Thank you Gery and Phil! Passing the Google projection on the constructor options fixed the issue. Something as simple as:
var options = { projection: "EPSG:900913" }; map = new OpenLayers.Map('map', options); made all the difference: now maxExtent has a utm value as it should and WMS overlay is rendered in all zoom levels. 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... On Sun, Apr 21, 2013 at 6:30 PM, Phil Scadden <p.scad...@gns.cri.nz> wrote: > function test1() { > > var bounds = new OpenLayers.Bounds(-3785006.7128486, > 2429373.3721214, 3729058.9146514, 8064922.5927464); > var maxExtent = new OpenLayers.Bounds(-180, -90, 180, 90); > var worldBounds = new OpenLayers.Bounds(-20037508.34, -20037508.34, > 20037508.34, 20037508.34); > > if (bounds.intersectsBounds(maxExtent, {inclusive: false, worldBounds: > worldBounds})) { > return "Intersected"; > } > > return "Not intersected"; > } > > > 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? > 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. > > _______________________________________________ > Users mailing list > us...@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-users > >
_______________________________________________ Users mailing list us...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-users