Modification buildMarker function.