On Sep 14, 2010, at 7:30 PM, ext Rick Wayne 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"; > [ 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.
OpenLayers only knows about EPSG:4326 and EPSG:900913 by default. For anything else, you need proj4js. -- Chris _______________________________________________ Users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/openlayers-users
