# Page does not load if location service disallowed

**URL:** <https://community.glideapps.com/t/page-does-not-load-if-location-service-disallowed/16769>\
**Category:** Report a Bug\
**Created:** [October 5, 2020, 10:26am UTC](https://community.glideapps.com/t/page-does-not-load-if-location-service-disallowed/16769 "2020-10-05T10:26:57Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![zeki](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/zeki/32/9068_2.png) [@zeki](https://community.glideapps.com/u/zeki)\
**Post date:** [October 5, 2020, 10:26am UTC](https://community.glideapps.com/t/page-does-not-load-if-location-service-disallowed/16769/1 "2020-10-05T10:26:57Z")

</div>

My app’s URL: [my.spasoul.com](http://my.spasoul.com)  
If the user disallow location service access the page is not loading.

---

<div class="post-metadata">

**Author:** ![zeki](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/zeki/32/9068_2.png) [@zeki](https://community.glideapps.com/u/zeki)\
**Post date:** [October 5, 2020, 11:10am UTC](https://community.glideapps.com/t/page-does-not-load-if-location-service-disallowed/16769/2 "2020-10-05T11:10:46Z")

</div>

The problem occurs because of the distance column value when the location services are off.  
The column is not empty bu it does not have any value as well.  
It cannot be equal to zero, it’s not equal to false.  
It’s weird.

How I solve :  
I had to add “user specific text field” and bind it to location component. Whenever it’s switched on distance is calculated with that field not from your current location.

---

<div class="post-metadata">

**Author:** ![zeki](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/zeki/32/9068_2.png) [@zeki](https://community.glideapps.com/u/zeki)\
**Post date:** [October 5, 2020, 11:35am UTC](https://community.glideapps.com/t/page-does-not-load-if-location-service-disallowed/16769/3 "2020-10-05T11:35:11Z")

</div>

![image](https://us1.discourse-cdn.com/flex002/uploads/glideapps/original/2X/a/abfd92ec8c660426615ae2b43beca4d053c595f1.png)  
This is the cause of the problem

---

<div class="post-metadata">

**Author:** ![zeki](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/zeki/32/9068_2.png) [@zeki](https://community.glideapps.com/u/zeki)\
**Post date:** [October 5, 2020, 11:51am UTC](https://community.glideapps.com/t/page-does-not-load-if-location-service-disallowed/16769/4 "2020-10-05T11:51:21Z")

</div>

Whenever locations services disallowed there should be a switch inside distance column such as “-1” or “false” or “empty”

---

<div class="post-metadata">

**Author:** ![zeki](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/zeki/32/9068_2.png) [@zeki](https://community.glideapps.com/u/zeki)\
**Post date:** [October 6, 2020, 4:20pm UTC](https://community.glideapps.com/t/page-does-not-load-if-location-service-disallowed/16769/5 "2020-10-06T16:20:56Z")

</div>

I had to completely disable distance function 😕

---

<div class="post-metadata">

**Author:** ![Mauronic](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mauronic/32/21726_2.png) [@Mauronic](https://community.glideapps.com/u/Mauronic)\
**Post date:** [October 22, 2020, 8:26pm UTC](https://community.glideapps.com/t/page-does-not-load-if-location-service-disallowed/16769/6 "2020-10-22T20:26:25Z")

</div>

I think we are experiencing the same problem. I am trying to understand your implementation but I don’t understand what you are describing:

> I had to add “user specific text field” and bind it to location component. Whenever it’s switched on distance is calculated with that field not from your current location.

---

<div class="post-metadata">

**Author:** ![zeki](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/zeki/32/9068_2.png) [@zeki](https://community.glideapps.com/u/zeki)\
**Post date:** [October 23, 2020, 12:34am UTC](https://community.glideapps.com/t/page-does-not-load-if-location-service-disallowed/16769/7 "2020-10-23T00:34:03Z")

</div>

There is the location component which has a switch.  
Whenever it’s true the source column is updated with the GPS value of the current session (location srv is ON).  
After that whenever you are calculating a distance you are going to use this variable instead of using “current location”  
But, I do not recommend this workaround it’s really not working smooth. The component has problem it’s not switching even when the location servies are ON. And I also believe that if the location services are off it should be disabled and grayed out (maybe)

I have location based content in my app. That’s why I needed this workflow.  
I changed the whole approach after I had the problem above.

Now, I have QR codes in my locations ever QR code is a deepling to a specific location.

---

<div class="post-metadata">

**Author:** ![Mauronic](https://sea2.discourse-cdn.com/flex002/user_avatar/community.glideapps.com/mauronic/32/21726_2.png) [@Mauronic](https://community.glideapps.com/u/Mauronic)\
**Post date:** [October 23, 2020, 4:24pm UTC](https://community.glideapps.com/t/page-does-not-load-if-location-service-disallowed/16769/8 "2020-10-23T16:24:09Z")

</div>

OK, I understand.

If it helps, I came up with this design yesterday: [Improved UX for Location Permissions](https://community.glideapps.com/t/improved-ux-for-location-permissions/17473/5)
