def request
      http_segments = @segments.clone
      @params.each do |key,value|
        http_segments[key] = value
      end
      uri = URI::HTTP.build(
        :host => HOST,
        :path => @action_path,
        :query => URI.encode_www_form(http_segments)
      ).to_s
      result = JSON.parse(HTTParty.get(uri).parsed_response)
      Baidumap::Response.new(result,self)
    end
def request
      http_segments = @segments.clone
      @params.each do |key,value|
        http_segments[key] = value
      end
      uri = URI::HTTP.build(
        :host => HOST,
        :path => @action_path,
        :query => URI.encode_www_form(http_segments)
      ).to_s
      result = JSON.parse(HTTParty.get(uri).parsed_response)
      Baidumap::Response.new(result,self)
    end
send http request