 
   # if the user has clicked back to the map then display it.
   checkDataStore = ->
-    if $scope.selectedStore and $scope.prms
-      $scope.searchAddress $scope.prms
+    if $scope.selectedStore
+      $scope.notLoaded $scope
+      if $scope.search_prms
+        $scope.searchAddress $scope.search_prms
+      else 
+        $scope.geolocate()
       google.maps.event.addListenerOnce($scope.myMap, 'idle', ->
         _.each $scope.mapMarkers, (marker) ->
           if $scope.selectedStore.id is marker.company.id

  $scope.geolocate = () ->
    return false if !navigator.geolocation || ($scope.reverse_geocode_address && $scope.reverse_geocode_address == $scope.address)

    webshim.ready 'geolocation', ->
      # set timeout as 5 seconds and max age as 1 hour
      options = {timeout: 5000, maximumAge: 3600000}

  FormDataStoreService.init 'MapCtrl', $scope, [
    'address'
    'selectedStore'
    'search_prms'
  ]

  # init vars
