Simple Problem

Hi there,

I am building an application that stores the delivery boundaries of
businesses. I have a separate table called boundaries that has fields
for the latitude and longitude. Each business can have many of these
boundary points and I use google maps with markers to capture the
information.

No my problem is this - when a user wishes to edit a business I need to
display the delivery area in a google maps using a javascript function.
How can I pass the list of boundaries associated with the business to a
javascript function?

Thanks,
steve

On Wed, Mar 26, 2008 at 06:20:04PM +0100, Steve G. wrote:

I am building an application that stores the delivery boundaries of
businesses. I have a separate table called boundaries that has fields
for the latitude and longitude. Each business can have many of these
boundary points and I use google maps with markers to capture the
information.

No my problem is this - when a user wishes to edit a business I need to
display the delivery area in a google maps using a javascript function.
How can I pass the list of boundaries associated with the business to a
javascript function?

You’ll have a script tag in your view. Here’s some rough pseudocode:

Your JS code can now refer to old_boundaries for the set of points.

Thanks,
steve
–Greg

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs