The 4 points in the cardinal directions: N,E,S,W are the easy ones. (One minute of latitude = 1 nautical mile) Longitude distances are changed by the cosine??? of the latitude. 1 minute of long = 1 nm at the equator with the distance being reduced as the lat increases. For example at lat 33, one minute of long might be .78 nm
The other points will take some trigonometry.
There might be methods to do all that.
Could you please suggest a method which can accomplish the task defined earlier? Thanks :-)
I'd do some research in the API doc to see what classes and methods might be useful.
If there aren't any that do what you want, then you might have to come up with some trig equations.
For an easy test, try creating the 4 cardinal points (N,E,S,W) at the radius distance from the center point and draw a line through those points. That should give you a diamond.
The api doesn't seem to offer much help in that regard.
I mean no disrespect. Although what has been mentioned within this thread, has been insightful. As of yet no one has suggested any Java code which could help me solve this problem. I don't expect anyone to do all the work for me, but I hoped someone would be able to help with the coding. Which is why I've come to a Java forum, is anyone able to help in this fashion?
What do you know how to code now? Can you draw a PolyLine between two LatLng points?
Here's some code that might do part of that. I don't have a test machine setup to see what it does.Once you can draw some lines, then move to drawing the 4 lines around the center point between the 4 cardinal points that were mentioned.Code:
LatLng coxFord = new LatLng(35.8671, -84.43983);
LatLng schellKnob = new LatLng(34.61009, -83.607);
PolylineOptions plo = new PolylineOptions().color(Color.YELLOW).width(routeWidth);
Polyline pl = gMap.addPolyline(plo);
I'm not asking how to draw lines or polygons etc. I've been asking how I can generate the appropriate longitude and latitudes to form a 2 mile radius around a particular location (longitude and latitude), which the above code does nothing to achieve.
This thread has been a waste of time.
Ask a search engine how to draw a circle and a simple, direct, easy solution is shown.