I'm glad you solved it :). The Google Maps tutorial was thought for
interactive maps with data points coming from the application.

If you only need a map, also using a iframe should work.

Warm regards,
Ignacio

El 26/02/14 18:25, Javier V escribió:
> Hi Ignacio, I found a different solution to display a gmap on my webpages, 
> At the end of the day I only need display an image not an interactive
> map, then I'm using 
> 
>   <content-header:>
>     <img
> src="http://maps.google.com/maps/api/staticmap?center=30.965110,-110.334419&maptype=hybrid&size=800x600&sensor=false&zoom=14&markers=#{this.latitude/3600000.to_f},#{this.longitude/3600000.to_f}";
>  
> width="600" height="400" align="center"/>
>   </content-header:>
> 
> and I have a static map.
> 
> Thanks for your help.
> 
> Regards.
> 
> El martes, 18 de febrero de 2014 14:32:39 UTC-7, Javier V escribió:
> 
>     Hi Ignacio.
> 
>     I change these lines
>       <%=  @map.div(:width => width, :height => height).html_safe %>
>       <%=  @map.to_html.html_safe %>
>      still no showing the map.
>     I attach a screenshot.
>     Looks like is missing something. do you have idea?
> 
>     Thanks again.
> 
>     El martes, 18 de febrero de 2014 11:44:50 UTC-7, Ignacio Huerta
>     escribió:
> 
>         Hi Javier,
> 
>         That really looks like a "html_safe" issue, probably because the
>         plugin
>         was designed for Rails 2
>         
> (http://techspry.com/ruby_and_rails/html_safe-and-helpers-in-rails-3-mystery-solved/
>         
> <http://techspry.com/ruby_and_rails/html_safe-and-helpers-in-rails-3-mystery-solved/>).
> 
> 
>         Try using:
> 
>           <%=  @map.to_html.html_safe %>
> 
>         Instead of:
> 
>           <%=  @map.to_html %>
> 
>         If it doesn't help, please say and I'll try to reproduce with
>         Hobo 1.3
>         and Rails 3.0.
> 
>         Regards,
>         Ignacio
> 
>         El 17/02/14 17:43, Javier V escribió:
>         > Hi Ignacio:
>         > This is a screenshot about what i see when i call the maps web
>         page,
>         > also here are the versions i'm using
>         > ruby 1.8.7 (2011-06-30 patchlevel 352) [x86_64-linux]
>         > Rails 3.0.20
>         > Gem List
>         > *** LOCAL GEMS ***
>         >
>         > abstract (1.0.0)
>         > actionmailer (3.0.20, 3.0.17)
>         > actionpack (3.0.20, 3.0.17)
>         > activemodel (3.0.20, 3.0.17)
>         > activerecord (3.0.20, 3.0.17)
>         > activeresource (3.0.20, 3.0.17)
>         > activesupport (3.0.20, 3.0.17)
>         > arel (2.0.10)
>         > builder (2.1.2)
>         > bundler (1.5.3)
>         > daemon_controller (1.1.8)
>         > dryml (1.3.2, 1.3.0)
>         > erubis (2.6.6)
>         > hobo (1.3.2, 1.3.0)
>         > hobo_fields (1.3.2, 1.3.0)
>         > hobo_support (1.3.2, 1.3.0)
>         > i18n (0.5.3, 0.5.2, 0.5.0)
>         > json (1.8.1, 1.8.0)
>         > mail (2.2.20)
>         > mime-types (1.25.1, 1.23)
>         > passenger (4.0.37)
>         > polyglot (0.3.3)
>         > pony (1.2)
>         > rack (1.2.8)
>         > rack-mount (0.6.14)
>         > rack-test (0.5.7)
>         > rails (3.0.20, 3.0.17)
>         > railties (3.0.20, 3.0.17)
>         > rake (10.1.1, 10.1.0, 0.9.2.2)
>         > rdoc (3.12.2)
>         > sqlite3 (1.3.8, 1.3.7)
>         > thor (0.14.6)
>         > treetop (1.4.15, 1.4.14)
>         > tzinfo (0.3.38, 0.3.37)
>         > will_paginate (3.0.5, 3.0.4)
>         >
>         >  Thank you for your help.
>         >
>         > El viernes, 14 de febrero de 2014 06:06:22 UTC-7, Ignacio
>         Huerta escribió:
>         >
>         >     Hi Javier,
>         >
>         >     That's an old tutorial, what version of Hobo and Rails are
>         you using?
>         >     Are you getting plain HTML in your site? Can you provide a
>         screenshot?
>         >
>         >     Thanks!
>         >
>         >     Ignacio  
>         >
>         >     El 12/02/14 21:01, Javier V escribió:
>         >     > Hello everybody.
>         >     > I'm trying to get a Map on my web site.
>         >     > I follow the instructions
>         >     > on
>         >    
>         
> http://cookbook.hobocentral.net/tutorials/50-integrating-google-maps-with-hobo
>         
> <http://cookbook.hobocentral.net/tutorials/50-integrating-google-maps-with-hobo>
> 
>         >    
>         
> <http://cookbook.hobocentral.net/tutorials/50-integrating-google-maps-with-hobo
>         
> <http://cookbook.hobocentral.net/tutorials/50-integrating-google-maps-with-hobo>>
> 
>         >
>         >     > but once I load the web page where I want the map it
>         shows me only
>         >     code:
>         >     >
>         >     > div id="" style="width:100%;height:500px" ></div> <script
>         >     > type="text/javascript"> var map; window.onload =
>         >     > addCodeToFunction(window.onload,function() { if
>         >     (GBrowserIsCompatible())
>         >     > { map = new GMap2(document.getElementById(""));
>         >     > map.centerAndZoomOnPoints([new
>         GLatLng(111.485132,-397.164202),new
>         >     >
>         >    
>         
> GLatLng(111.484132,-397.165202)]);map.addOverlay(addInfoWindowToMarker(new
> 
>         >
>         >     > GMarker(new GLatLng(111.484632,-397.164702),{title :
>         >     > "1"}),"",{}));map.addControl(new GLargeMapControl());
>         >     map.addControl(new
>         >     > GMapTypeControl()); } }); </script>
>         >     >
>         >     > Can you help me to figure out what I'm doing wrong?
>         >     >
>         >     > this is my dryml:
>         >     >
>         >     > <index-page>
>         >     >   <append-scripts:>
>         >     >     <%= GMap.header(:with_vml => false, :host =>
>         >     request.host).html_safe  %>
>         >     >   </append-scripts:>
>         >     >   <top_page_nav: replace/>
>         >     >
>         >     >   <collection: replace>
>         >     >     <if>
>         >     >       <% minmax_lat =  this.*.latitude.reject{|x|
>         x.nil?}.minmax
>         >     >       minmax_long = this.*.longitude.reject{|x|
>         x.nil?}.minmax  %>
>         >     >       <google-map name="maps" ne-lat="&minmax_lat[1] +
>         0.0005"
>         >     > ne-long="&minmax_long[1] + 0.0005"
>         sw-lat="&minmax_lat[0] - 0.0005"
>         >     > sw-long="&minmax_long[0] - 0.0005" width="100%"
>         height="500">
>         >     >         <repeat>
>         >     >           <marker if="&this.latitude and this.longitude"
>         >     >             lat="&this.latitude"
>         >     >             long="&this.longitude" title="&this.code"
>         >     >             info="&'<a href=' + object_url(this) + '><b>' +
>         >     this.code +
>         >     > '</b></a>' + '<br/>' + this.site_name"/>
>         >     >         </repeat>
>         >     >       </google-map>
>         >     >     </if>
>         >     >
>         >     >     <table-plus: fields="this, site_name">
>         >     >       <empty-message:>No sites match your
>         criteria</empty-message:>
>         >     >     </table-plus:>
>         >     >   </collection:>  <bottom_page_nav: replace/>
>         >     > </index-page>
>         >     >
>         >     > thanks for your help
>         >     >
>         >     > --
>         >     > You received this message because you are subscribed to
>         the Google
>         >     > Groups "Hobo Users" group.
>         >     > To unsubscribe from this group and stop receiving emails
>         from it,
>         >     send
>         >     > an email to [email protected] <javascript:>.
>         >     > To post to this group, send email to
>         [email protected]
>         >     <javascript:>.
>         >     > Visit this group at
>         http://groups.google.com/group/hobousers
>         <http://groups.google.com/group/hobousers>
>         >     <http://groups.google.com/group/hobousers
>         <http://groups.google.com/group/hobousers>>.
>         >     > For more options, visit
>         https://groups.google.com/groups/opt_out
>         <https://groups.google.com/groups/opt_out>
>         >     <https://groups.google.com/groups/opt_out
>         <https://groups.google.com/groups/opt_out>>.
>         >
>         >     --
>         >     Ignacio Huerta Arteche
>         >     http://www.ihuerta.net
>         >     Teléfono: 0034 645 70 77 35
>         >     Email realizado con software libre
>         >
>         > --
>         > You received this message because you are subscribed to the
>         Google
>         > Groups "Hobo Users" group.
>         > To unsubscribe from this group and stop receiving emails from
>         it, send
>         > an email to [email protected].
>         > To post to this group, send email to [email protected].
>         > Visit this group at http://groups.google.com/group/hobousers
>         <http://groups.google.com/group/hobousers>.
>         > For more options, visit
>         https://groups.google.com/groups/opt_out
>         <https://groups.google.com/groups/opt_out>.
> 
>         -- 
>         Ignacio Huerta Arteche
>         http://www.ihuerta.net
>         Teléfono: 0034 645 70 77 35
>         Email realizado con software libre
> 
> -- 
> You received this message because you are subscribed to the Google
> Groups "Hobo Users" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/hobousers.
> For more options, visit https://groups.google.com/groups/opt_out.

-- 
Ignacio Huerta Arteche
http://www.ihuerta.net
Teléfono: 0034 645 70 77 35
Email realizado con software libre

-- 
You received this message because you are subscribed to the Google Groups "Hobo 
Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/hobousers.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to