thanks On Friday, January 19, 2018 at 4:34:57 PM UTC+8, Dave S wrote: > > > > On Tuesday, January 2, 2018 at 8:43:54 AM UTC-8, Ntogg wrote: >> >> I want to show the user their home address on the google map api that i >> am using. When the user inputs their address and clicks "submit", I want >> the google map api to pinpoint their address which I am trying to do by >> passing the user input into the iframe url of the google maps api. Any idea >> how I can do that with web2py? (I am very new to Python and web2py) >> > > Sorry this got overlooked. In case you're still wondering, I can mention > that the user input can be obtained in various ways, SQLFORM() being one of > the easiest. and your controller function would look at request.post_vars. > Assuming the Google Maps API uses values passed in the URL, you would just > append the values to the base url. Something like > > > # assume the address 123 xyz street,Hollywood,California comes from a form > with 4 inputsaddr_sgtr > addr_str = request.post_vars.housenum + " " + request.post_vars.street + "," > + request.post_vars.city + "," + request.post_vars.state > IFRAME(_src='http://www.google.com/maps/api?address=' + addr_str) > > > (not tested ... I haven't worked with Google APIs, although I saw a demo > where GM was used to get the 10 closest Starbucks locations) > > /dps > > > >
-- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com/web2py/web2py (Source code) - https://code.google.com/p/web2py/issues/list (Report Issues) --- You received this message because you are subscribed to the Google Groups "web2py-users" group. To unsubscribe from this group and stop receiving emails from it, send an email to web2py+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.