Horst Walter Horst Walter - 4 months ago 39
Javascript Question

Magnetic declination in JavaScript / Google Maps

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 JS, 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)


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