1

I am trying to draw a semi-circle in google maps using Geodesics Points between 2 latitude and longitudes.

I found a place that had exactly what I needed: http://maps.forum.nu/temp/gm_bearing.html

It was using the API V2 and I need the V3.

So I converted it.

The problem im having is that the semi-circle isnt being drawn correctly and i cant figure out why.

This is what happens when the semi-circle is drawn. enter image description here

But when I zoom out or I make the semi-circle smaller it looks fine. enter image description here

I have reproduced the issue in jsfiddle.

http://jsfiddle.net/Morlock0821/4dRB2/1/

Any help would be greatly appreciated.

Thanks.

Pedro Estrada
  • 2,384
  • 2
  • 16
  • 24

1 Answers1

3

Remove these line in the drawCircle function:

var basePoints = calculateGeodesicPoints(circlePoints[circlePoints.length - 1], circlePoints[0]);
while (basePoints.length) {
  circlePoints.push(basePoints.shift());
}

enter image description here http://googlemaps.googlermania.com/google_maps_api_v3/en/draw-semi-circle.html

wf9a5m75
  • 6,100
  • 3
  • 25
  • 59