Select to view content in your preferred language

Pass lat/long coords to URL of Exp Builder webapp

1611
8
05-20-2022 07:46 AM
USLEOperations
Occasional Contributor

With the EB webapp I created, I would like the webapp to go to a location specified by latitude, longitude coordinates passed through the URL of the webapp.  I am unable to find the URL parameters to do this and if this is possible.  Thanks!

8 Replies
TonghuiMing
Esri Regular Contributor

@USLEOperations Unfortunately, I don't think we've supported that yet. You might consider bringing it to Esri Support for an ENH or post it in the Experience Builder Ideas category for further evaluation. Thanks.

0 Kudos
StefanFree
Occasional Contributor

This is such basic functionality - the ability to pass location / scale to a map via a URL. Yes, I know that Ex B does "so much more" than a basic map. But if ESRI isn't going to maintain (or truly replace) WAB (or other, previous options) and tell us that Ex B is so great it needs to be able to do Basic stuff too.

Shen_Zhang
Esri Contributor

Hi All,

Just a quick update to let you know that the Map widget now supports center parameter that allows you to center a map by desired coordinates. please refer to Center a map for more details. Thanks!

Shen Zhang
JoabelBarbieri
Frequent Contributor

Thank you Shen. Very good.

However I'm having some problems to make it work. If my map is in sub page of ExB it doesn't seem to work. Also, the coordinates aren't working when using simple lat/long wgs84 format. Can I find examples and more documentation about that anywhere other than the link you posted above (which doesn't contain much)? Thanks

0 Kudos
Shen_Zhang
Esri Contributor

@JoabelBarbieri I think there will be a blog about using URL parameters soon. Regarding to the issues you have:

  • You mentioned that map URL parameters do not work for sub-page maps? I'm not sure what your URL looks like, but for example, to locate a map centre, you need to specify the <mapWidgetID>, which is the identifier of your map widget. To find the <mapWidgetID>, you can go to Experience settings -> Manage URL status to turn on the map widget toggle - the map URL parameters will be added to your URL automatically at runtime when you interact with the map.
  • To use <center> to locate your map, <wkid> is required. The common syntax is : center:<x,y,wkid>. Foe example, to find a center with WGS84 coordinates, the URL parameters should be like: #<mapWidgetID>=center:<20,40,4326> 
Shen Zhang
JoabelBarbieri
Frequent Contributor

Thanks, Shen, Anything new on this? I noticed that the What's New of ExB June 24 version doesn't add anything new as URL parameters

0 Kudos
Shen_Zhang
Esri Contributor

Yes, we only shipped one new URL parameter - you can zoom to a selected feature on maps by adding zoom_to_selection=true. It now only supports single selection so is not yet documented in URL parameters.

Have you tried using center? Did you see any issues?

Shen Zhang
0 Kudos
JoabelBarbieri
Frequent Contributor

I tried using center but it didn't seem to work and/or I didn't config properly. I have several pages on my ExB site with multiple maps and views and I couldn't figure out exactly how to target specific pages and maps using url parameters. I'll probably wait on the next release for more documentation and simpler coordinates zoom as WAB had.

0 Kudos