On Wed, Sep 15, 2010 at 1:30 AM, Rick Wayne <[email protected]> wrote: > So I've got this set of 72 bounding boxes, laboriously constructed by hand > from maps being displayed as EPSG:3071. > I want to zoom a map built on Google layers using them. So, thought I, > "transform", that's the ticket. > Only...nothing seems to be transforming. > var google_srs = "EPSG:900913"; > var wisconsin_srs = "EPSG:3071";
Rick, I had the darndest time getting 3071 work with 900913. I have a few notes that can help you, but in the meantime, I would suggest that you ditch the thoughts of projecting in the browser (for now), and instead, do your projection on the server side and send the correct projection to the client. As you know by now, OL can only handle 900913 and 4326. So, convert your 3071 layers to one of those and get going. > [ many many lines...] > var bounds = new OpenLayers.Bounds(llx,lly,urx,ury); > // unfortunately these are in EPSG:3071 and need to be transformed to > GMap coords > var proj = new OpenLayers.Projection(wisconsin_srs); > var map_proj = new OpenLayers.Projection(google_srs); > bounds.transform(proj,map_proj); > At the end of this snippet, bounds appears to be completely unchanged. And > so when I zoom to it, I of course get dunked in the ocean off southeast > Africa instead of landing among the cows and pastures of a county in > Wisconsin. > Clues? I has none. > Thx, > rw > _______________________________________________ > Users mailing list > [email protected] > http://lists.osgeo.org/mailman/listinfo/openlayers-users > > -- Puneet Kishor http://www.punkish.org Carbon Model http://carbonmodel.org Charter Member, Open Source Geospatial Foundation http://www.osgeo.org Science Commons Fellow, http://sciencecommons.org/about/whoweare/kishor Nelson Institute, UW-Madison http://www.nelson.wisc.edu ----------------------------------------------------------------------- Assertions are politics; backing up assertions with evidence is science ======================================================================= _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
