public static void LoadKMZFromResources(VectorLayer vl, string resname, bool clear, ProcessVectorItem pv) { using (Stream zipStream = Assembly.GetExecutingAssembly().GetManifestResourceStream(resname)) { if (zipStream != null) { if (clear) { vl.Children.Clear(); } vl.LoadKMZ(zipStream, true, pv); } } }