What I would do is move the MapLayer outside of the method and make them global (at the class level). Then I would create another method like this:
MapLayer layer1;
public MyClass()
{
layer1 = new MapLayer;
}
private void AppendPushpin(GeoCoordinate MyGeoPosition, string pushpinName)
{
Pushpin pushpin1 = new Pushpin();
pushpin1.GeoCoordinate = MyGeoPosition;
pushpin1.Content = pushPinName;
MapOverlay overlay1 = new MapOverlay();
overlay1.Content = pushpin1;
overlay1.GeoCoordinate = MyGeoPosition;
layer1.Add(overlay1);
}
*EDIT
In your case, where you need to store that variable application-wide, you would want to persist that MapLayer object doing something like this:
Windows.Storage.ApplicationDataContainer localSettings = Windows.Storage.ApplicationData.Current.LocalSettings;
localSettings.Values["MapLayer"] = layer1;
Its up to you on where you need to set and get this global variable.