Is there any particular reason you create this control here in the function and not when initializing the map? If I understand this right then it creates an additional control every time the geolocate button is pressed.