Using Proj4js with OpenLayers to transform lat lng from 4326 to 27700 but coming out unchangedUsing Proj4js in Openlayers - Proj4js is not definedOpenLayers/proj4js and the EPSG:27700 (UK) ProjectionOpenLayers transform EPSG 27700 coordinate to Google 900913Problems with features, popups and strategy with OpenLayersOpenLayers.Bounds transform not working as expectedGet Lat & Lng from GeoDjango OSMGeoAdminOpenlayers Transform not transforming a point from EPSG 27700 to EPSG 4326Using Proj4js in Openlayers - Proj4js is not definedUsing OSGB (ESPG: 27700) projection in Openlayers with MousePositionOpenLayers and proj4js.defs() - why does one custom projection work and not the other?Problem on changing the EPSG:3376 to EPSG:4326 using Proj4js

What is the maximum number of net attacks that one can make in a round?

How does an ordinary object become radioactive?

How come the nude protesters were not arrested?

Meaning of 'lose their grip on the groins of their followers'

How can this tool find out registered domains from an IP?

Wooden cooking layout

Cascading Switches. Will it affect performance?

How do I prevent employees from either switching to competitors or opening their own business?

SQL counting distinct over partition

How did old MS-DOS games utilize various graphic cards?

How to handle self harm scars on the arm in work environment?

Are there any important biographies of nobodies?

How can I end combat quickly when the outcome is inevitable?

Soft question: Examples where lack of mathematical rigour cause security breaches?

Check if three arrays contains the same element

When would it be advantageous not apply Training Ground's cost reduction?

How to hide an urban landmark?

Is White controlling this game?

What speaks against investing in precious metals?

Does the Long March-11 increase its thrust after clearing the launch tower?

Playing a Character as Unobtrusive and Subservient, Yet Not Passive

Why didn't Voldemort recognize that Dumbledore was affected by his curse?

Should I give professor gift at the beginning of my PhD?

How do governments keep track of their issued currency?



Using Proj4js with OpenLayers to transform lat lng from 4326 to 27700 but coming out unchanged


Using Proj4js in Openlayers - Proj4js is not definedOpenLayers/proj4js and the EPSG:27700 (UK) ProjectionOpenLayers transform EPSG 27700 coordinate to Google 900913Problems with features, popups and strategy with OpenLayersOpenLayers.Bounds transform not working as expectedGet Lat & Lng from GeoDjango OSMGeoAdminOpenlayers Transform not transforming a point from EPSG 27700 to EPSG 4326Using Proj4js in Openlayers - Proj4js is not definedUsing OSGB (ESPG: 27700) projection in Openlayers with MousePositionOpenLayers and proj4js.defs() - why does one custom projection work and not the other?Problem on changing the EPSG:3376 to EPSG:4326 using Proj4js






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty margin-bottom:0;








2















Using Proj4js to transform lat lng from 4326 to 27700 but coming out unchanged. I am using OpenLayers 2.12 (OS API Leisure map) EPSG 27700, Proj4js (CDN)



I have added the definition to proj4



epsg4326 = new OpenLayers.Projection("EPSG:4326"); //WGS 1984 projection 
// To
proj4.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");
EPSG27700 = new OpenLayers.Projection("EPSG:27700");


var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(epsg4326, EPSG27700);
console.log(lonLat);


lonLat is coming out as  lon: -0.1279688, lat: 51.5077286 so unchanged.



I think I'm missing a trick.










share|improve this question






























    2















    Using Proj4js to transform lat lng from 4326 to 27700 but coming out unchanged. I am using OpenLayers 2.12 (OS API Leisure map) EPSG 27700, Proj4js (CDN)



    I have added the definition to proj4



    epsg4326 = new OpenLayers.Projection("EPSG:4326"); //WGS 1984 projection 
    // To
    proj4.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");
    EPSG27700 = new OpenLayers.Projection("EPSG:27700");


    var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(epsg4326, EPSG27700);
    console.log(lonLat);


    lonLat is coming out as  lon: -0.1279688, lat: 51.5077286 so unchanged.



    I think I'm missing a trick.










    share|improve this question


























      2












      2








      2








      Using Proj4js to transform lat lng from 4326 to 27700 but coming out unchanged. I am using OpenLayers 2.12 (OS API Leisure map) EPSG 27700, Proj4js (CDN)



      I have added the definition to proj4



      epsg4326 = new OpenLayers.Projection("EPSG:4326"); //WGS 1984 projection 
      // To
      proj4.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");
      EPSG27700 = new OpenLayers.Projection("EPSG:27700");


      var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(epsg4326, EPSG27700);
      console.log(lonLat);


      lonLat is coming out as  lon: -0.1279688, lat: 51.5077286 so unchanged.



      I think I'm missing a trick.










      share|improve this question
















      Using Proj4js to transform lat lng from 4326 to 27700 but coming out unchanged. I am using OpenLayers 2.12 (OS API Leisure map) EPSG 27700, Proj4js (CDN)



      I have added the definition to proj4



      epsg4326 = new OpenLayers.Projection("EPSG:4326"); //WGS 1984 projection 
      // To
      proj4.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");
      EPSG27700 = new OpenLayers.Projection("EPSG:27700");


      var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(epsg4326, EPSG27700);
      console.log(lonLat);


      lonLat is coming out as  lon: -0.1279688, lat: 51.5077286 so unchanged.



      I think I'm missing a trick.







      openlayers-2 proj4js






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited May 22 at 12:37









      Ian Turton

      51.3k548121




      51.3k548121










      asked May 22 at 12:24









      Simon JeffsSimon Jeffs

      111




      111




















          3 Answers
          3






          active

          oldest

          votes


















          2














          transform converts the point in place so no new point is returned. See the documentation:




          Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first.




          So you want something like:



           var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286);
          lonLat.transform(epsg4326, EPSG27700);
          console.log(lonLat);





          share|improve this answer























          • The transformation is in place, but it still returns the result, for example in map.setCenter(new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()));

            – Mike
            May 22 at 13:06











          • Thanks for the tip, however both still output the original lat/lng

            – Simon Jeffs
            May 22 at 13:28


















          1














          OpenLayers 2 uses an earlier proj4 (version 1.1.0) syntax:



          Proj4js.defs["EPSG:27700"] = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs ";


          or with proj4 version 2:



          <!doctype html>
          <html lang="en">
          <head>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4.js"></script>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.min.js"></script>
          </head>
          <body>
          <script type="text/javascript">

          window.Proj4js =
          Proj: function(code)
          return proj4(Proj4js.defs[code]);
          ,
          defs: proj4.defs,
          transform: proj4
          ;

          proj4.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");

          var epsg4326 = new OpenLayers.Projection("EPSG:4326");
          var EPSG27700 = new OpenLayers.Projection("EPSG:27700");

          var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(epsg4326, EPSG27700);
          alert(lonLat.lon + ' ' + lonLat.lat);

          </script>
          </body>
          </html>





          share|improve this answer

























          • If you are using the OS API some transforms are built in openspace.ordnancesurvey.co.uk/docs/4.0.0/files/OpenSpace/…

            – Mike
            May 22 at 12:58











          • We were using the openspace api but are migrating to the OS API apidocs.os.uk/docs/os-maps-overview so have to remove the OpenSpace reference

            – Simon Jeffs
            May 22 at 13:06











          • see also gis.stackexchange.com/questions/120021/…

            – Mike
            May 22 at 13:32


















          0














          Ok, I figured out my issue. I looked at the post Mike shared Using Proj4js in Openlayers - Proj4js is not defined and tried the example code in my project which still failed. That narrowed it down to the js references. So I copied the references and et voila; success!



          My references:
          https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4-src.js
          https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.min.js



          Changed to:
          https://cdnjs.cloudflare.com/ajax/libs/proj4js/1.1.0/proj4js-compressed.min.js
          https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js



          Note that it worked with both versions of OpenLayers js file but not when using 2.5.0.



          Thanks to Ian and Mike for helping!






          share|improve this answer























          • 2..5.0 is working for me. I've added the code to my answer.

            – Mike
            May 22 at 16:23











          • Working with mine now too. Thanks Mike!

            – Simon Jeffs
            May 23 at 10:46











          Your Answer








          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "79"
          ;
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function()
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled)
          StackExchange.using("snippets", function()
          createEditor();
          );

          else
          createEditor();

          );

          function createEditor()
          StackExchange.prepareEditor(
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader:
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          ,
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );













          draft saved

          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f323552%2fusing-proj4js-with-openlayers-to-transform-lat-lng-from-4326-to-27700-but-coming%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown

























          3 Answers
          3






          active

          oldest

          votes








          3 Answers
          3






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes









          2














          transform converts the point in place so no new point is returned. See the documentation:




          Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first.




          So you want something like:



           var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286);
          lonLat.transform(epsg4326, EPSG27700);
          console.log(lonLat);





          share|improve this answer























          • The transformation is in place, but it still returns the result, for example in map.setCenter(new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()));

            – Mike
            May 22 at 13:06











          • Thanks for the tip, however both still output the original lat/lng

            – Simon Jeffs
            May 22 at 13:28















          2














          transform converts the point in place so no new point is returned. See the documentation:




          Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first.




          So you want something like:



           var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286);
          lonLat.transform(epsg4326, EPSG27700);
          console.log(lonLat);





          share|improve this answer























          • The transformation is in place, but it still returns the result, for example in map.setCenter(new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()));

            – Mike
            May 22 at 13:06











          • Thanks for the tip, however both still output the original lat/lng

            – Simon Jeffs
            May 22 at 13:28













          2












          2








          2







          transform converts the point in place so no new point is returned. See the documentation:




          Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first.




          So you want something like:



           var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286);
          lonLat.transform(epsg4326, EPSG27700);
          console.log(lonLat);





          share|improve this answer













          transform converts the point in place so no new point is returned. See the documentation:




          Transform the LonLat object from source to dest. This transformation is in place: if you want a new lonlat, use .clone() first.




          So you want something like:



           var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286);
          lonLat.transform(epsg4326, EPSG27700);
          console.log(lonLat);






          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 22 at 12:36









          Ian TurtonIan Turton

          51.3k548121




          51.3k548121












          • The transformation is in place, but it still returns the result, for example in map.setCenter(new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()));

            – Mike
            May 22 at 13:06











          • Thanks for the tip, however both still output the original lat/lng

            – Simon Jeffs
            May 22 at 13:28

















          • The transformation is in place, but it still returns the result, for example in map.setCenter(new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()));

            – Mike
            May 22 at 13:06











          • Thanks for the tip, however both still output the original lat/lng

            – Simon Jeffs
            May 22 at 13:28
















          The transformation is in place, but it still returns the result, for example in map.setCenter(new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()));

          – Mike
          May 22 at 13:06





          The transformation is in place, but it still returns the result, for example in map.setCenter(new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(new OpenLayers.Projection("EPSG:4326"), map.getProjectionObject()));

          – Mike
          May 22 at 13:06













          Thanks for the tip, however both still output the original lat/lng

          – Simon Jeffs
          May 22 at 13:28





          Thanks for the tip, however both still output the original lat/lng

          – Simon Jeffs
          May 22 at 13:28













          1














          OpenLayers 2 uses an earlier proj4 (version 1.1.0) syntax:



          Proj4js.defs["EPSG:27700"] = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs ";


          or with proj4 version 2:



          <!doctype html>
          <html lang="en">
          <head>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4.js"></script>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.min.js"></script>
          </head>
          <body>
          <script type="text/javascript">

          window.Proj4js =
          Proj: function(code)
          return proj4(Proj4js.defs[code]);
          ,
          defs: proj4.defs,
          transform: proj4
          ;

          proj4.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");

          var epsg4326 = new OpenLayers.Projection("EPSG:4326");
          var EPSG27700 = new OpenLayers.Projection("EPSG:27700");

          var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(epsg4326, EPSG27700);
          alert(lonLat.lon + ' ' + lonLat.lat);

          </script>
          </body>
          </html>





          share|improve this answer

























          • If you are using the OS API some transforms are built in openspace.ordnancesurvey.co.uk/docs/4.0.0/files/OpenSpace/…

            – Mike
            May 22 at 12:58











          • We were using the openspace api but are migrating to the OS API apidocs.os.uk/docs/os-maps-overview so have to remove the OpenSpace reference

            – Simon Jeffs
            May 22 at 13:06











          • see also gis.stackexchange.com/questions/120021/…

            – Mike
            May 22 at 13:32















          1














          OpenLayers 2 uses an earlier proj4 (version 1.1.0) syntax:



          Proj4js.defs["EPSG:27700"] = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs ";


          or with proj4 version 2:



          <!doctype html>
          <html lang="en">
          <head>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4.js"></script>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.min.js"></script>
          </head>
          <body>
          <script type="text/javascript">

          window.Proj4js =
          Proj: function(code)
          return proj4(Proj4js.defs[code]);
          ,
          defs: proj4.defs,
          transform: proj4
          ;

          proj4.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");

          var epsg4326 = new OpenLayers.Projection("EPSG:4326");
          var EPSG27700 = new OpenLayers.Projection("EPSG:27700");

          var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(epsg4326, EPSG27700);
          alert(lonLat.lon + ' ' + lonLat.lat);

          </script>
          </body>
          </html>





          share|improve this answer

























          • If you are using the OS API some transforms are built in openspace.ordnancesurvey.co.uk/docs/4.0.0/files/OpenSpace/…

            – Mike
            May 22 at 12:58











          • We were using the openspace api but are migrating to the OS API apidocs.os.uk/docs/os-maps-overview so have to remove the OpenSpace reference

            – Simon Jeffs
            May 22 at 13:06











          • see also gis.stackexchange.com/questions/120021/…

            – Mike
            May 22 at 13:32













          1












          1








          1







          OpenLayers 2 uses an earlier proj4 (version 1.1.0) syntax:



          Proj4js.defs["EPSG:27700"] = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs ";


          or with proj4 version 2:



          <!doctype html>
          <html lang="en">
          <head>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4.js"></script>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.min.js"></script>
          </head>
          <body>
          <script type="text/javascript">

          window.Proj4js =
          Proj: function(code)
          return proj4(Proj4js.defs[code]);
          ,
          defs: proj4.defs,
          transform: proj4
          ;

          proj4.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");

          var epsg4326 = new OpenLayers.Projection("EPSG:4326");
          var EPSG27700 = new OpenLayers.Projection("EPSG:27700");

          var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(epsg4326, EPSG27700);
          alert(lonLat.lon + ' ' + lonLat.lat);

          </script>
          </body>
          </html>





          share|improve this answer















          OpenLayers 2 uses an earlier proj4 (version 1.1.0) syntax:



          Proj4js.defs["EPSG:27700"] = "+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +datum=OSGB36 +units=m +no_defs ";


          or with proj4 version 2:



          <!doctype html>
          <html lang="en">
          <head>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4.js"></script>
          <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.min.js"></script>
          </head>
          <body>
          <script type="text/javascript">

          window.Proj4js =
          Proj: function(code)
          return proj4(Proj4js.defs[code]);
          ,
          defs: proj4.defs,
          transform: proj4
          ;

          proj4.defs("EPSG:27700","+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 +x_0=400000 +y_0=-100000 +ellps=airy +towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 +units=m +no_defs");

          var epsg4326 = new OpenLayers.Projection("EPSG:4326");
          var EPSG27700 = new OpenLayers.Projection("EPSG:27700");

          var lonLat = new OpenLayers.LonLat(-0.1279688, 51.5077286).transform(epsg4326, EPSG27700);
          alert(lonLat.lon + ' ' + lonLat.lat);

          </script>
          </body>
          </html>






          share|improve this answer














          share|improve this answer



          share|improve this answer








          edited May 22 at 16:21

























          answered May 22 at 12:54









          MikeMike

          3,025139




          3,025139












          • If you are using the OS API some transforms are built in openspace.ordnancesurvey.co.uk/docs/4.0.0/files/OpenSpace/…

            – Mike
            May 22 at 12:58











          • We were using the openspace api but are migrating to the OS API apidocs.os.uk/docs/os-maps-overview so have to remove the OpenSpace reference

            – Simon Jeffs
            May 22 at 13:06











          • see also gis.stackexchange.com/questions/120021/…

            – Mike
            May 22 at 13:32

















          • If you are using the OS API some transforms are built in openspace.ordnancesurvey.co.uk/docs/4.0.0/files/OpenSpace/…

            – Mike
            May 22 at 12:58











          • We were using the openspace api but are migrating to the OS API apidocs.os.uk/docs/os-maps-overview so have to remove the OpenSpace reference

            – Simon Jeffs
            May 22 at 13:06











          • see also gis.stackexchange.com/questions/120021/…

            – Mike
            May 22 at 13:32
















          If you are using the OS API some transforms are built in openspace.ordnancesurvey.co.uk/docs/4.0.0/files/OpenSpace/…

          – Mike
          May 22 at 12:58





          If you are using the OS API some transforms are built in openspace.ordnancesurvey.co.uk/docs/4.0.0/files/OpenSpace/…

          – Mike
          May 22 at 12:58













          We were using the openspace api but are migrating to the OS API apidocs.os.uk/docs/os-maps-overview so have to remove the OpenSpace reference

          – Simon Jeffs
          May 22 at 13:06





          We were using the openspace api but are migrating to the OS API apidocs.os.uk/docs/os-maps-overview so have to remove the OpenSpace reference

          – Simon Jeffs
          May 22 at 13:06













          see also gis.stackexchange.com/questions/120021/…

          – Mike
          May 22 at 13:32





          see also gis.stackexchange.com/questions/120021/…

          – Mike
          May 22 at 13:32











          0














          Ok, I figured out my issue. I looked at the post Mike shared Using Proj4js in Openlayers - Proj4js is not defined and tried the example code in my project which still failed. That narrowed it down to the js references. So I copied the references and et voila; success!



          My references:
          https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4-src.js
          https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.min.js



          Changed to:
          https://cdnjs.cloudflare.com/ajax/libs/proj4js/1.1.0/proj4js-compressed.min.js
          https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js



          Note that it worked with both versions of OpenLayers js file but not when using 2.5.0.



          Thanks to Ian and Mike for helping!






          share|improve this answer























          • 2..5.0 is working for me. I've added the code to my answer.

            – Mike
            May 22 at 16:23











          • Working with mine now too. Thanks Mike!

            – Simon Jeffs
            May 23 at 10:46















          0














          Ok, I figured out my issue. I looked at the post Mike shared Using Proj4js in Openlayers - Proj4js is not defined and tried the example code in my project which still failed. That narrowed it down to the js references. So I copied the references and et voila; success!



          My references:
          https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4-src.js
          https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.min.js



          Changed to:
          https://cdnjs.cloudflare.com/ajax/libs/proj4js/1.1.0/proj4js-compressed.min.js
          https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js



          Note that it worked with both versions of OpenLayers js file but not when using 2.5.0.



          Thanks to Ian and Mike for helping!






          share|improve this answer























          • 2..5.0 is working for me. I've added the code to my answer.

            – Mike
            May 22 at 16:23











          • Working with mine now too. Thanks Mike!

            – Simon Jeffs
            May 23 at 10:46













          0












          0








          0







          Ok, I figured out my issue. I looked at the post Mike shared Using Proj4js in Openlayers - Proj4js is not defined and tried the example code in my project which still failed. That narrowed it down to the js references. So I copied the references and et voila; success!



          My references:
          https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4-src.js
          https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.min.js



          Changed to:
          https://cdnjs.cloudflare.com/ajax/libs/proj4js/1.1.0/proj4js-compressed.min.js
          https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js



          Note that it worked with both versions of OpenLayers js file but not when using 2.5.0.



          Thanks to Ian and Mike for helping!






          share|improve this answer













          Ok, I figured out my issue. I looked at the post Mike shared Using Proj4js in Openlayers - Proj4js is not defined and tried the example code in my project which still failed. That narrowed it down to the js references. So I copied the references and et voila; success!



          My references:
          https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.5.0/proj4-src.js
          https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.12/OpenLayers.min.js



          Changed to:
          https://cdnjs.cloudflare.com/ajax/libs/proj4js/1.1.0/proj4js-compressed.min.js
          https://cdnjs.cloudflare.com/ajax/libs/openlayers/2.13.1/OpenLayers.js



          Note that it worked with both versions of OpenLayers js file but not when using 2.5.0.



          Thanks to Ian and Mike for helping!







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered May 22 at 15:17









          Simon JeffsSimon Jeffs

          111




          111












          • 2..5.0 is working for me. I've added the code to my answer.

            – Mike
            May 22 at 16:23











          • Working with mine now too. Thanks Mike!

            – Simon Jeffs
            May 23 at 10:46

















          • 2..5.0 is working for me. I've added the code to my answer.

            – Mike
            May 22 at 16:23











          • Working with mine now too. Thanks Mike!

            – Simon Jeffs
            May 23 at 10:46
















          2..5.0 is working for me. I've added the code to my answer.

          – Mike
          May 22 at 16:23





          2..5.0 is working for me. I've added the code to my answer.

          – Mike
          May 22 at 16:23













          Working with mine now too. Thanks Mike!

          – Simon Jeffs
          May 23 at 10:46





          Working with mine now too. Thanks Mike!

          – Simon Jeffs
          May 23 at 10:46

















          draft saved

          draft discarded
















































          Thanks for contributing an answer to Geographic Information Systems Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid


          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.

          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fgis.stackexchange.com%2fquestions%2f323552%2fusing-proj4js-with-openlayers-to-transform-lat-lng-from-4326-to-27700-but-coming%23new-answer', 'question_page');

          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Club Baloncesto Breogán Índice Historia | Pavillón | Nome | O Breogán na cultura popular | Xogadores | Adestradores | Presidentes | Palmarés | Historial | Líderes | Notas | Véxase tamén | Menú de navegacióncbbreogan.galCadroGuía oficial da ACB 2009-10, páxina 201Guía oficial ACB 1992, páxina 183. Editorial DB.É de 6.500 espectadores sentados axeitándose á última normativa"Estudiantes Junior, entre as mellores canteiras"o orixinalHemeroteca El Mundo Deportivo, 16 setembro de 1970, páxina 12Historia do BreogánAlfredo Pérez, o último canoneiroHistoria C.B. BreogánHemeroteca de El Mundo DeportivoJimmy Wright, norteamericano do Breogán deixará Lugo por ameazas de morteResultados de Breogán en 1986-87Resultados de Breogán en 1990-91Ficha de Velimir Perasović en acb.comResultados de Breogán en 1994-95Breogán arrasa al Barça. "El Mundo Deportivo", 27 de setembro de 1999, páxina 58CB Breogán - FC BarcelonaA FEB invita a participar nunha nova Liga EuropeaCharlie Bell na prensa estatalMáximos anotadores 2005Tempada 2005-06 : Tódolos Xogadores da Xornada""Non quero pensar nunha man negra, mais pregúntome que está a pasar""o orixinalRaúl López, orgulloso dos xogadores, presume da boa saúde económica do BreogánJulio González confirma que cesa como presidente del BreogánHomenaxe a Lisardo GómezA tempada do rexurdimento celesteEntrevista a Lisardo GómezEl COB dinamita el Pazo para forzar el quinto (69-73)Cafés Candelas, patrocinador del CB Breogán"Suso Lázare, novo presidente do Breogán"o orixinalCafés Candelas Breogán firma el mayor triunfo de la historiaEl Breogán realizará 17 homenajes por su cincuenta aniversario"O Breogán honra ao seu fundador e primeiro presidente"o orixinalMiguel Giao recibiu a homenaxe do PazoHomenaxe aos primeiros gladiadores celestesO home que nos amosa como ver o Breo co corazónTita Franco será homenaxeada polos #50anosdeBreoJulio Vila recibirá unha homenaxe in memoriam polos #50anosdeBreo"O Breogán homenaxeará aos seus aboados máis veteráns"Pechada ovación a «Capi» Sanmartín e Ricardo «Corazón de González»Homenaxe por décadas de informaciónPaco García volve ao Pazo con motivo do 50 aniversario"Resultados y clasificaciones""O Cafés Candelas Breogán, campión da Copa Princesa""O Cafés Candelas Breogán, equipo ACB"C.B. Breogán"Proxecto social"o orixinal"Centros asociados"o orixinalFicha en imdb.comMario Camus trata la recuperación del amor en 'La vieja música', su última película"Páxina web oficial""Club Baloncesto Breogán""C. B. Breogán S.A.D."eehttp://www.fegaba.com

          Vilaño, A Laracha Índice Patrimonio | Lugares e parroquias | Véxase tamén | Menú de navegación43°14′52″N 8°36′03″O / 43.24775, -8.60070

          Cegueira Índice Epidemioloxía | Deficiencia visual | Tipos de cegueira | Principais causas de cegueira | Tratamento | Técnicas de adaptación e axudas | Vida dos cegos | Primeiros auxilios | Crenzas respecto das persoas cegas | Crenzas das persoas cegas | O neno deficiente visual | Aspectos psicolóxicos da cegueira | Notas | Véxase tamén | Menú de navegación54.054.154.436928256blindnessDicionario da Real Academia GalegaPortal das Palabras"International Standards: Visual Standards — Aspects and Ranges of Vision Loss with Emphasis on Population Surveys.""Visual impairment and blindness""Presentan un plan para previr a cegueira"o orixinalACCDV Associació Catalana de Cecs i Disminuïts Visuals - PMFTrachoma"Effect of gene therapy on visual function in Leber's congenital amaurosis"1844137110.1056/NEJMoa0802268Cans guía - os mellores amigos dos cegosArquivadoEscola de cans guía para cegos en Mortágua, PortugalArquivado"Tecnología para ciegos y deficientes visuales. Recopilación de recursos gratuitos en la Red""Colorino""‘COL.diesis’, escuchar los sonidos del color""COL.diesis: Transforming Colour into Melody and Implementing the Result in a Colour Sensor Device"o orixinal"Sistema de desarrollo de sinestesia color-sonido para invidentes utilizando un protocolo de audio""Enseñanza táctil - geometría y color. Juegos didácticos para niños ciegos y videntes""Sistema Constanz"L'ocupació laboral dels cecs a l'Estat espanyol està pràcticament equiparada a la de les persones amb visió, entrevista amb Pedro ZuritaONCE (Organización Nacional de Cegos de España)Prevención da cegueiraDescrición de deficiencias visuais (Disc@pnet)Braillín, un boneco atractivo para calquera neno, con ou sen discapacidade, que permite familiarizarse co sistema de escritura e lectura brailleAxudas Técnicas36838ID00897494007150-90057129528256DOID:1432HP:0000618D001766C10.597.751.941.162C97109C0155020