cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
HN
Helper I
Helper I

Google map and pin in PowerApps

I got a Problem is that,I want to attach google map Api with my text box in this form that i can search my area when i type in that text box mean it work like search when i type in that text box it show me the intelliscence for that related text. The picture of form is attached.In this form the text fields StartPoint and EndPoint want to connect  with Google api and search areas from that.

2 REPLIES 2
v-monli-msft
Community Support
Community Support

Hi @HN,

 

Insert a Text input control to enter the location or address for the map: Insert Tab > Text > Text input. Rename the control to txtLocation. Move it to a location in the screen where appropriate.

Change Hint Text as “Enter a location or address” and keep Default as an empty string “” or your favorite location – for e.g. Times Square, New York, Seattle etc...

 

For rendering the Map, use the following formula in the Image property of the imgMapControl :

"https://maps.googleapis.com/maps/api/staticmap?center=" & EncodeUrl(txtLocation.Text) & "&size=" & txtImageWidth & "x" & txtImageHeight & "&key="&txtGoogleMapsKey.Text

Google Maps: Refer to examples and parameters in the Google Static Maps Developer Guide.

 

For your reference:

https://powerapps.microsoft.com/en-us/blog/image-control-static-maps-api/

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

i Don't want to show the map i only want that the when i write in text box it gave me suggestions and i select which i want.

Helpful resources

Announcements
Power Apps News & Annoucements carousel

Power Apps News & Announcements

Keep up to date with current events and community announcements in the Power Apps community.

Community Call Conversations

Introducing the Community Calls Conversations

A great place where you can stay up to date with community calls and interact with the speakers.

Power Apps Community Blog Carousel

Power Apps Community Blog

Check out the latest Community Blog from the community!

Top Solution Authors
Top Kudoed Authors
Users online (5,739)