Marker options not updated in google map?

I have used bellow code. First time it load mad with marker. When second time when i select the second place then marker remains first place. It does not move the second place mapped by latitude and longitude.

var myCenter=new google.maps.LatLng( $rootScope.branchMapLatitude , $rootScope.branchMapLongitude);
return {
restrict: ‘E’,
scope: {
onCreate: ‘&’
link: function ($scope, $element, $attr) {
function initialize() {
// $scope.$apply();
var mapOptions = {
mapTypeId: google.maps.MapTypeId.ROADMAP

   //var map = new google.maps.Map($element[0], mapOptions);        
    var map = new google.maps.Map($element[0],  mapOptions);        
     var marker = new google.maps.Marker({
  position: myCenter,
  map: map,
  title:   $rootScope.branchMapBranchName

// Stop the side bar from dragging when mousedown/tapdown on the map
google.maps.event.addDomListener(marker,$element[0], ‘mousedown’, function (e) {
return false;
$scope.onCreate({map: map});
if (document.readyState === “complete”) {
} else {
google.maps.event.addDomListener(window, ‘load’, initialize);

Please help me…