Thanks guys. But now I'm having issues loading and running Proj4js.
I'm seeing some contradictory dox.
On the openlayers wiki, I see the following:
Proj.4
The Proj.4 home page can be found here. And the javascript
implementation is here. Sample of usage of Proj4s can be found
there as well. But OpenLayers integrates with Proj4js if the library
is available. This will make using it a bit easier. Having it in the
same folder as OpenLayers.js will make it available.
OK...what does this mean, exactly? What does the "it" in the phrase
"Having it in the same folder" refer to? Just proj4js-combined.js?
Everything in the "lib" folder for proj4js? And do "integates with"
and "make it available" mean you don't have to include a <script> tag
for it? If you do need a script tag, does it go before or after the
openlayers tag?
I've tried multiple combinations of these things. Either I get
"Proj4js is not defined" when I try to explicitly instantiate a
Proj4js.Proj object, or nothing happens to the Bounds object when I
transform it using OpenLayers.Projection objects (as Andreas implies
to be the correct usage here.) I've tried EPSG:4326 as the destination
projection, just in case EPSG:900913 wasn't included.
So what's the scoop on using Proj4js.Proj vs. OpenLayers.Projection?
And what should my script tags look like? I'll be more than happy to
update the openlayers Trac wiki once I have something working!
Thanks for your help and your patience,
rw
On Sep 14, 2010, at 9:27 PM, Cédric MOULLET wrote:
Hi,
Have you loaded the proj4js library (http://trac.osgeo.org/proj4js/wiki/Download
) ?
Cédric
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";
[ 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
--
Welcome to my world: http://www.cedricmoullet.com/
My Linked In profile: http://www.linkedin.com/in/cedricmoullet
Twitter: http://twitter.com/cedricmoullet
Home sweet home:
http://map.geo.admin.ch/?crosshair=bowl&zoom=11&X=185241.24219&Y=561288.90625&bgOpacity=0&selectedNode=node_ch.swisstopo.fixpunkte-lage1
_______________________________________________
Users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/openlayers-users