@Azriman,

i' feel so stupid, it's really simple in this case and that exactly what i
want : put a marker at horizontal point af the circumference :)

thanks a lot

Cheers
riccco

2010/5/31 AzriMan <[email protected]>

> If you would like to put marker on the vertical or horizontal point of
> the circumference you can try the following:
>
> // creating the circle
> myCircle = new google.maps.Circle({
>    map: map,
>    center: new google.maps.LatLng(circleLat, circleLng),
>    radius: 8000 // 8 km
> });
>
> // eastern lat and lng will be:
> easternLat = myCircle.getCenter().lat();
> easternLng = myCircle.getBounds().getNorthEast().lng();
>
> // northern lat and lng:
> northernLat = myCircle.getBounds().getNorthEast().lat();
> northernLng = myCircle.getCenter().lng();
>
> // for southern and western coords algorithm is the same, but you only
> need to replace getNorthEast() with getSouthWest()
>
>
>
>
> On May 31, 5:15 pm, "ricco *" <[email protected]> wrote:
> > Thanks a lot, this help me understand the underlying math.
> >
> > However, i think i need a formula to translate meters to pixel at given
> > zoom.
> >
> > Cheers
> > riccco
> >
> > 2010/5/31 Stephen Lead <[email protected]>
> >
> > > It's been a while since I had to do this, so double-check the values.
> >
> > > I think you can use SOHCAHTOA to calculate the coordinates of the new
> > > point, by drawing right-angles from the new point and the existing
> point,
> > > since you know the radius and the angle.
> >
> > > My dodgy diagram athttp://
> www.flickr.com/photos/passenger57/4655953942/might
> > > help......
> >
> > > On 31 May 2010 18:49, rccc <[email protected]> wrote:
> >
> > >> Hello,
> >
> > >> I try to play with the new Circle class (http://code.google.com/apis/
> > >> maps/documentation/javascript/reference.html#Circle<
> http://code.google.com/apis/maps/documentation/javascript/reference.h..
> .>).
> > >> The API says we
> > >> have to set a center in LatLng and a radius parameter in meters in the
> > >> constructor.
> >
> > >> But i would like to put a marker on the circumference line.
> >
> > >> How could i get/calculate the latlng of a point on this
> > >> circumference ?
> >
> > >> thanks by advance for response :)
> >
> > >> riccco
> >
> > >> --
> > >> 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
> > >> [email protected].
> > >> To unsubscribe from this group, send email to
> > >> [email protected]<google-maps-js-api-v3%[email protected]>
> <google-maps-js-api-v3%[email protected]<google-maps-js-api-v3%[email protected]>
> >
> > >> .
> > >> For more options, visit this group at
> > >>http://groups.google.com/group/google-maps-js-api-v3?hl=en.
> >
> > >  --
> > > 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
> > > [email protected].
> > > To unsubscribe from this group, send email to
> > > [email protected]<google-maps-js-api-v3%[email protected]>
> <google-maps-js-api-v3%[email protected]<google-maps-js-api-v3%[email protected]>
> >
> > > .
> > > For more options, visit this group at
> > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> --
> 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
> [email protected].
> To unsubscribe from this group, send email to
> [email protected]<google-maps-js-api-v3%[email protected]>
> .
> For more options, visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
>

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to