Google PLaces api -INVALID REQUEST

时间:2014-02-02 11:03:31

标签: google-places-api

在转发请求时使用google api和google app engine(python)创建基于位置的服务时,我得到以下错误作为输出

{
   "html_attributions" : [],
   "results" : [],
   "status" : "INVALID_REQUEST"
}

根据文档,网址和所需参数似乎很好。仍然无法使其正确。请帮忙。感谢....

import webapp2

    MAIN_PAGE_HTML="""\

    <html> 
     <head> 
      <title> Goole location based services</title>
      </head>
      <body bgcolor="Cyan" text="Brown"> 
       <h1 align="center"> Welcome</h1> <br> <hr>
       <br> 
         <h3 align="center">Please enter the following details to get the sugestions.</h3>
         <br>
         <hr>

         <form name="form1" action ="https://maps.googleapis.com/maps/api/place/textsearch/json" method="get">
         <p> Enter Query : <input type="text" name="Query"><br>
             <input type="hidden" name="sensor" value="true">
             <input type="hidden" name="key" value="myKey">
             <input type="Submit" name="btnsubmit" value="submit">
             </p>
             </form>
             </body>
             </html>

             """

    class MainPage(webapp2.RequestHandler):
        def get(self):
            self.response.write(MAIN_PAGE_HTML)


    application = webapp2.WSGIApplication([
                                          ('/',MainPage),
                                          ],debug=True)

0 个答案:

没有答案
相关问题