Geo – Location

So we have Latitude and Longitude, putting those together we have a location now. That is simple enough, but once we have a location, we can use that to derive other locations.

Deriving new locations

We create the addDistanceEast(), addDistanceWest(), addDistanceNorth(), and addDistanceSouth() methods to generate a new location-based on our current location. Now, something to note in these methods uses the UnitOfDistance class, to specify the Unit of your distance.

Distance Between locations

You can find the distanceTo() method which takes a GeoLocation, and a UnitOfDistance to return the distance between the two locations.

Ghostprogrammer
  • Ghostprogrammer
  • I am known for being able to quickly decipher difficult problems to assist development teams in producing a solution. I have been called upon to be the Team Lead for multiple large-scale projects. I have a keen interest in learning new technologies, always ready for a new challenge.

Leave a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: