2009/6/17 Zoran Surname <[email protected]>: > > Ar Chron wrote: >>> I've already tried that but got same result... >> >> So what was the result? >> >> Try it again, and look at the source for your web page for that image. >> That should let you see what is really and truly getting rendered by >> your code. From there, you should be able to see that the API call is >> correctly formed. > > > This is the HTML result: > > <img alt="Staticmap?center=40" > src="http://maps.google.com/staticmap?center=40.714728,-73.998672&zoom=14&size=512x512&maptype=mobile&markers=40.702147,-74.015794,blues%7C40.711614,-74.012318,greeng%7C40.718217,-73.998284,redc&key=MAPS_API_KEY" > /> >
That link does not work, past it into browser and see. I guess it is due to the & in there. > I also tried things like: > static_map = Net::HTTP.get_response(URI.parse(map_url)) > @static_map = Magick::Image::from_blob(static_map.body.read).first > > <%= @static_map %> then shows me a blob: > "GIF89a� � ���...." > > > > static_map_url = > "http://maps.google.com/staticmap?center=40.714728,-73.998672&zoom=14&size=512x512&maptype=mobile&markers=40.702147,-74.015794,blues%7C40.711614,-74.012318,greeng%7C40.718217,-73.998284,redc&key=MAPS_API_KEY" That link does work. Colin > static_map = open(static_map_url) { |f| > �...@static_map = Magick::Image::from_blob(f.read).first > } > > In the console I get then > => GIF 512x512 512x512+0+0 PseudoClass 256c 8-bit 77kb > @static_map.rows > => 512 > > The image is there but I don't know how to render this one. > -- > Posted via http://www.ruby-forum.com/. > > > > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" 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/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

