Skip to main content

Notifications

Community site session details

Community site session details

Session Id :
Power Apps - Building Power Apps
Unanswered

Select all Pins with a shape on a Map and show in a Gallery

(0) ShareShare
ReportReport
Posted on by 32

Hi There, i try to get all data for the selected pins on a map. 

i try to use shapes to select pins, but i cant get these pins/items in a new collection to display all the selected items in a gallery. 

iScreen Shoter - Google Chrome - 240426120202.jpg

  • MichaelHoen Profile Picture
    32 on at
    Re: Select all Pins with a shape on a Map and show in a Gallery

    I've done this 😉 

    It's very much code, but it works. Maybe anyone will improve my code, please feel free 🙂

     

    Here are my solution:

    I created 4 labels,

    (X1_Value)

    (X2_Value)

    (Y1_Value)

    (Y2_Value)

    to get the coordinates for a rectangle-shape. 

    I need to extract the X1, X2 ,Y1 and Y2 values to filter the items gallery. 

     

    For X1

    First(

    Split(

    First(

    Split(

    Last(

    FirstN(

    Split(

    Last(FirstN(Gallery4.AllItems;4)).Value;

    ","

    );

    2

    ).Value

    ).Value;

    "]"

    )

    ).Value;

    "."

    )

    ).Value & "," & Last(

    Split(

    First(

    Split(

    Last(

    FirstN(

    Split(

    Last(FirstN(Gallery4.AllItems;4)).Value;

    ","

    );

    2

    ).Value

    ).Value;

    "]"

    )

    ).Value;

    "."

    )

    ).Value

     

    For X2:

    First(

    Split(

    First(

    Split(

    Last(

    FirstN(

    Split(

    Last(Gallery4.AllItems).Value;

    ","

    );

    2

    ).Value

    ).Value;

    "]"

    )

    ).Value;

    "."

    )

    ).Value & "," & Last(

    Split(

    First(

    Split(

    Last(

    FirstN(

    Split(

    Last(Gallery4.AllItems).Value;

    ","

    );

    2

    ).Value

    ).Value;

    "]"

    )

    ).Value;

    "."

    )

    ).Value

     

    For Y1 (I need to improve this for the first digit)

     

    "6,"&First(Split(Last(Gallery4.AllItems).Value;",")).Value
    For Y2
    "6,"&First(Split(Last(FirstN(Gallery4.AllItems;4)).Value;",")).Value

    Now you need a new Gallery to show selected Items in the Map and install a filter on the Items:

     
    Filter(

    MyList;

    Value(X1_value.Text) <= Breitengrad && Value(X2_value.Text) >= Breitengrad && Value(Y1_value.Text) <= Laengengrad && Value(Y2_value.Text) >= Laengengrad

    )

     

     

    Please feel free to mark my answer as a soloution if it helps 😄 

  • MichaelHoen Profile Picture
    32 on at
    Re: Select all Pins with a shape on a Map and show in a Gallery

    Maybe its not possible in PowerApps, but how about a formula in PowerAutomate... I draw the geodata from the shape to powerautomate and the flow will find all points in this geodata and get back to powerapps?!

     

  • VishalJhaveri Profile Picture
    1,167 Super User 2025 Season 1 on at
    Re: Select all Pins with a shape on a Map and show in a Gallery

    This is not possible. Don't waste time on it. Please mark my answer as solution if it helps.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Markus Franz – Community Spotlight

We are honored to recognize Markus Franz as our April 2025 Community…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
WarrenBelz Profile Picture

WarrenBelz 146,605 Most Valuable Professional

#2
RandyHayes Profile Picture

RandyHayes 76,287 Super User 2024 Season 1

#3
Pstork1 Profile Picture

Pstork1 65,946 Most Valuable Professional

Leaderboard