-@result = nil

-result = Geocoder.search(params[:where]).each do |result|
  -if result.city and result.country 
    
        
    -@result = result
    -break

-@annonce = @annonce || Annonce.new

-if @result
  -@annonce.g_postal_code= @result.postal_code

  -@annonce.g_city= @result.city
  - @annonce.g_sub_state= @result.sub_state
  
  -@annonce.g_sub_state_code= @result.sub_state_code
  
  - @annonce.g_state= @result.state
  
  -@annonce.g_state_code= @result.state_code
  
  -@annonce.g_country= @result.country
  
  -@annonce.g_country_code= @result.country_code
  
  -@annonce.g_latitude= @result.latitude
  -@annonce.g_longitude= @result.longitude


-if @annonce.localisation_complete?

  %p.padding#g_text_visu
    %strong
      =@annonce.g_postal_code
      =@annonce.g_city
      ,
      -if @annonce.g_sub_state?
        =@annonce.g_sub_state     
        ,
      =@annonce.g_state
    %br
    =@annonce.g_country
    %br
    
    %br
    Lat :
    =@annonce.g_latitude
    ="-"
    Long :
    =@annonce.g_longitude


=hidden_field_tag "annonce[g_postal_code]", @annonce.g_postal_code

=hidden_field_tag "annonce[g_city]", @annonce.g_city
=hidden_field_tag "annonce[g_sub_state]", @annonce.g_sub_state

=hidden_field_tag "annonce[g_sub_state_code]", @annonce.g_sub_state_code

=hidden_field_tag "annonce[g_state]", @annonce.g_state

=hidden_field_tag "annonce[g_state_code]", @annonce.g_state_code

=hidden_field_tag "annonce[g_country]", @annonce.g_country

=hidden_field_tag "annonce[g_country_code]", @annonce.g_country_code

=hidden_field_tag "annonce[g_latitude]", @annonce.g_latitude
=hidden_field_tag "annonce[g_longitude]", @annonce.g_longitude

