# Geoloc & permissions

## User Flow

![](https://2839192808-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-L3Ckj9RuJ2qwWPoNJTG%2F-L4aonVsgCrRaXzOFWfT%2F-L4aooibzcStHYy-EP6p%2FScreen%20Shot%202018-02-05%20at%2017.35.39.png?alt=media\&token=8f0b2fa4-a684-42f7-b0d0-11ab74944988)

## Required User Stories

* **Main US:** AAU whom accepted to be Geolocalized, when I press "My Position" I see it displayed
* AA iOS User the first time I press on "My position" I see a "xxxx" message prompting me to allow access to my localization
* AAU the first time I press on "My position" if I refuse to give access to my location, I see a message informing me that I can activate it in my settings later and an OK button.
* AAU who refused to give access to my location, when I click on "My Position" I see an alert prompting me to enable Geolocation in the App Settings with "Cancel" and "Activate" buttons
* AAU who refused to give access to my location, in the geolocation error prompt, when I click on the "Activate" button, I am redirected to the native app parameters.
* AAU who is located with a radius over 500m I see a message warning me that my location is inaccurate
* AAU who accepted to give access to my location but who disabled geolocation I see a message warning me that my geolocation is disabled with two buttons "Ignore" and "Activate"
* AAU who accepted to give access to my location but who disabled geolocation in the Alert,  when I click on activate, my Geolocation is activated for me

## Behaviour

### 1/ Action nécessitant la géoloc

{% hint style="success" %}
**DOs**

* If the geolocation is already accepted and activated don't wait to get the precise user geoloc to give access to the feature
  {% endhint %}

### 2/ Autorisation géoloc

{% hint style="success" %}
**DOs**

* If it's not obvious for the user that the functionality will require geolocation : precede the autorisation request with an explanation on why the user experience will be degraded if the user doesn't accept the geolocation
* If the user accepts, do redirect him to his settings so that he can activate his geoloc more easily
  {% endhint %}

### 4/ Carte géolocalisée

{% hint style="success" %}
**DOs**

* Adapter le niveau de zoom aux informations à montrer (dépend du métier)
* Mettre à disposition un champs de recherche et un bouton "me géolocaliser"
* Le niveau de zoom quand on arrive doit être celui que l'on retrouve en appuyant sur le bouton "me géolocaliser"
* Optimiser le chargement des données à afficher sur la carte : les charger par zone de 50km de rayon
  {% endhint %}

{% hint style="danger" %}
**DON'Ts**

* Afficher une carte navigable sur une partie de l'écran seulement&#x20;
  {% endhint %}

### 5/ Refus d'autorisation de géoloc

## Articles and Resources
