Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have the center of a circle and it's radius and I need to place variable amount of markers on the outline/stroke of the circle. The distance between this markers should kept same, so if I have 8 markers to put on the orbit, each of them has 45 degree space (360 / 8) and also it should not be hard-coded as the number of markers is variable.

I wanted to know what is the right way for calculating the Geo-coordinates of each marker?

here you can see an example, the outer marker should move on, however I can't calculate the proper LatLng values.

enter image description here

I finally came up with this formula:

var dg = 90;
var lat = Math.sin(dg * Math.PI / 180) * r + center_geo_lat;
var lng = Math.cos(dg * Math.PI / 180) * r + center_geo_lng;

If you look at snapshots you can see that markers at 0 and 180 degree has placed quite fine, but it seems there is something wrong with other markers. It's gonna works fine for me, because I don't need such a perfect accuracy, however I'm wondering what's cause the problem?

enter image description here

enter image description here

share|improve this question
Please see this Question and Answers for the info on the stretch in a North/South direction… – Mapperz Oct 26 '12 at 13:10
@Mapperz thanks! I'm reading that now! :) – Mahdi Oct 26 '12 at 13:19
I merged your questions since the second one was following up on your first attempt at solving the question posed in the first one. – underdark Oct 26 '12 at 13:32
@underdark thanks, it would be better like now :) – Mahdi Oct 26 '12 at 13:33
up vote 3 down vote accepted

I think this is all down to the projection you're using. Looks like your code is correct, but basically you can't assume that by travelling one unit longitudinally on a map will look the same as the same distance latitudinally.

This has a nice explanation of the differences in projections (see the bit under Tissot's indicatrix):

share|improve this answer
hey, thanks! I'm reading that now, but is there any simple solution for that or not? – Mahdi Oct 26 '12 at 13:20
You might also need to consider whether the circles you have plotted are showing you what you really want - or whether these should be ellipses. – pecoanddeco Oct 26 '12 at 13:21
Simple solution is to choose a projection which preserves the shape of areas on the map, i.e. one that is conformal. – pecoanddeco Oct 26 '12 at 13:29
I need circles, i guess ... – Mahdi Oct 26 '12 at 13:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.