Help:Editing Maps

From LOTRO Lorebook

Jump to: navigation, search

Contents

[edit] Overview

You can add custom Google maps of the LOTRO world to articles in the Lorebook. These maps can contain markers with captions as well as paths.

[edit] Interactive Map Editor

In order to simplify the creation and editing of maps, an interactive map editor has been added to the article edit page. This editor allows you to interactively define a map with lines, markers, and captions. When done, the editor provides the markup that you will need to add to the article to recreate the map.

[edit] Editor Layout

To access the interactive map editor, click the map button in the toolbar:

The editor is made up of several sections:

  1. Map reset control - this control allows you to clear all points on the current map display
  2. Interactive map display - this display shows the current map being edited
  3. Map properties - these controls allow you to set the map size as well as the type of controls used on the map
  4. Path controls - this section lists the current paths on the map and allow you to change their color, add points, or remove them from the map
  5. Markup output - this section shows the article markup that will reproduce the map as currently displayed in the map editor
  6. Map loading controls - this control allows you to load maps from the current article into the interactive editor

Image:MapEditorLayout.gif

[edit] Editing Functions

[edit] Creating a New Marker

To create a new marker simply click on the map where you want the marker to appear. This will cause a new marker to be placed on the map at that location and the caption editor for that marker to be opened. At the bottom of the caption editor bubble are controls for saving the marker, removing the marker, or using the marker to start a new path.

The caption editor allows you to enter any text you want to appear in that marker's popup bubble. Captions are optional for points on the map. If you choose not to enter a caption, the marker will still display on the map, however, the marker itself will not be clickable. Captions can contain regular MediaWiki markup. For example, a caption could be entered as:

 This is [[Area:Bree|Bree]] where the [[Interior:The_Prancing_Pony|Prancing Pony]] is located

This would cause hyperlinks to the Bree and the Prancing Pony pages to be placed in the caption.

NOTE: There is currently a known issue where entering HTML markup in a caption causes the map editor to not function when editing that map. This will be fixed in the next Lorebook update.

Once a marker has been added to the map, you can drag and drop the marker to update its location. You can click on any marker on the map to edit the marker's caption, start a new path with that marker, or remove the marker from the map.

[edit] Creating a Path

After adding a marker to the map, you can click the 'start a path' option in the caption editor to begin drawing a new path. Every click on the map will draw a new line segment from the previous point to wherever you click. After adding all of the desired segments to the path, you can click the 'Save' option next to that path in the Path controls to finish the line.

After you finish drawing the line, two new controls will appear next to the path. The first control allows add new points to the end of the path. When you click this control, the path will become active and any clicks on the map will result in adding new segments to the end of the path.

The second control allows you to change the color of the path. When you click this control, an interactive color selector appears. With this, you can choose a new color for the path.

[edit] Creating a Polygon

The controls for creating a polygon are very similar to those for creating a path. After adding a marker to the map, you can click 'start a polygon' option in the caption editor to start the polygon. You can then click on the map for every vertex of the polygon. After adding all of the desired segments to the shape, you can click the 'Save' option next to that polygon to finish.

After you finish drawing the shape, three new controls will appear next to the color bar. The first control allows append new points to the end of the polygon. When you click this control, the polygon will become active and any clicks on the map will result in adding new segments to the end.

The other two controls allow you to change the line and fill color of the polygon.

NOTE: In the current release, the text label for the 'start a polygon' control is missing. This control shows up with the text 'undefined' in the caption editor bubble.

[edit] Adding Labels

Using the controls above the map, you can switch from adding points to adding labels. When you are adding labels, every click on the map will result in a new text label being added.

Below the map, controls appear for each label which allow you to customize the text, font size, and color of the label as well as remove it from the map.

[edit] Updating the Article

Once you have created your desired map, you need to add it to the article. It is very important to remember this step as the interactive editor will not do any updates to the actual article content.

Below the map, the markup for re-creating that map is shown. To update the article, simply copy and paste this markup into the article at the desired location.

[edit] Editing an Existing Map

If an article already contains one or more maps, you can load these maps into the interactive editor to make change to them.

NOTE: as stated above, when you edit a map, the article markup is not directly modified. You will need to copy and paste the updated markup into the article to save your changes.

If the article contains exactly one map, this map will automatically be loaded into the interactive editor when you click the map button in the toolbar. If the article contains multiple maps, the map editor will be initialized with a new, empty map. You can use the 'Load map' control to load one of the maps from the article. Maps are listed in the order they appear within the article.

[edit] Editing Map Markup Directly

In addition to editing a map using the interactive editor, you can edit a map by modifying the markup of the article directly. While this is not generally the quickest way to create a map, it is very useful for some types of changes such as entering large captions, copying points and paths, or reordering points in a path.

The following table describes the XML tags used to create a map:

Tag Attributes Child Tags Description
googlemap glat - latitude
glng - longitude
height - height in pixels
width - width in pixels
controls - type of map controls
zoom - zoom level (0-7)
gpoint, gpath The overall map tag for a map containing the paths and points specified with the child gpath and gpoint tags.
gpoint glat - latitude
glng - longitude
none A single point on the map (may be part of a path). The content of this tag is used as the caption for the point.
gpath color - hex color (include the '#') gpoint A path on the map made of up the points specified in the child gpoint tags.
This page was last modified 13:27, 21 August 2007.