I'm not sure if there are any existing libraries that would suit your purpose, at least gaming wise. There could possibly be some GIS/mapping libraries that may help out, such as GeoTools (www.geotools.org
), but I've got a sneaking suspicion they may be more complex & over-the-top than what you need.
It's not clear from your original post exactly how you want to implement this. If you just want to use global/spherical coords (lat/long), then you could easily implement this yourself, providing you have a solid understanding of geometry.
If on the other hand you want to use a custom map grid (for example, to produce 6 figure grid references), then you'll probably need to jump into the world of mapping projections, and the joys of making spherical objects appear flat and square, which in itself can become quite complex.
EDIT: Re-reading your original post, I was probably teaching you to suck eggs with the last part of my post. Sounds like you already you already have an idea how you'll implement it yourself if you don't find a library. Sorry about that!