[OpenLayers-Dev] OL 2.13.1 + latest Proj4js (?)

Andrea Battisti battisti at actgate.com
Fri Oct 4 06:33:24 PDT 2013


Il 03/10/13 21.11, Andreas Hocevar ha scritto:
> Hey,
>
> You'll have to add the following wrapper before you load projections
> from spatialreference.org <http://spatialreference.org> and before you
> load OpenLayers.js:
>
>      <script>
>          window.Proj4js = {
>              Proj: function(code) { return proj4(Proj4js.defs[code]); },
>              defs: proj4.defs,
>              transform: proj4
>          };
>      </script>
>
> This is all.
>
>

Andreas,

thanks for the quick reply, the above wrapper helps!

Just for the record for who might be interested, I noticed that the 
internal projection object
(as returned by: OpenLayers.Map.getProjectionObject().proj) has changed 
as well, so any code that was accessing its properties should be adapted.

-- 
Ing. Andrea Battisti



More information about the Dev mailing list