1

In localhost i get geocoding error "Geocoding API's response was not valid JSON" when i load my result page, i tried this issue here but nothing work, I dont understand why i dont have error in production but only in local

My controller:

  if params[:room_type].present? && params[:location].present? && params[:nb_piece].present?
      @biens = Bien.near(params[:location], 1, units: :km).where(room_type: params[:room_type], nb_piece: params[:nb_piece])
    end
@hash = Gmaps4rails.build_markers(@biens) do |bien, marker|
      marker.lat bien.latitude
      marker.lng bien.longitude
      marker.picture({
        :url => ActionController::Base.helpers.asset_path("markers/bien16.png"),
        "width" =>  16,
        "height" => 16})
        marker.infowindow gmaps4rails_infowindow(bien)
      end
      @hashagences = Gmaps4rails.build_markers(@users) do |user, marker|
        if user.latitude != nil && user.latitude != nil
          marker.lat user.latitude
          marker.lng user.longitude
          marker.picture({
            :url => ActionController::Base.helpers.asset_path("markers/agence32.png"),
            "width" =>  32,
            "height" => 32})
            marker.infowindow gmaps4rails_agence(user)
          end
        end
Wako
  • 140
  • 1
  • 15

0 Answers0