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.
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
"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 😄
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?!
This is not possible. Don't waste time on it. Please mark my answer as solution if it helps.
WarrenBelz
146,605
Most Valuable Professional
RandyHayes
76,287
Super User 2024 Season 1
Pstork1
65,946
Most Valuable Professional