From: Jon B. <jon...@go...> - 2010-10-25 16:00:18
|
I'm using 2.10. I've solved that problem now, but my transformation still isn't working. I've included the proj4js.js library in my project, but the result is always in EPSG:4326 (I'm trying to project to EPSG:32630). I assume the problem is that proj4js isn't finding the projection. I read Proj4js user guide and it says that it will lookup the projection code on spatialreference.org but this doesn't seem to be happening... Does anybody know how to use proj4js with OpenLayers? My GWT/JavaScript method is below. Cheers, private static native JavaScriptObject reproject(double minX, double minY, double maxX, double maxY, String source, String dest)/*-{ var bounds = new $wnd.OpenLayers.Bounds(minX, minY, maxX, maxY); var sourceProj = new $wnd.OpenLayers.Projection(source); var destProj = new $wnd.OpenLayers.Projection(dest); bounds.transform(sourceProj, destProj); return bounds; }-*/; On 21 October 2010 14:02, <tin...@ar...> wrote: > Hey Jon, > > the Openlayers.js contains the function transform in the class > Openlayers.Bounds. It uses the Projection-class and it should be working. > Which version do you use? > > > ----- Original Nachricht ---- > Von: Jon Britton <jon...@go...> > An: tin...@ar... > Datum: 21.10.2010 13:13 > Betreff: Re: [Gwt-openlayers-users] Projection supported? > > > What I really need is the transform method for the Bounds class. I've > been > > trying to implement it in pure JavaScript but can't get it to work (it > > keeps > > telling me my Bounds object doesn't have a "transform" function). > > > > Jon > > > > On 21 October 2010 09:33, <tin...@ar...> wrote: > > > > > Hi Jon, > > > > > > the method transform isn't implemented yet. I have made it myself and > it > > > works. I have ask the admins of the openlayers-gwt-project for > > > code-contribution, but to date I have no answer. I can send you the > > > source-code if you like. > > > > > > regards > > > > > > Tino > > > > > > > > > ----- Original Nachricht ---- > > > Von: Jon Britton <jon...@go...> > > > An: gwt-openlayers-users > > <gwt...@li...> > > > Datum: 20.10.2010 14:18 > > > Betreff: [Gwt-openlayers-users] Projection supported? > > > > > > > Hi, > > > > Is the Projection class supported in gwt-openlayers? I can't seem to > > > find > > > > the transform methods. > > > > Thanks, > > > > Jon > > > > > > > > > > > > -------------------------------- > > > > > > > > > > > > > > ---------------------------------------------------------------------------- > > > > > > -- > > > > Download new Adobe(R) Flash(R) Builder(TM) 4 > > > > The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly > > > > Flex(R) Builder(TM)) enable the development of rich applications that > > run > > > > across multiple browsers and platforms. Download your free trials > > today! > > > > http://p.sf.net/sfu/adobe-dev2dev > > > > > > > > -------------------------------- > > > > > > > > _______________________________________________ > > > > Gwt-openlayers-users mailing list > > > > Gwt...@li... > > > > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > > > > > > > > > > > > > > > ---------------------------------------------------------------------------- > > -- > > > Nokia and AT&T present the 2010 Calling All Innovators-North America > > > contest > > > Create new apps & games for the Nokia N8 for consumers in U.S. and > > Canada > > > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > > > marketing > > > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi > Store > > > http://p.sf.net/sfu/nokia-dev2dev > > > _______________________________________________ > > > Gwt-openlayers-users mailing list > > > Gwt...@li... > > > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > > > > > > > > ------------------------------------------------------------------------------ > Nokia and AT&T present the 2010 Calling All Innovators-North America > contest > Create new apps & games for the Nokia N8 for consumers in U.S. and Canada > $10 million total in prizes - $4M cash, 500 devices, nearly $6M in > marketing > Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store > http://p.sf.net/sfu/nokia-dev2dev > _______________________________________________ > Gwt-openlayers-users mailing list > Gwt...@li... > https://lists.sourceforge.net/lists/listinfo/gwt-openlayers-users > |