GeoKit: How to display an address research in a view?

Hi,
maybe its a little complex issue/request, but has someone here an idea
how I can display an address research with GeoKit in GoogleMaps?

I’m a really beginner, so maybe I didn’t get the point so far. I have
installed the GeoKit Plugin, look in the test case (there I didn’t find
any view htmls), setup my own Google Api Key, but didn’t smarter ;-).

How can I use GeoKit result in a view? For my test I have put a address
hardcode in a controller:

class GeokittestController < ApplicationController
include GeoKit::Geocoders
def stadt
res=MultiGeocoder.geocode(‘Rathausplatz, München, DE’)
puts res.ll
ll=latitude,longitude
end
end

Now I would like to use the result from stadt (I’m sure that I do a
mistake here…). How can I now use the result? Must I use res or do I
have to work with ll in the view?

Is it general possible to search for an address with GeoKit?

For displaying I have only found in another thread:
<% content_for :script do -%>


<% end -%>

How could I use the ll/res for such a view (must use the variables for
GLatLng I think) and is map_canvas a standard div/view, cause I saw them
also on other pages?

Maybe one of you could help me short on this topic, I didn’t have found
a tutorial for this on the net and I’m relativly new with OO, maybe that
it the reason were I didn’t get it.

Thanks in advance for any kind of idea/help,
Knut

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