(1) Reloading the UI is just like logging out and back in. SavedVariables are written out to disk, all UI objects in memory are destroyed, and then the whole UI is loaded again just the same as it is when you first logged in. The loading process is pretty much the most basic concept in addon programming; if you're not familiar with it, I'd strongly recommend you go read about it ASAP.
(2) A library for placing icons/pins on the map should just do that. It shouldn't also get into travel distance calculations, finding the fastest routes, telling you which continent Zone X is on, or anything else that is not directly related to "put a pin on the map at this position in this zone". Bloated conglomo-mods like Zygor (at least as you've described it) and the (thankfully long-dead) Cartographer are cautionary tales, not examples worthy of emulation.
If you want some example of world/mini-map display, take a look at Gathermate2. Some parts are definitively deeply tied to Gathermate2 and should be refactored but the whole thing worths looking at. And it's GPL'd.
I have been thinking about two addons who could use such library. I wrote one of them but it just shoehorns its points into Gathermate (which allows it though it lacks a few API). This is what I would expect :
handle a separate database par addon (or even several databases per addon : identify database with an arbitrary keys, which happens to be the addon table when the library is embedded. See how AceEvent handle this),
define pin categories (associate labels and icons to keys),
add pin to any map,
remove any pin ,
show/hide all pins,
clear all pins,
provide some callbacks for user interaction (onEnter, onLeave, onClick) for both minimap and worldmap pins,
(optional or configurable) display pins only on either worldmap or minimap,
(optional or configurable) display nearby pins on minimap border,
(optional or configurable) hide/change minimap pins when the player gets closer to them.
I'm not sure about point categories. It fits addons like gathermate that handles several points with the same labels and icons but it could be awful for addon handling unique points.
Category could be an optional property; a pin with a category would prioritize the category's properties (icon, label, description, etc.), while a pin without a category would just use its own properties. Or, you could just let the addon keep track of its own pins (eg. GatherMate keeps a list of all the Silverleaf pins it's created) and maybe have some kind of "batch update" API in the lib.
You may also want to take a look at the map pin placement code in the CandyBuckets addon series.
Actually GatherMate uses the categories so it stores only (coords => categoryId) pairs ; coords being an integer calculated using LibMapData. This is pretty efficient to store lots of points.
(2) A library for placing icons/pins on the map should just do that. It shouldn't also get into travel distance calculations, finding the fastest routes, telling you which continent Zone X is on, or anything else that is not directly related to "put a pin on the map at this position in this zone". Bloated conglomo-mods like Zygor (at least as you've described it) and the (thankfully long-dead) Cartographer are cautionary tales, not examples worthy of emulation.
I have been thinking about two addons who could use such library. I wrote one of them but it just shoehorns its points into Gathermate (which allows it though it lacks a few API). This is what I would expect :
I'm not sure about point categories. It fits addons like gathermate that handles several points with the same labels and icons but it could be awful for addon handling unique points.
You may also want to take a look at the map pin placement code in the CandyBuckets addon series.