Search code examples
javascriptgoogle-mapsgeospatial

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


Solution

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

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