I am using the following default code for the map example like this:

function($scope, uiGmapGoogleMapApi) {
// Do stuff with your $scope.
// Note: Some of the directives require at least something to be defined originally!
// e.g. $scope.markers = []

// uiGmapGoogleMapApi is a promise.
// The "then" callback function provides the google.maps object.
    // Configuration needed to display the road-map with traffic
    // Displaying Ile-de-france (Paris neighbourhood)
    $ = {
        center: {
          latitude: -23.598763,
          longitude: -46.676547
        zoom: 13,
        options: {
            mapTypeId: google.maps.MapTypeId.HYBRID, // This is an example of a variable that cannot be placed outside of uiGmapGooogleMapApi without forcing of calling the helper outside of the function
            streetViewControl: false,
            mapTypeControl: false,
            scaleControl: false,
            rotateControl: false,
            zoomControl: false


I’d like to incorporate the default location to be the user’s location. I found a snippet of code that appears to do what I need but have no idea how to incorporate it. Here is the snippet, can you help me adjust the default code:

geocoder = new maps.Geocoder();
geocoder.geocode({‘latLng’: latlng}, function(results, status) {
// Do something with result

What do you think?