Hi @RandyHayes ,
The other day we were hacking on a Number Table / ForAll solution. I'm now trying to repurpsoe that Number Table for other uses.
Goal:
Tried:
ClearCollect(colEarthquakeMap, ForAll(colNumbersTable, If(number <= 20, azureMapTimezone.GetMapImageWithPins( 1.0, 600, 600, { zoom: number, center: Concatenate(Text(Location.Longitude), ",", Text(Location.Latitude)), pins: Concatenate("default||", Concat(colEarthquakeLatLongs, long & " " & lat, "|")), path: Concatenate("ra300000||", Text(Location.Longitude), " ", Text(Location.Latitude)) } ) ) ) );
At a glance, can you spot a direction to take here?
Solved! Go to Solution.
How about the following?
The lines in bold are the ones I've altered. Put a filter on colNumbersTable so you are only iterating the 20 numbers you need. I've also cleared the colEarthquake map collection first, then collected into it line by line as I've used that method before, but not the ClearCollect method in your sample.
I'm assuming your number table starts from 1, otherwise modify the filter accordingly.
Clear(colEarthquakeMap); ForAll(Filter(colNumbersTable, number<=20), Collect(colEarthquakeMape, azureMapTimezone.GetMapImageWithPins( 1.0, 600, 600, { zoom: number, center: Concatenate(Text(Location.Longitude), ",", Text(Location.Latitude)), pins: Concatenate("default||", Concat(colEarthquakeLatLongs, long & " " & lat, "|")), path: Concatenate("ra300000||", Text(Location.Longitude), " ", Text(Location.Latitude)) } ) ) ) );
At a glance this looks legit. Have you tried it out?
How about the following?
The lines in bold are the ones I've altered. Put a filter on colNumbersTable so you are only iterating the 20 numbers you need. I've also cleared the colEarthquake map collection first, then collected into it line by line as I've used that method before, but not the ClearCollect method in your sample.
I'm assuming your number table starts from 1, otherwise modify the filter accordingly.
Clear(colEarthquakeMap); ForAll(Filter(colNumbersTable, number<=20), Collect(colEarthquakeMape, azureMapTimezone.GetMapImageWithPins( 1.0, 600, 600, { zoom: number, center: Concatenate(Text(Location.Longitude), ",", Text(Location.Latitude)), pins: Concatenate("default||", Concat(colEarthquakeLatLongs, long & " " & lat, "|")), path: Concatenate("ra300000||", Text(Location.Longitude), " ", Text(Location.Latitude)) } ) ) ) );
Excellent! This totally works, thanks @PaulD1 .
Clear(colEarthquakeMap); ForAll(Filter(colNumbersTable, number<=20), Collect(colEarthquakeMap, azureMapTimezone.GetMapImageWithPins( 1.0, 600, 600, { zoom: number, center: Concatenate(Text(Location.Longitude), ",", Text(Location.Latitude)), pins: Concatenate("default||", Concat(colEarthquakeLatLongs, long & " " & lat, "|")), path: Concatenate("ra300000||", Text(Location.Longitude), " ", Text(Location.Latitude)) } ) ) );
Now I'm going to figure out how to apply an ID column and id to each record. Stay tuned!
Sorrya bout that...I totally missed your sentence about the results you were getting. Thought you were just looking for a "concept" confirmation. LOL...it's been one of those days!
Good call @PaulD1
All good 🙂 !
K. I got the ID column applied to all returned map images. Last step is to apply a "pseudo - zoom" effect.
Heres a stumper:
Thought I was becoming a nested- data guru... !
ClearCollect(wtf, Ungroup(Filter(colEarthquakeMapWithIDs, id = varZoom),"mapImage") )
Results in:
Bizarre. Its like the Filter() isn't being respected. There is only 1 record with id = 10.
Did you get any further on this or are you still struggling with it?
Hi @RandyHayes ,
Still struggling. I cannot for the life of me figure out why...
LookUp(colEarthquakeMapWithIds, id = varZoom, mapImage.Url) // also tried... First(LookUp(colEarthquakeMapWithIds, id = Slider.Value, mapImage.Url).Url).Url // and all variations imaginable.
Expecting:
Results:
The collection details are shown above... Can you see anything glaring?
So looking at your pictures of the collection, it appears that Url is a table. What does the structure of that table look like?
User | Count |
---|---|
142 | |
141 | |
77 | |
74 | |
71 |
User | Count |
---|---|
231 | |
164 | |
75 | |
67 | |
61 |