Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magnetic declination in JavaScript / Google Maps [closed]

In the context of a Google Map JavaScript application, what is the best way to get the magnetic declination for a certain Lat/Lon?

  1. There seems to be no "easy" algorithm for that in JavaScript, or am I wrong?

  2. Is there a way with Google Maps API to determine this, I haven't found one...

  3. A Web Service which can be used. I have found WebSites offering this, but no API.

  4. Also see here, there they use a JavaScript class for this (see comment)

like image 322
Horst Walter Avatar asked Jul 10 '11 12:07

Horst Walter


2 Answers

There do appear to be web services supplied by ngdc.noaa.gov.

Have a look at the documentation - http://www.ngdc.noaa.gov/geomag-web/calculators/declinationHelp

E.g.

http://www.ngdc.noaa.gov/geomag-web/calculators/calculateDeclination?lat1=40&lon1=-105.25&resultFormat=xml

like image 64
Daniel Ballinger Avatar answered Sep 21 '22 23:09

Daniel Ballinger


They have shard this. For Google maps mashup with source see:-

http://www.bdcc.co.uk/Gmaps/Services.htm

like image 22
QuentinUK Avatar answered Sep 21 '22 23:09

QuentinUK