parameters: (self, environ)
docstring: Retrieves search tokens from form and performs the custom POI search.
  
      Args:
       environ: A list of environment variables as supplied by the
        WSGI interface to the custom POI search application interface.
      Returns:
       A XML/JSON formatted string with search results.
      Raises:
       BadQueryException: When all the mandatory parameters are not provided
       to the Google Places database.
docstring_summary: Retrieves search tokens from form and performs the custom POI search.
docstring_tokens: Retrieves search tokens from form and performs the custom POI search .
function: def HandleSearchRequest(self, environ):
      """Retrieves search tokens from form and performs the custom POI search.
  
      Args:
       environ: A list of environment variables as supplied by the
        WSGI interface to the custom POI search application interface.
      Returns:
       A XML/JSON formatted string with search results.
      Raises:
       BadQueryException: When all the mandatory parameters are not provided
       to the Google Places database.
      """
      # Retrieve "response_type", "location", "radius", "key" and
      # "callback" parameters from the form.
      parameters = self.utils.GetParameters(environ)
      response_type = self.utils.GetResponseType(environ)
      location = self.utils.GetValue(parameters, "location")
      radius = self.utils.GetValue(parameters, "radius")
      server_key = self.utils.GetValue(parameters, "key")
  
      # Default "callback" value is "handleSearchResults".
      f_callback = self.utils.GetCallback(parameters)
  
      if location and server_key and radius:
        output_type = self.GetOutputType(response_type)
  
        # Create Google Places database URL here.
        url = self._places_api_url % (output_type, location, radius, server_key)
        self.logger.debug("Google Places database URL is %s.", url)
  
        url_fetch = urllib2.urlopen(url)
  
        if response_type == "KML":
          return self.FormatKMLResponse(url_fetch)
        elif response_type == "JSONP":
          # Prepare a "jsonp" message as per the requirements of
          # GEE search services for maps.
          return "%s(%s);" % (f_callback, self.FormatJSONResponse(url_fetch))
      else:
        error = ("location, radius or key information not "
                 "received by the server.")
        raise exceptions.BadQueryException(error)
function_tokens: def HandleSearchRequest ( self , environ ) : # Retrieve "response_type", "location", "radius", "key" and # "callback" parameters from the form. parameters = self . utils . GetParameters ( environ ) response_type = self . utils . GetResponseType ( environ ) location = self . utils . GetValue ( parameters , "location" ) radius = self . utils . GetValue ( parameters , "radius" ) server_key = self . utils . GetValue ( parameters , "key" ) # Default "callback" value is "handleSearchResults". f_callback = self . utils . GetCallback ( parameters ) if location and server_key and radius : output_type = self . GetOutputType ( response_type ) # Create Google Places database URL here. url = self . _places_api_url % ( output_type , location , radius , server_key ) self . logger . debug ( "Google Places database URL is %s." , url ) url_fetch = urllib2 . urlopen ( url ) if response_type == "KML" : return self . FormatKMLResponse ( url_fetch ) elif response_type == "JSONP" : # Prepare a "jsonp" message as per the requirements of # GEE search services for maps. return "%s(%s);" % ( f_callback , self . FormatJSONResponse ( url_fetch ) ) else : error = ( "location, radius or key information not " "received by the server." ) raise exceptions . BadQueryException ( error )