Part - 10 || Flutter Google Map Auto Complete Places API
ฝัง
- เผยแพร่เมื่อ 10 ก.ย. 2024
- In this video i will teach you how we can implement google map auto complete search places api without using any plugin.
This the link of google map places api:
String baseURL =
'maps.googleapi...
String request = '$baseURL?input=$input&key=$kPLACES_API_KEY&sessiontoken=$_sessionToken';
Playlist: • Flutter Goolge Map Tut...
► Join My Facebook Group ➜ / 983554978866765
_____________/Connect On Social Media\____________
► linkedin:➜ / axiftaj
► Instagram:➜ / axif_taj
► Facebook:➜ / aaxiftaj
► Twitter:➜ / axiftaj
► GitHub:➜ github.com/axi...
► Hire me on Fiver:➜ www.fiverr.com...
=========================================
► Rest Api Playlist : ➜ • Flutter REST API Tutor...
► Flutter Blog App Playlist: • Flutter Blog App with ...
► How to capture image from camera in flutter:
► Link : • How to capture Image f...
► My Card App Flutter :
► User Circular Avatar Part 1 : • My Card App || Flutter...
► Use fonts in flutter Part 2 : • My Card App || Flutter...
► Final Part 3 : • My Card App || Flutter...
►Covid-19 Tracker App using Rest API's :
• Create Coronavirus (CO...
►Firebase Blog App Android Java:
• Firebase Blog App - Ho...
►C++ Tutorials :
• C++ Programming Tutori... .
flutter google map auto complete places api, places api, auto complete
For business queries : axiftaj@gmail.com
Thank you for watching my channel do give feedback about this video.
#flutter #codewithasif #googlemap #placesapi #flutter #places #maps
Here is endpoint we are using. Please also enable your billing system to your google map api console else it will through error to enable billing.
String baseURL ='maps.googleapis.com/maps/api/place/autocomplete/json';
String request = '$baseURL?input=$input&key=$kPLACES_API_KEY&sessiontoken=$_sessionToken';
This playlist may get useless if we don't get method to bypass billing as many of us don't have credit card for this😌 thank you for such beautiful videos
From where we can get our baseUrl ?? and my 2nd question is how can i get " request " format you specified ( '$baseURL?input=$input&key=$kPLACES_API_KEY&sessiontoken=$_sessionToken';) ??
Is it paid ??
isse use krne k liye pay krna hoga kya bhaiya ??
bhaiya card number poochta h usk baad paise bhhi cut hote h ??
Incredible tutorial. It is exactly what I was looking for and no one explained it in such a simple way as you. 👏
Glad you like it
thanks for providing such a great video. it's really helpful. I am watching your playlist and now I have reached at lecture 10.
Share with your friends
Sir you are the great mai bhoot dino se isi ke liye pareshan tha🙂
always visit my channel jb ap pareshan hon next time
Thank you Asif for this! Really good video to get started with building place finder. 💙
Glad you liked it
Unhandled Exception: type 'Null' is not a subtype of type 'List'... what should i do?
Please watch response of the api and follow video
I'm receiving this response, can you please tell what's the problem? the API I'm using has no restrictions and also has enabled billing.
{
"error_message" : "The provided API key is invalid.",
"predictions" : [],
"status" : "REQUEST_DENIED"
}
Use correct map key
i got the same problem but when i sent the perameter in suggestion funtion with _controller.text.tostrint(), it worked. before that i used to print it. it would give dummy texts with our input.
bro just what i needed. Didn't understand a shit of your hindi but I think I'm going to learn your language
Sorry to hear this 🥲 but i give good exposure of code in my tutorials. You can also check source on my GitHub
@@thetechbrotherss don't be. Excellent tutorial!. I'm thinking bout truly learning Hindi or Chinese or both.
sir do we only need to enable billing for it or also have to pay some charges now or later
just enable it it's free for limited use
how is it possible that i want to find the place in specific country can u provide me the url from which i can get places in that specific country which i want
yes possible stick api with region
Thanks a lot sir
Most welcome
How can I get to go to another page of map that shown the path from current position to the place that click from this page. If now, I already have the current position and the page for map.
Like, how to get the lat/lng information from the clicked place to use at the map page. Or there's another way to code.
Teachme plzzz, thank you very much.
You can store this information in global parameter which is not recommended, or create provider with global exposure to access it across the app
or use singleton class and assign value
Sir I'm facing this error kindly suggest how to solve it?
Error: XMLHttpRequest error.
dart-sdk/lib/_internal/js_dev_runtime/patch/core_patch.dart 941:28 get current
I don't what is this error about, please double check error
Nice tutorial asif bhai but plz make full course beginners to advanced
After a lot of request now i'm seriously thinking of making course from beginners level.
@@thetechbrotherssbhai we will waiting for this course
ye api flutter web pe cors throw krhi hai, alternative kia hai and I dont want to use proxy?
yeah web k liye ni ha
"error_message" : "You must enable Billing on the Google Cloud Project,this feature should pay ?
this is not an error go to your console account and add billing method
@@thetechbrotherssits mean not free for this feature ?
Hi , I am trying to add card in google maps platform ,But i am unable to add it tried multiple times with multiple cards can you help with the issue, I have added my card in google console but it wont work for maps. .
please google it
@@thetechbrotherss i did but couldn't find much
Hey, autocomplete option is not showing in my app. please help me
please check api in postman for response
thanku asif bhai but ek question suggested address ko touch krne pe console ma latitude or longitude a rha ha lekin ab camera ko us jgah pe animate kese karain same way jese current location ma kia tha
check part-6 of the playlist, how to animate camera
hello asif bhai ye place api mery sat enable ni hu raha, debit card mang raha hai , kia ye paid hai ? please replay me
Cad add kr dain visa or master card, its free for limited use
we know about api key but from where u did get base url and the url store in request variable?
by searching on goole
Is it possible to get apartment number in the predictions as well?
not sure bro
@@thetechbrotherss Is it possible for you to check?
Would really appreciate it.
good tutorial but when taping on suggestions it is not populating in text field kindly also tell us how to use onTap to populate suggestion in text field
Checks log it must be showing error in logs
@@thetechbrotherss no brother there is no change when tap on any suggestion from list
Sir I have got the billing account error how to solve this
can u tell me how i can move this text field onto map? and whatever I search for i simply go to that place on map?
You have the coordinates you can move using camera
Sir AP ne direct API key copy paste kar di hamen kesey pta chaley ga Kahan c AP ne li or Kon c key chahiye, Yahan atak gia hun 🥺
Main btaya ha kaise ap create kro gy start sy dekho na
How to search data in google map based on place api just give hints sir
this is clear example of searching data via auto complete places api.
@@thetechbrotherss then how to show on google map sir
Kya ap bta sktyn hn k is me se hum country name , city name, state, or zip code ko kese get kr skty hn or address save krwa skty hn?
Bro already explain ha, ap k pass address ki id aa aa rae ha address ki id sy ap address to get kr skty ho, ya address to convert kr lo lat long ma.
Address ko latlong ma kise convety krty ha us k liye pehle wali videos dkeh lain jahan mainy yeah step sekhaye he r phr easily zip code sub kuch mil jata ha.
@@thetechbrotherss Ok Thank you
Nice one but little confusion is that how we can select the place?
Just tap on it and it got selected i have teach this at the end. Do subscribe and support me on insta: instagram.com/thetechbrotherss/
Nice Video
but One Error In my code ("error_message" : "You must enable Billing on the Google Cloud Project ") that Code are Not Run
So Sir Give Suggestion How to deal With this Error
this is not an error go to google map api console and add billing method
@@thetechbrotherss G sir thanks
How to add billing method
Sir video on this bcz i also have same issue i dont have vissa card how can i add billing method if i dont have visa card@@thetechbrotherss
Is main Jo key used kr rhe hain wo pichla Wala key hain Jo Apne phele videos main used kia tha
Ya location enable krne ke bad key ko doubara copy krna hunga
video dekhain mainy explain kia ha.
Sir 8:20 py ap nay jo key dali hai sir yai key sab k ley same hote hai google cloud mai Mtlb Sir map sdk for andriod and places api in dono k ley same key use kary gay k in ki alg alg key hote hai??
Yeah key koi bhi keh ho skti ha zarori ni ha k same ho but same bhi ho skti ha.
Ap isko key project wise strict bhi kr skty ja
@@thetechbrotherss Sir mai nay ak bar bane hai key vo key (map sdk for andriod) and (places api) in dono k ley same hai??
error_message" : "You must enable Billing on the Google Cloud Project this error is showing but i dont dave any card number or billing address in this case how can i create account
add your card and use your own key
@@thetechbrotherss I don't have a card sir
Cannot hit test a render box with no size.
didn't understood
Thank you
Share with your friends
HOW CAN I DO IT FOR TWO DIFFERENT CONTROLLER LIKE SOURCE AND DESTINATION CONTROLLER.
Same way
What is the base url or endpoint you using
please check first comment.
"status" : "INVALID_REQUEST"
Unhandled Exception: type 'Null' is not a subtype of type 'List'
Ye errors arhy ,tamam code ma nay ap ki video k according he kiya hai aur 2 3 bar ker chuka hun lykn meri lish nai show ho rhi..
mujy lagta hai API k link may koi issue hai, kindly ap check ker k bta dein??
check response and add credit card
@@thetechbrotherss i've already added credit card. How can i check response?
we need to enable billing to use this what is the issue
yes you need to enable billing system inorder to use this feature.
@@thetechbrotherss 😌😌 no credit. Card any other method
@@thetechbrotherss but is ther any risk or conflict means deduction from account if we add billing account
Good Work keep it up Sir! I'm facing this error.. I think link of baseurl is not working 🤔🤔🤔 how to solve it sir ?
"error_message": "This API project is not authorized to use this API.", ):
"predictions": [],
"status": "REQUEST_DENIED"
Its means use your own api key which has payment method addedb
@@thetechbrotherss
Sir is k Liye pay karna pary ga kia?
i got the same problem but when i sent the perameter in suggestion funtion with _controller.text.tostrint(), it worked. before that i used to print it. it would give dummy texts with our input.
google places api use krny k lye kitna pay krna parta h?
it's free apko sirf card add krna ha to use it, jb ap limit reach karing gy phr pay krna parhy ga
Kitni limit hoti he.?
@@thetechbrotherss
Is it mandatory to enable the billing
yes
@@thetechbrotherss can you tell anyother way without using billing account
Hello.. Ye work nhi kar raha billing account mang raha hai.. To Koi Aur Tareeka Hai Free Mein Practice Keliye Use Karne Ka
Yeah kam kr raha ha bhai, google places api free ni ha paid hoti ha. Ap apna billing system add kr dain ap ka issue fixed ho jay ga.
@@thetechbrotherss Okay
Nice...bro...first comment....
Thank you do subscribe and share with your friends.
sir listview is not giving description Unhandled Exception: Exception: failed to load
please check api response
@@thetechbrotherss i have printed the response like you did but whenever I serach i print response and give this error
@@thetechbrotherss i am getting this from api "status" : "INVALID_REQUEST"
google places ki api kha sa lani ha ma smjha nhi jo start ma api cretae ki thi vo kagani ha kia? bhai
Please watch playlist from start and the follow video carefully. To get the api key for project go to google api console, add payment method, create project and then you will have the key.
@@thetechbrotherss jab project setup kia tha us waqt jo api key create ki thi vo use krni ha na api console me google api console may?
😍
thank you
Will this work on Flutter web as well?
yes
it didnt work, give me cors errors.Can you please do it in Flutter web as well?@@thetechbrotherss
nice video and you also😇😇😇😇🙃🙃
but same problem base Url ds'nt workkkkkkkkkkkkk 🥺🥺🥺🥺🥺🥺🥺🥺
It works check api in postman
Bro how to hide listview builder after choose one place?
use sheet to open the search field and on clicking close it, or user overlay or dialog alert etc
can we use uid from firebase auth as a session id???
yes
@@thetechbrotherss thanks for the fast reply
bhi where to select google place API and add it to the project?
Watch part 2 of this playlist
@@thetechbrotherss bhi aik or credential create kr k vo vali API lgni para gi
mujhay to likha aya ha k bray Meherbani billing method add kro 😁😅🤣🤣😂😂😂
hahahha...... han yar abhi add krna parhta ha
is this free of cost?
Yes but you have to add the key to get the access of api key in your api console project for google map
@@thetechbrotherss actually by enabling places api. this is giving me form of creaditCard info. should i fill this? And Thanks for your replays sir
Yes done it. Hogaya thanks sir
Sir Please source code share kr dyy as text foem field ka
Visit my github
Sir please debug the code using print.
ok, share with your friends.
support me on insta: instagram.com/thetechbrotherss/
payment mang kr sharminda kr rha hai google
hahhahahahah yeah to hoga, paymen ni mang raha saying add kro bus
@@thetechbrotherss or phr hmara dill kry ga ham deduct kr len gy
@@thetechbrotherss no i don't want to add card is there any other way for doing this , i am stuck at this point