Ok, so it sounds to me like the "right" way to do this would be to follow Bob's suggestion and use some middleware piece to do the reprojection -- that way I wouldn't need to worry about the distortion?
- Ray Dominik Mikiewicz wrote: > > Yeah, I should have added - large scales are fine (> 1m, 500k), small are > distorted. > > -----Original Message----- > From: andreas.hoce...@gmail.com [mailto:andreas.hoce...@gmail.com] On > Behalf > Of Andreas Hocevar > Sent: Friday, May 20, 2011 9:26 AM > To: Dominik Mikiewicz > Cc: Ray Di Ciaccio; openlayers-dev@lists.osgeo.org > Subject: Re: [OpenLayers-Dev] WMS request mod > > This approach will only work well for tiles that are near the equator, > or don't span over a wide range of latitudes. It is basically the same > thing that happens when you use the not recommended reproject: true > option for Layer.WMS. > > Andreas. > > On Fri, May 20, 2011 at 8:54 AM, Dominik Mikiewicz > <dominikmikiew...@o2.pl> wrote: >> This should work just fine. There won't be a serious performance hit > either as you only recalculate bbox and change srs on the clientside. I do > it quite often and even extended a wms layer class so I can quickly set up > my 4326 layers to work with spherical Mercator. >> However you may experience some issues with tile caching as sometimes the > precision may vary from browser to browser. Another thing is the > getFeatureInfo request - make sure you send correct cords if you are going > to use it. >> dom >> >> -----Original Message----- >> From: openlayers-dev-boun...@lists.osgeo.org > [mailto:openlayers-dev-boun...@lists.osgeo.org] On Behalf Of Ray Di > Ciaccio >> Sent: Thursday, May 19, 2011 6:00 PM >> To: openlayers-dev@lists.osgeo.org >> Subject: [OpenLayers-Dev] WMS request mod >> >> Sorry for the previous messed up message. Let me try this again: >> >> Hi all, >> >> I'm in what I'm guessing is a fairly common situation -- I'm using >> Google Maps as my baselayer (so map is in EPSG:9009l3 projection) and >> I'm trying to load an overlay from a WMS which I have no control over. >> It only offers data in EPSG:4326. The WMS request generated by >> OpenLayers will be for CRS=EPSG:900913 and the BBOX values will be in >> EPSG:900913. This obviously won't work if the WMS only offers EPSG:4326. >> My solution to this problem was to override >> OpenLayers.Layer.WMS.getFullRequestString() so that it uses the >> projection that I set for that particular layer -- it changes the >> CRS/SRS param to whatever the layer projection is, and it transforms the >> BBOX values from the map projection to the layer's projection. This way >> I get a valid request for the WMS and it's loaded in the correct >> location on the basemap. My question is whether this is the right >> approach to this situation and whether there may be unforeseen >> repercussions to these changes I made. >> >> Thanks! >> - Ray >> >> -- >> Ray Di Ciaccio >> MIT LL, Group 42 >> 781-981-2024 >> ray.diciac...@ll.mit.edu >> >> _______________________________________________ >> Dev mailing list >> d...@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/openlayers-dev >> >> _______________________________________________ >> Dev mailing list >> d...@lists.osgeo.org >> http://lists.osgeo.org/mailman/listinfo/openlayers-dev >> > > > > -- > Andreas Hocevar > OpenGeo - http://opengeo.org/ > Expert service straight from the developers. > > _______________________________________________ > Dev mailing list > d...@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/openlayers-dev > -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/WMS-request-mod-tp6382611p6386429.html Sent from the OpenLayers Dev mailing list archive at Nabble.com. _______________________________________________ Dev mailing list d...@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/openlayers-dev