Some success At Last (the map still move a bit but can be ignored at the moment)!
Declared two variables:
var isAnyMarkerIsInDraggingState = false;// if a marker is in drag state this value will be TRUE otherwise FALSE
var mapCenterPositionAtTheTimeWhenMarkerWasDragged;// Map Center Position
When Marker is dragged:
google.maps.event.addListener(objMarker, 'dragstart', function () {
// Store map center position when a marker is dragged
mapCenterPositionAtTheTimeWhenMarkerWasDragged = mapObject.getCenter();
isAnyMarkerIsInDraggingState = true;
});
When Marker is dropped (drag ends):
google.maps.event.addListener(objMarker, 'dragend', function () {
// Make Map draggable
// Set isAnyMarkerIsInDraggingState = false. Because no marker is in drag state
mapObject.setOptions({ draggable: true });
isAnyMarkerIsInDraggingState = false;
});
When the Map Drag starts:
google.maps.event.addListener(mapObject, 'dragstart', function () {
// isAnyMarkerIsInDraggingState = true: means the user is dragging a marker.
// If the user is dragging the Marker then don't allow the Map to be Dragged
if (isAnyMarkerIsInDraggingState) {
mapObject.setOptions({ draggable: false });
}
});
When Map is in dragging state:
google.maps.event.addListener(mapObject, 'drag', function () {
// isAnyMarkerIsInDraggingState = true: means the user is dragging a marker.
// If the user is dragging the Marker then don't allow the Map to be Dragged and set its CenterPosition
// to mapCenterPositionAtTheTimeWhenMarkerWasDragged
if (isAnyMarkerIsInDraggingState) {
mapObject.setCenter(mapCenterPositionAtTheTimeWhenMarkerWasDragged);
}
});