I have found a way how to open town map.
Example with Daggerfall:
Lua Code:
SCENE_MANAGER:Show("worldMap") --open WorldMap
ZO_WorldMap_SetMapByIndex(2) --2 = Glenumbra
ProcessMapClick(0.2868,0.7441) --town coordinates
CALLBACK_MANAGER:FireCallbacks("OnWorldMapChanged") --refresh map
Coordinates are for any point inside of the subzone area on the zone map. In this example I have used coordinates from tooltip on
Esohead maps. BTW anyone knows how to open Esohead map at the selected point? I believe that numbers after # are mapCode, zoom, locX, locY. But zoom does not work for me
.
Also there is a function that can tell you if there is any subzone at the selected coordinates:
Lua Code:
local locationName, textureFile, widthN, heightN, locXN, locYN = GetMapMouseoverInfo(normalizedMouseX, normalizedMouseY)
If location name is empty string, there is no subzone.