Web AppBuilder My Location button throws error on iPad/iPhone

2784
2
Jump to solution
02-23-2016 12:46 PM
KyleWikstrom
Occasional Contributor II

We created a Web AppBuilder web app to show utility data, and it has the My Location (GPS) button enabled for field users to find the features they're standing on easily. When using the My Location button on an iPad or iPhone device, the GPS location is found for a brief moment but then the page reloads with an error.

In Safari, the error is A problem occurred with this webpage so it was reloaded.

In Chrome, the error is Aww, Snap! Something went wrong while displaying this webpage. If you're seeing this frequently, try these suggestions. (I tried the suggestions, but they had no effect).

We experience no issues when finding My Location using the Explorer app to view the web map (not the WAB app) on iPad/iPhone.

I do not experience any of the above issues when I access the WAB app from my Android phone, and the web map works in Explorer as well. We also do not experience problems when using My Location button when viewing the WAB app in a desktop web browser.

Is there a fixable issue with the WAB My Location button for use on iPad/iPhone devices? Is this a device issue? Could it be a device browser issue? What can be done?

Thank you much!

Kyle

0 Kudos
1 Solution

Accepted Solutions
KyleWikstrom
Occasional Contributor II

We managed to fix the issue by going to AGO Assistant, clicking I wannt to... > View an Item's JSON. We selected the web application and edited the Data section. Under the "id": "widgets_MyLocation_Widget_10", section, we added the following lines immediately after the line reading "version": "1.4",

  "config": {
  "locateButton": {
  "geolocationOptions": {
  "timeout": 15000
  
}
,
  "highlightLocation": true,
  "scale": 1000,
  "useTracking": true
  
}
  
}

So now it looks like this

We saved this update, cleared the browser data on our iPad device, and the My Location button appears to be working now without error or reloading the page.

View solution in original post

2 Replies
RobertScheitlin__GISP
MVP Emeritus

Kyle,

   This is a known issue with the JS API 3.15 which WAB uses and will be addressed in API version 3.16 which the WAB 1.4 will likely use.

https://community.esri.com/message/586963#comment-586963

KyleWikstrom
Occasional Contributor II

We managed to fix the issue by going to AGO Assistant, clicking I wannt to... > View an Item's JSON. We selected the web application and edited the Data section. Under the "id": "widgets_MyLocation_Widget_10", section, we added the following lines immediately after the line reading "version": "1.4",

  "config": {
  "locateButton": {
  "geolocationOptions": {
  "timeout": 15000
  
}
,
  "highlightLocation": true,
  "scale": 1000,
  "useTracking": true
  
}
  
}

So now it looks like this

We saved this update, cleared the browser data on our iPad device, and the My Location button appears to be working now without error or reloading the page.