APPinAIR APPinAIR - 1 year ago 66
Javascript Question

AngularJS convert geo coordinates from Lambert 2 to WSG84

Now I have geo coordinates of Lambert 2, like this


In order to show this place in the google map, I need the related geo coordinates of WSG84, like this


Is there angularjs library which includes the this function ? Thanks in advance.

Answer Source

To realize the convertion of coordinates among different geodetic systems, I create this repo, angular-geo-converter. it is quite easy to use.

Add the script dependence of angular-geo-convert.js:

  <script src="angular-geo-converter.js"></script>

Add the module dependence in your root module of your angular application:


Call the service in your controller

    var coordinates = geoConverter.lambert2wgs(595833,2418928);
    var coordinateX = coordinates.latitude;    // result:48.7687954
    var coordinateY = coordinates.longitude;    // result:2.27984782

PS: The convertion in the answer of manzapanza is not correct.