Open main menu

UESPWiki β

User:Daveh/Editable Map Notes

< User:Daveh

Existing Editable MapsEdit

  • Very complex and feature complete for world map data.
  • Basic Elements: Node, open-path, closed-path, relations
  • Elements have tags with additional information
  • Changes grouped into changesets
  • Database Schema
  • Edit/add places and roads
  • Review edits from other users
  • Likely editable maps supported through the maps API

Other Existing ResourcesEdit

  • MediaWiki

Existing Game MapsEdit

  • Flash based but lets you create custom maps. Appears to be down.


ConcernsEdit

  • Performance -- Number of dynamic objects visible at one time. How many can a typical desktop or mobile browser handle? What server capacity is needed?


Prototype DesignEdit

  • Basic Elements
  • Location (point)
  • Path (open array of lines)
  • Area (closed array of lines)
  • Map tile (image)
  • Basic Actions
  • View (read)
  • Add
  • Edit
  • Delete
  • Permission
  • User level (anonymous, user, editor, admin, etc...)
  • Per-Element
  • Per-Action

Element PropertiesEdit

  • Common Attributes
  • Title (short text)
  • Title style (CSS text)
  • Description (long text)
  • Wiki page (text)
  • Display level (integer)
  • Visible (boolean)
  • Edit user (ID)
  • Edit time (time/date)
  • Edit summary comment (short text)
  • Location
  • Position (coordinate)
  • Icon image (text)
  • Icon image size (integer x2)
  • Path
  • Points (coordinate array)
  • Line style (CSS text)
  • Area
  • Points (coordinate array)
  • Line style (CSS text)
  • Fill style (CSS text)
  • Map tile
  • Cell position (coordinate)
  • Zoom level (integer)
  • File name (short text)


Database DesignEdit

  • map
Holds information on one map world. A map can be en entire exterior world or just a small interior cell.
     CREATE TABLE IF NOT EXISTS world (
         id BIGINT NOT NULL AUTO_INCREMENT,     -- primary key
         name TINYTEXT NOT NULL,
         displayName TINYTEXT NOT NULL,
         description TEXT NOT NULL,
         wikiPage TEXT NOT NULL,
         cellSize INTEGER NOT NULL,
         minZoom INTEGER NOT NULL,
         maxZoom INTEGER NOT NULL,
         posLeft INTEGER NOT NULL,
         posTop INTEGER NOT NULL,
         posRight INTEGER NOT NULL,
         posBottom INTEGER NOT NULL,
         enabled TINYINT NOT NULL,
         type TINYINT NOT NULL,                 -- 0=exterior, 1=interior, etc...?
         PRIMARY KEY ( id )
     );
  • world_history
Almost the same structure as world but holds all world revision data (including the current revision data).
    CREATE TABLE IF NOT EXISTS world_history (
         id BIGINT NOT NULL AUTO_INCREMENT,   -- primary key
         worldId BIGINT NOT NULL,             -- Foreign key to world table 
         revisionId BIGINT NOT NULL,          -- Foreign key to the revision table
                                              -- Same as world fields except for id
         PRIMARY KEY ( id )
    );
  • location
Contains the current data for all location types:
    CREATE TABLE IF NOT EXISTS location (
         id BIGINT NOT NULL AUTO_INCREMENT,   -- primary key
         worldId BIGINT NOT NULL,             -- foreign key to the world table
         revisionId BIGINT NOT NULL,          -- foreign key to the revision table
         destinationId BIGINT,                -- foreign key to the location table for teleporting
         locType TINYINT NOT NULL,            -- 1=point, 2=path, 3=area
         displayData TEXT NOT NULL,           -- JSON object for extra display data
         iconName INTEGER NOT NULL,           -- Display name for icon
         locX INTEGER NOT NULL,
         locY INTEGER NOT NULL,
         locWidth INTEGER NOT NULL,
         locHeight INTEGER NOT NULL,
         name TINYTEXT NOT NULL,
         description TEXT NOT NULL,
         wikiPage TEXT NOT NULL,
         displayLevel INTEGER NOT NULL,
         visible TINYINT NOT NULL,
         PRIMARY KEY ( id )
    );
  • location_history
Almost the same structure as location but holds all location revision data (including the current revision data).
    CREATE TABLE IF NOT EXISTS location_history (
         id BIGINT NOT NULL AUTO_INCREMENT,   -- primary key
         locationId BIGINT NOT NULL,          -- Foreign key to location table 
         revisionId BIGINT NOT NULL,          -- Foreign key to the revision table
                                              -- Same as location fields except for id
         PRIMARY KEY ( id )
    );
  • revision
Holds revision information in the similar manner to the MediaWiki revision table. It holds a reference to one edit to a location or world record:
    CREATE TABLE IF NOT EXISTS revision (
         id BIGINT NOT NULL AUTO_INCREMENT, -- primary key
         parentId BIGINT,                   -- key to the parent revision in this table
         worldId BIGINT,
         locationId BIGINT,
         worldHistoryId BIGINT,             -- foreign key to the world_history table
         locationHistoryId BIGINT,          -- foreign key to the location_history table
         editUserId BIGINT NOT NULL,        -- foreign key to the MediaWiki's user table
         editUserText TEXT NOT NULL,        -- plain text of the MediaWiki's user name
         editTimestamp TIMESTAMP NOT NULL,
         editComment TEXT NOT NULL,
         patrolled TINYINT NOT NULL,
         PRIMARY KEY (id)
    );
  • location_cache
Holds visible location data by cell coordinate for quicker and easier access:
    CREATE TABLE IF NOT EXISTS location_cache (
         id BIGINT NOT NULL,             -- primary key
         worldId BIGINT NOT NULL,        -- foreign key to the world table
         locationId BIGINT NOT NULL,     -- foreign key to the location table
         posX INTEGER NOT NULL,
         posY INTEGER NOT NULL,
         PRIMARY KEY (id)
    );
  • Users
Use the MediaWiki users table.
  • Permissions
Use the existing MediaWiki permission system as much as possible. MediaWiki permissions are based on a simple 2-dimensional array configured like:
    $wgGroupPermissions[GROUPNAME][PERMISSION] = { true | false };
Based on this format the following custom permissions would be needed:
  • map_read_maps
  • map_read_points
  • map_read_paths
  • map_read_areas
  • map_read_tiles
  • map_edit_maps
  • map_edit_points
  • map_edit_paths
  • map_edit_areas
  • map_edit_tiles
  • map_add_maps
  • map_add_points
  • map_add_paths
  • map_add_areas
  • map_add_tiles
  • map_delete_maps
  • map_delete_points
  • map_delete_paths
  • map_delete_areas
  • map_delete_tiles
  • map_patrol_maps
  • map_patrol_points
  • map_patrol_paths
  • map_patrol_areas
  • map_patrol_tiles
We can also make a few custom groups for easier administration of map rights:
  • map_editor
  • map_patroller
  • map_admin

Simple Load TestEdit

  • Setup
  • 1 map
  • 1 million random locations
  • content3 database
  • Selecting directly from the location table over a set position range:
  • No Index, 9092 rows = 525 ms
  • No Index, 450 rows = 520 ms
  • Index on XY, 450 rows = 52 ms (4 ms cached)
  • Index on XY, 114299 rows = 634 ms
  • Index on XY, 4863 rows = 521 ms (1.7 ms cached)
  • Selecting from the location_cache table over a set cell range:
  • Cell size of 4096
  • No Index, 62637 rows = 178 ms
  • No Index, 10496 rows = 134 ms (1.7 ms cached)
  • Index XY, 10496 rows = 128 ms (1.6 ms cached)
  • Join, No Index, 10496 rows = 220 ms
  • Join, Index XY, 10496 rows = 209 ms
  • Cell size of 1024
  • No Index, 650 rows = 126 ms (0.4 ms cached)
  • Index XY, 650 rows = 31 ms (0.3 ms cached)
  • Join, No Index, 650 rows = 131 ms (0.5 ms cached)
  • Join, Index XY, 650 rows = 36 ms (0.5 ms cached)
  • Rebuild cache with proper location sizing (1.25 million cache entries)
  • No Index, 833 rows = 155 ms (0.38 ms cached)
  • Index XY, 833 rows = 39 ms (0.35 ms cached)
  • Join, Index XY, 833 rows = 199 ms (0.77 ms cached)


Implementation NotesEdit

  • World table
  CREATE TABLE IF NOT EXISTS world (
        id BIGINT NOT NULL AUTO_INCREMENT,     -- primary key
        parentId BIGINT NOT NULL,              -- Key to parent map in world table or 0
        name TINYTEXT NOT NULL,
        displayName TINYTEXT NOT NULL,
        nullImageTile TINYTEXT NOT NULL,
        description TEXT NOT NULL,
        wikiPage TEXT NOT NULL,
        cellSize INTEGER NOT NULL,
        minZoom INTEGER NOT NULL,
        maxZoom INTEGER NOT NULL,
        zoomOffset INTEGER NOT NULL,
        posLeft INTEGER NOT NULL,
        posTop INTEGER NOT NULL,
        posRight INTEGER NOT NULL,
        posBottom INTEGER NOT NULL,
        enabled TINYINT NOT NULL,
        PRIMARY KEY ( id )
        -- index on name?
        -- index on displayname?
        -- initial x/y/zoom?
    );
  • Search Index
  • For location
   FULLTEXT KEY `ft_search` (`name`,`description`)
  • For world
   FULLTEXT KEY `ft_search` (`displayName`,`description`)

ESOMap Change NotesEdit

  • ToDo
  • Add new maps from March Beta
  • stormhaven/emericsdream
  • auridon/abandonedmine
  • auridon/hazikslair
  • auridon/reliquaryvaultbottom
  • auridon/reliquaryvaulttop
  • bangkorai/bisnensel
  • bangkorai/nchuduabtharthreshold
  • coldharbor/caveoftrophies
  • coldharbor/caveoftrophiesupper
  • coldharbor/greatshackle1
  • coldharbor/themooring
  • greenshade/shroudedhollowcenter
  • guildmaps/chateaumasterbedroom
  • malabaltor/tempestislandncave
  • malabaltor/tempestislandncave
  • malabaltor/tempestislandsecave
  • malabaltor/tempestislandswcave
  • reapersmarch/jodeplane
  • reapersmarch/urcelmosbetrayal
  • shadowfen/tsanji
  • stonefalls/tormentedspireinstance
  • therift/arcwindpoint
  • Fixed missing zoom11 images for multiple maps
  • Fixed missing zoom11 images for the Castle of the Worm maps
  • Set focus to location name when opening a popup
  • Tweaked the location labels to make them more display
  • Updated the group map list
  • Made the top buttons fit/wrap better in thin windows
  • Fill in defaults for common names for a new location
  • Prevent title linking on locations with no wikiPage set
  • Prevent locations with no icon from showing image in search list
  • Change map list to a hideable dropdown and move search list over
  • Improve paths
  • How to edit lines
  • Definition of "mouse over" on a path
  • Prevent a path from "hiding" objects below it, including dragging the map
  • Prevent text selection when dragging path nodes
  • Proper images for the pan and zoom controls
  • Permit -'ve numbers to represent worlds in a location's destinationId
  • Add more missing maps from Category:Online_Pages_Needing_Maps
  • Update map tiles from March beta
  • Added one more zoom level (zoom11) to all ESO maps
  • Created FULLTEXT indexes on world and location
  • Label the location destinationId and world parentId edit fields
  • Permit changing the location type
  • Have a "default style" list to make selecting display styles consistent and fast
  • Make mobile usable
  • Added basic zoom and pan controls
  • Add touch events (currently added but not working)
  • Minor: Make arrow for custom icon type list match default list
  • Minor: Vertically center icons in the icon type list (not as easy as it should be)
  • Doubled Maps (looks like there are two identical maps used in the game)?
  • Cave of Broken Souls
  • Blackforge
  • Switch to a non-paging type pan
  • Search
  • Added basic search ability
  • Allow searching for parts of words?
  • Add icon for worlds (made bold)
  • Key Shortcuts
  • ESC key to cancel edit dialogs
  • Arrow keys to pan
  • +/- to zoom
  • Add a map key/legend
  • Filters to display only certain location types
  • Skyshards (including inside child maps?)
  • Wayshrines
  • Crafting Stations
  • Crafting Stores
  • Quests (limit to certain quest?)
  • Crafting Nodes
  • Containers
  • Display icon in drop-down list
  • Change hover cursor to hint at editing a location
  • Cursor type over path?
  • Implement a showhidden query parameter
  • Make it work for disabled worlds?
  • Implement a centeron query parameter
  • Add a display level for the label?
  • Add line styles (dashed, solid, etc...)? No cross-browser support for it yet.
  • Zone coordinates range from (0,0)-(1,1) over the map image tile
  • Add a circle/rectangle location types?
  • Check left padding in input boxes (W is clipped on left edge, something to do with font or text box and not CSS/padding)
  • Add tooltips when hovering over a location (for locations with labelPos == 0)
  • Fixed missing zoom11 tiles for some locations
  • Change position of point location
  • Remove icon preview for iconType == 0
  • Swap "Bottom Left" and "Bottom Right" label position names
  • Check alignment of "Bottom Left"
  • Proper label position alignment for size of icon
  • Permit line wrapping/splitting of label text?
  • Highlight location (for jumps without having to display popup)
  • Color selection dialog
  • Update map index on name change?
  • Prevent double saving (disable edit form buttons during save)
  • List revisions/edits
  • Revert edits, revert to specific revision
  • Proper deletions, revert deletion
  • Patrol edits
  • Proper permissions
  • In-wiki version
  • Fix tabbing and keystrokes with the icon type list
  • Remove location if display level changed on edit
  • Properly use the location's displayLevel when redrawing locations
  • Zone Notes
  • Harbourage has multiple entrances (one in each of the 3 alliances)
  • Cheesemonger has 3 different entrances
  • There are two different Carzog's Demise zones (same map)
  • Clear search results on a blank search
  • Change popup to match in-game colors (gold border, black background, white bold text)
  • Fix wiki links with single quotes in them
  • Remove Online: from existing wiki links
  • Icons
  • Fishing Hole
  • Treasure Map (79)
  • Armor Smith (currently the same as Clothier?)
  • Removed Armory (same as Armor Smith)
  • Rename Portal to Oblivion Portal
  • Named Mob = 83
  • Rename Medium Armor to Leatherworker
  • 31 is same as 36
  • 38 is same as 24
  • 62 is same as 59
  • Tweak size of some of the smaller icons (the following don't have any higher resolution ones available)
  • Mystic (20)?
  • Heavy Armor (32)?
  • Light Armor (33)?
  • Leatherworker (37)?
  • Blacksmith (44)?
  • Lore book (smaller)
  • Treasure map (smaller)
  • Invert the quest icon
  • Invert the quest door icon
  • Home/House icon (80)
  • Icon for Grocer (use Provisioner = 39)
  • Icon for "tree" = Grove (66)
  • Icon for Quest Start
  • Brewer icon (smaller version of Inn/11)
  • Chef icon (Provisioner = 39)
  • Renamed 44 (Weapon Smith) to Blacksmith
  • Weaponsmith (crossed swords = 42)
  • Rename Bag Vendor to Pack Merchant
  • Icons for crafting stations (enchanting, alchemy, woodworking, clothier, blacksmith, provisioning)
  • Alchemy Station = 84
  • Enchanting Table = 85
  • Blacksmith Station = 86
  • Woodworking Station = 87
  • Clothing Station = 88
  • Cooking Fire = 28
  • Merchant (General Vendor = 34)
  • NPC icon (81)
  • Icons for containers (chest, barrel, bag, sack, produce, heavy sack, crate) = 91
  • Chest = 83
  • Heavy Sack = 89
  • Icons for crafting nodes (ore, plant, jute, water skin, cup) = 90
  • Lore book icon (76)
  • Mystic = arcanist</strike
  • Chef = provisoner
  • Grocer = provisoner
  • Brewer = provisoner
  • Magus = mages guild
  • Armorer = heavy armor
  • Rename respec... to Rededication Shrine
  • Innkeeper = merchant
  • Boatswain
  • Armsman = fighters guild
  • Tailor = hood icon (light armor?)
  • Carpenter = woodworker
  • Add alliance color coded icons for: Keep, Temple, Border Gate, Artifact Gate, Outpost, Mine, Farm, and Lumber Mill