In the context of a Google Map JavaScript application, what is the best way to get the magnetic declination for a certain Lat/Lon?
There seems to be no "easy" algorithm for that in JavaScript, or am I wrong?
Is there a way with Google Maps API to determine this, I haven't found one...
A Web Service which can be used. I have found WebSites offering this, but no API.
Also see here, there they use a JavaScript class for this (see comment)
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
They have shard this. For Google maps mashup with source see:-
http://www.bdcc.co.uk/Gmaps/Services.htm
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With