Showing results for 
Search instead for 
Did you mean: 
Resolver II
Resolver II

Multiple Map Pins onto a Google Map

I need help with code to add Multiple Map Pins onto a Google Map.


OnSelect will launch the Google Map outside of the PowerApps.


I am currently using the following code to launch Google Maps with the address of the selected item(Account) in BrowseGallery1 with the DataSource of AcctMain:




Now I need to launch Google Maps with the addresses of all items(Accounts) in BrowseGallery1 with the DataSource of AcctMain.


Any help would be greatly appreciated.  Thanks, Marc...

Community Champion
Community Champion

Hi @BrianJ. Without getting into the code very deep...

  • How many items in your Collection = the ListBox.Selected.Result?
    • There might only be one. 

Keep hackin' you'll get it 🙂 


Ok I got this code working by clicking on the date in the List box.  But I would like foe a marker to show for each address that is in the list box.


"" & EncodeUrl(ListBox1_1.Selected.Result) & "&size=" & txtImageWidth & "x" & txtImageHeight & "&key=" & txtGoogleMapsKey.Text

I'm not real sure if a list box is my best option.  Attached is a screenshot of what I am working with.

Screen Shot 2018-12-30 at 11.02.48 PM.png

Community Champion
Community Champion

Hi @BrianJ. Nice looking app!

Maybe try changing the ListBox out for a Gallery. Then try:

        Address exactin Gallery.AllItems.address

Where Gallery.AllItems.address is the text box in your gallery displaying the address.  You might have to use Gallery.AllItems.address.Text (or it might not work at all!). I'm more of a hands-on PowerApper. Its difficult for me to recall solutions without trying various things. 

Hope this helps!

@ericonline I changed to a Gallery and add your suggestion but I am now getting this error

"Invalid argument type (Table). Expecting a Text value instead."


Here is the code.

"" & EncodeUrl(Gallery1.AllItems.lblAddress) & "&size=" & txtImageWidth & "x" & txtImageHeight & "&key=" & txtGoogleMapsKey.Text
Memorable Member
Memorable Member

Hi @BrianJ. I had a few minutes to look at @luuminhvuong93's solution. His is different than what you're trying to do. He's filtering a Collection by something (say Agent Name in your case) and returning an array of Lat/Longs. I googled "multiple markers google maps by address". Of the two writeups I looked at, both are ALSO using Lat/Longs.


Example 1:



Example 2:

You'll have to do some more research and see if its possible to pass Google Maps multiple Addresses at once or if you need to geocode them first (get Lat Longs) then supply the API those instead.

Good luck!



I am looking for multiple pins with google o bing maps. I have find midle of a "solution" maybe you can help me.

I give you the solution for 1 pin with google maps and gallery

( i prefer google maps because the zoom work good. With bing the zoom in a static map its crazy)


My gallery have a item "Address" with a inputtext "Subtitle2_1 ".

I enter the Street, city .. like this : "7s9s Technology Way, Denver, co 80237"


In a picture :image: ""
& Substitute(Subtitle2_1.Text; " "; "+") & "&zoom=5 &size=600x600 &key=MyKey &markers=color:red%7Clabel:A%7C" &(Subtitle2_1.Text)


This work.


For multiple pins:

If i use gallery.allitems.address not work


If i use this formula its ok : 

& "Brooklyn+Bridge;New+York;NY"
& "&zoom=13 &size=600x600 &key=MyKez
&markers=color:red%7Clabel:A%7C" &"Brooklyn+Bridge
&markers=color:red%7Clabel:A%7C" &"New+York;NY"


We need to separate the markers.

Now i am looking for automate the multiple marker.

I try to make a collection and the idea is to select each ID, ID=1, ID=2 with a formula who auto create the line "&markers=color:red%7Clabel:A%7C" &" " and complete with the resulte of the ID=x

But when i test with one markers to call the ID this dont work. 

Any idea?

I want to build the same that "mymaps" from google but with my own data directly in powerapps

Helpful resources

Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

May UG Leader Call Carousel 768x460.png

June User Group Leader Call

Join us on June 28 for our monthly User Group leader call!

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.


New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Users online (2,867)