On Nov 12, 3:22 pm, Novin Jaiswal <[EMAIL PROTECTED]> wrote:
> Hi Guys,
>
> I am new to Google maps its easy to understand and I have integrated
> it also successfully.
>
> I am having 8 coordinates. Two coordinates for each point, so there
> are 4 point with latitude and longitude.
>
> The problem is I want to create a rectangle while connecting all these
> 4 point on my googlemap.
>
> When I gone through the source code of following googlemap example
> which is simmillar to wht i want to achieve.
>
> I want to achieve 
> likehttp://code.google.com/apis/maps/documentation/examples/overlay-custo...
>
>                 var rectBounds = new GLatLngBounds(
>             new GLatLng(southWest.lat() + latDelta,
>                         southWest.lng() + lngDelta),
>             new GLatLng(northEast.lat() - latDelta,
>                         northEast.lng() - lngDelta));
>         map.addOverlay(new Rectangle(rectBounds));
>
> Here we are only using 2 point to create the graph or only passing 2
> instances of new GLatLng(). Instead of that I want to use 4 different
> point and want to create a rectangle from that .
>
> Pls let me know how to achieve that or Am I missing something?

A rectangle will only have 2 latitudes and 2 longitudes.  If you want
to define an arbitrary quadrilateral, create an array of 4 GLatLng
objects and pass it to the GPolygon constructor... (or 5 and pass it
to the GPolyline constructor).
http://code.google.com/apis/maps/documentation/reference.html#GPolygon
http://code.google.com/apis/maps/documentation/reference.html#GPolyline


>
> I appreciate you help.
>
> Thanks
> Novin
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google Maps API" 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-API?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to