The website for routeboxer
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/routeboxer/docs/examples.html
has a pretty good example.

    var boxes = routeBoxer.box(path, distance);

    for (var i = 0; i < boxes.length; i++) {
      var bounds = boxes[i];
      // Perform search over this bounds
    }

The "bounds" variable is now a LatLongBounds object
https://developers.google.com/maps/documentation/javascript/reference#LatLngBounds
can get the coordinates from that.

If you've just coped the example, you probably have a 'drawBoxes'
which you want to convert from just plotting a rectangle, to doing a
search.



There is a prototype I built to play with the routeboxer class,
http://ww2.scenic-tours.co.uk/serve.php?t=WoNlXJvolbMVJL5405ot8OhtaNhlXhwONXM
(can just click the "Submit" button top right to see it in action)
But I suspect wading though the code of a full application might just
confuse you further, than starting from the basics. However if you do
go wading, the getImages(bounds) function shows the basics, accept
some bounds, and send them to the server via ajax.

On Sun, Feb 3, 2013 at 8:47 PM, KP <kevlema...@aol.com> wrote:
> In my Ruby on Rails website, I have a tool that lets users create a driving
> route with Google Maps API V3. My goal is to give the user an option of
> clicking a "Show Nearby Points-of-Interest" checkbox before loading the map.
> If he does, I want the map to show POIs along the route.
>
> I've implemented RouteBoxer, which I believe is my best option for finding
> Points of Interest along the route. Routeboxer is working for me; it draws
> boxes around any route I create. This is where I'm stuck, however. I've just
> got my route and a bunch of boxes on the screen. How can I actually get the
> latitude and longitude bounds from RouteBoxer?
>
> I'm fairly new to both Ruby and Google Maps API V3, so sorry if I'm blowing
> past an obvious way of doing this. Any detail or code you can provide / link
> to would be fantastic! Thanks again for your time!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Google Maps JavaScript API v3" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to google-maps-js-api-v3+unsubscr...@googlegroups.com.
> To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
> Visit this group at
> http://groups.google.com/group/google-maps-js-api-v3?hl=en.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Google Maps JavaScript API v3" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-maps-js-api-v3+unsubscr...@googlegroups.com.
To post to this group, send email to google-maps-js-api-v3@googlegroups.com.
Visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to