On Jul 29, 4:25 am, Brendan <[email protected]> wrote: > Hey Guys, > > Would someone be able to push me in the way of resources to make the > app that I intend to make. I'm trying to embed a Google map into a > project that I'm working on. What I want it to do is use it to extract > 4 GPS coordinates. What I want to do is display a map which the user > clicks 4 times and it makes a box. If that makes any sense. > > So it displays a map of the area concerned, and the end user has to > put a box around a certain area by clicking in the four corners.
If you want a "box" with right angles, you can't let them define all 4 corners. Two clicks (on diagonal corners) will define a rectangle. If you want a quadrilateral, then 4 clicks would be needed. I think I have seen examples of this functionality discussed in the v2 group (your question isn't particularly v3 related, the algorithm is just math), and there is a zoom box tool that might be more useful to you if you remove the zoom functionality and just use the box. To implement it for v3; you need a map click listener which defines 2 points; then calculates the rectangle from them (or 4 and uses those points to define a Polygon with 4 sides). -- Larry > > Thanks, > Brendan -- 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.
