Google-maps – Display one second latitude and longitude grid lines on Google Maps

google maps

Is there a way to display one second latitude and longitude grid lines on Google Maps?

Best Answer

There is a graticule script at https://github.com/myshen/google-maps-v3-earth-map-type/blob/master/graticule.3.js

A demo and possible the latest graticule v3 script version are at http://www.bdcc.co.uk/Gmaps/ll_grat_v3_demo.htm. Depending on your zoom level the latitude and longitude grid lines are drawn with more or less detail.

There is another version of the graticule script at https://github.com/alexcheng1982/google-maps-gridlines/blob/master/src/google-maps-gridlines.js. No idea what is fixed there.

This is not exactly what you want, because the seconds are still displayed in decimal values. It is a matter of extending the graticule script _.prototype.decToLonSex and _.prototype.decToLatSex functions to also calculate the seconds in their sexagesimal value and to change var decmins and var sexmins to match exactly one second (=1÷60≅0.0166667).

I did adapt the graticule script to display the grid at 0.0005 degrees precision in most detailed view. Your request for a 1 second grid is almost equivalent to a grid at 0.000277778 degrees, which comes close. For inspiration have at look at this more detailed grid demo at http://crashplan.probackup.nl/stiphout/google-maps-with-coordinate-grid.html