On May 26, 6:51 am, Matt Jones <[email protected]> wrote:
> On Tue, May 25, 2010 at 4:25 PM, Jeremy Savoy <[email protected]> wrote:
> > Very nice Dean.
>
> > When I follow the recipe and enter a name (code), a url (site_name)
> > and lat and long taken from a google maps URL, just after the II in
> > the URL, I get the following error:
>
> > undefined method `+@' for "</b></a>":String
>
> > Extracted source (around line #17):
>
> > 14:                   width="100%" height="500">
> > 15:         <repeat>
> > 16:           <marker if="&this.latitude and this.longitude"
> > lat="&this.latitude"
> > 17:                   long="&this.longitude" title="&this.code"
> > 18:                   info="&'<a href=' + object_url(this) + '><b>' +
> > this.code
> > 19:                          + '</b></a>' + '<br/>' + this.site_name"/
>
> > 20:         </repeat>
>
> Starting a line with '+' is confusing Ruby - since there's no line
> delimiter (; for instance) it doesn't know the expression is continued
> on the next line. Moving the '+' to the end of the preceding line
> should help clarify the situation. You might also want to try the #{}
> form instead, as it will avoid all the +s entirely. OR, even better,
> declare the <marker> tag with a default parameter, so that it looks
> way more Hobo-ish:
>
> <def tag="marker" attrs="lat, long, title">
>   <%  @map.overlay_init(GMarker.new([lat,long],:title => title,
> :info_window => parameters.default)) %>
> </def>
>
> Hope this helps!
>
> --Matt Jones

Sorry, I split that line of code when writing up the recipe because
the code doesn't automatically line wrap when displayed and it caused
the recipe to be unreadably wide.

I haven't had need to use the Google API key just yet but I will
update the recipe when I do.

Dean

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" 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/hobousers?hl=en.

Reply via email to