curve line

2,489 views
Skip to first unread message

Khairil Azhar

unread,
Jul 6, 2010, 11:37:39 PM7/6/10
to Google Maps JavaScript API v3
hi,

how can i create curve line instead of polyline between two points?

Ben Appleton

unread,
Jul 7, 2010, 12:08:06 AM7/7/10
to google-map...@googlegroups.com
Set option "geodesic" to true on google.maps.Polyline:
http://code.google.com/apis/maps/documentation/javascript/reference.html#Polyline

On Wed, Jul 7, 2010 at 1:37 PM, Khairil Azhar <aku....@gmail.com> wrote:
hi,

how can i create curve line instead of polyline between two points?

--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Khairil Azhar

unread,
Jul 7, 2010, 10:08:35 PM7/7/10
to Google Maps JavaScript API v3
i tried the geodesic option but i only see straight line
here is my code:

var flightPlanCoordinates = [
new google.maps.LatLng(3, 101),
new google.maps.LatLng(4, 103),
];
var flightPath = new google.maps.Polyline({
geodesic: true,
path: flightPlanCoordinates,
strokeColor: "#0000ff",
strokeOpacity: 1.0,
strokeWeight: 3
});
flightPath.setMap(map);

is there something missing?
thanks.

On Jul 7, 12:08 pm, Ben Appleton <apple...@google.com> wrote:
> Set option "geodesic" to true on google.maps.Polyline:http://code.google.com/apis/maps/documentation/javascript/reference.h...
>
>
>
> On Wed, Jul 7, 2010 at 1:37 PM, Khairil Azhar <aku.az...@gmail.com> wrote:
> > hi,
>
> > how can i create curve line instead of polyline between two points?
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "Google Maps JavaScript API v3" group.
> > To post to this group, send email to
> > google-map...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > google-maps-js-a...@googlegroups.com<google-maps-js-api-v3%2B unsub...@googlegroups.com>
> > .

Ben Appleton

unread,
Jul 7, 2010, 10:38:57 PM7/7/10
to google-map...@googlegroups.com
Those coordinates are close together so the flight path only curves slightly.

To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages