My location widget is crashing my app on mobile devices.

6536
24
Jump to solution
11-09-2015 10:30 AM
BrianKeller__GISP
New Contributor III

I got a heads up from some end users today that using the my location button on one of our apps (confirmed its happening on all of them now) causes the application to crash and reload. I tried adjusting the timeout setting but that didnt seem to help.

Anyone else experiencing this?

I can share the url to the app if anyone needs it, id rather not post it here publicly.

halp!

Tags (1)
0 Kudos
24 Replies
BrianKeller__GISP
New Contributor III

Strange indeed. I have confirmed my issue with some other GIS folks in my immediate area.

So currently my status is this:

MyLocation works fine in the ESRI Collector App

I cant get it to work with ANY arcgis online or WAB apps, including ones created by other organizations.

I had a support call with ESRI, and they mentioned that they have added more tiles to their basemaps, so im wondering if thats why the widget seems to zoom me in to an incredibly tight scale, then crashes. That doesnt explain why it works with collector however.

Ive ordered an adapter for our ipad, so hopefully I can get some screen shots/gif to share on here as to what my error actually looks like.

Also, google maps, apple maps, etc work fine, so I dont think its the device or our local network.

/shrug

I will keep this thread updated as I work through more possible solutions.

0 Kudos
BrianKeller__GISP
New Contributor III

So dont have a real answer, but its fixed.

Deleting cookies/browsing history on both the Ipad and android phone seemed to flush whatever issue the app was having out. Still dont know what specifically caused it, but oh well i guess.

I dont know why this didnt occur on my desktop as well, but everything seems to be running normally for the time being.

cheers

RickeyFight
MVP Regular Contributor

I know this is not the exact place to post this but I was wondering if it ever happened again?

I have used Locate Button before on webapps and not had an issue.

I opened Locate Button | ArcGIS API for JavaScript  on my ipad and it reloads every time I hit the locate button.

Maybe it is  bug in 3.15?

0 Kudos
AdelaideZumwalt2
New Contributor

I've noticed this is happening with Imagery, Streets, Topographic, and Oceans. It isn't happening with the other basemaps. Anyone know why?

0 Kudos
CurtPope
New Contributor III

We have tried to clear browsing data on Safari and it still crashed when you try to pan or zoom. The app seems to work in chrome.

0 Kudos
RickeyFight
MVP Regular Contributor

I did find a solution.

I set the scale when locate is clicked. For some reason the map was zooming in too much.

LocateButton | API Reference | ArcGIS API for JavaScript

CurtPope
New Contributor III

Our apps are built and hosted on AGOL using webapp builder do you know any way to configure the zoom in that environment?

0 Kudos
BrianKeller__GISP
New Contributor III

So one of the above posters was correct, the issue returned this week for us, and setting the zoom scale level in the config solved the problem.

Your MyLocation config should look something like this:

{

  "locateButton": {

    "geolocationOptions": {

      "timeout": 15000

    },

    "highlightLocation": true,

    "scale": 1500

  }

}

The "scale" line is what you need to add, set the value to whatever works.

Shout out to Robert Scheitlin, GISP for his assistance as usual!

rscheitlin

0 Kudos
MariaNieves
New Contributor III

We are having the same problem and reported it to ESRI. A bug (BUG-000093483) was created for this issue. In our case we think it is due to the ESRI's basemap caches not having an image tile for our area at the scale the My location widget zooms to. Even though ESRI's caches are now available at larger scales, very few places actually have tiles at those scales.

0 Kudos
MariaNieves
New Contributor III

Also, the issue doesn't occur only with the "My Location" widget. Users will have the same problem if they try to zoom in to large scales. We are a water utility and our application must allow users to zoom in to at least 1:141. I changed the My location widget scale to 1500 and that fixed the problem when users select the "My location" button but this doesn't fix the issue when users manually zoom in to large scales.

0 Kudos