0

I have published an ArcGIS Online Web App. It is working as intended. I am now looking at incorporating additional functionality such as querying features in the map via URL.

I can get this to work using the:

?query=... addition to the URL. Ie:

https://[my web app]?id=xxxx?query=xxx

When I try add an extent onto the URL I get an error. The page loads with an unhappy emoji and instructions the code has been turned to lowercase.

Here is the url as an example:

https://[my AGOL address]/apps/webappviewer/index.html?id=xxxx?extent=MinX,MinY,MaxX,MaxY,WKID

The error on the webpage is:

enter image description here

Cannot read properties of undefined (reading 'toLowerCase')

If I remove the “Id=xxx” and use the ArcGIS online base URL and same extent, it loads as intended. Just not in my web app.

Is there a way to control the extent of my web app using the URL?

3
  • 1
    URL parameters are well documented. Please see doc.arcgis.com/en/web-appbuilder/latest/manage-apps/…
    – Ebingsya
    Commented Jun 29, 2022 at 14:49
  • Thank you. That link is what I have used to set up the extent url. The example given does not include the “?id=“ parameter. Which is my question, can you used the extent parameter with a published web app? Commented Jun 29, 2022 at 21:05
  • 1
    I answered the question you asked. Perhaps a better way to word your actual question is: "How do I use multiple URL parameters in one URL?". To which the answer to that question is found on the first paragraph of the page I provided. "To include more than one parameter, use an ampersand (&) to separate the parameters."
    – Ebingsya
    Commented Jul 1, 2022 at 0:03

1 Answer 1

0

I noticed an example had used "&" instead of "?".

I changed the url to read:

https://[my AGOL address]/apps/webappviewer/index.html?id=xxxx&extent=MinX,MinY,MaxX,MaxY,WKID

The url now works as intended.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.