Following on from my earlier question, I'm trying to work out if it would be possible to zoom to a map location using a URL.
Thanks to @jcarlson I can pass a selected feature via the URL, and next I'm trying to zoom to that feature.
Any pointers gratefully received!
It's possible, but depends a lot upon the configuration of the destination map, and what fields you have available in your features.
Google Maps, to use as an example, takes locations as part of the URL:
But this would only work as a URL link if the location were available to me as attributes in the feature.
One of the downsides of Experience Builder is that Arcade expressions are not available, so dynamically generating the URL from the feature geometry won't work. You could still get that link to generate in a popup expression, but it won't be a nice Button widget.
I'm trying to get it to work with a map within EB - I've put a rough example together here:
So if you click the 'URL with attributes' button, it will load a page with a map and select a feature on the map, but I can't seem to get it to zoom in to the selected feature automatically.
Kudos on using the Dymaxion projection! I rarely work at scales where "fun" projections even matter.
But to your issue: if the map is a Map Widget in EB, there's a way to set up a Message Action. But this only works with widgets that allow record selection, like a list or table.
It's very rare for me to be mapping in anything other than British National Grid, so I hear you!
It is a map widget, but I can't see any message actions associated with the map (only the associated list). I'll keep exploring, it might be that I can get the list to be the 'thing' that's selected when I first load the page, and then use that to trigger a message action to zoom the map...
I've also just experimented with having the map zoomed to a custom location within the settings, so it stays at that zoom level but moves around when it first loads... it kind of works but is a little clunky!
It's getting late here so I'll pick this up again tomorrow.
Thanks again for all your help, really appreciated.