web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Select all Pins with a...
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

Categories:
I have the same question (0)
  • VishalJhaveri Profile Picture
    1,167 Moderator on at

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

  • MichaelHoen Profile Picture
    32 on at

    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?!

     

  • MichaelHoen Profile Picture
    32 on at

    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 😄 

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 793 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard