Help:Maps
|
Adding a Map to articles is simple. Note that many articles already have the ability to display a mini map in their information panels on the right hand side of the article.
See the following for more details:
Contents
Adding an extract from SABRE Maps[edit]
To add a SABRE Maps extract, something similar to the following needs to be used :
<sabremap lat=52.826415 lon=-1.454872 layer=mot zoom=12 trace=A4/A449.osm />.
The latitude and longitude of a point can be found by clicking on a point in SABRE Maps.
Parameters used[edit]
The parameters are as follows:
Attribute | Optional? | Description | Example | Default |
---|---|---|---|---|
lat | Necessary | Latitude of the map centrepoint | 52.826415 | |
lon | Necessary | Longitude of the map centrepoint | -1.454872 | |
zoom | Necessary | Zoom level of the map | 12 | |
layer | Optional | Map layer to show |
mot (OS 1923 MoT Half Inch)
|
OpenStreetMap with no parameter used |
trace | optional | Route trace location. Only currently works for existing roads shown on OpenStreetMap, and needs to be exactly correct to work | Works as <directory>/<road title>.osm
e.g. A-Roads trace=A4/A449.osm For multiple roads trace=A4/A449.osm;A4/A44.osm (note the semi colon) Motorways trace=M6/M62.osm B-Roads trace=B1/B1321.osm | |
height | optional | Height of the map box | Most wiki pages use height=350 some use =400 etc. |
Adding a Google Map[edit]
You should see this icon File:Google Maps Extension Toolbar Icon.gif on the toolbar, click it. You should now see several components:
Search Box[edit]
This box works just like it would on the Google Maps website.
If it finds an address match, it will bring that up on the map. You then have the option to save the marker there (click "save and close"), or not (click "remove"). Feel free to edit the label or drag the marker around.
If the search doesn't find an address, it will kick off a local search centered where the map currently is. Cool, huh? The results will appear below the search box, and you'll have the option to add any or all of them to the map. Try a generic search, like "food".
The Map[edit]
Click anywhere on the map. A marker should magically appear, and you can either enter in a caption and hit "save", or hit "remove". If you save it, you can then drag the marker around, or click it again to edit the caption.
Paths[edit]
You can click "start path here" in the balloon. This will save your caption and close the balloon. The next time you click the map, there will be a coloured line between the previous point and the place you just clicked. Keep clicking around on the map to make a path with lots of turns. Each will be represented by a small yellow icon. You can drag any of these around the map. Try it! If you click on one of these yellow icons, you'll have the option to remove it, or to add a caption. As you make your path, you should see its length being updated just above the map. There will also be a link that says "Save". If you click "Save", the next time you click the map, it will NOT extend the path. It will just create a new, unattached point.
After you've save your path, you might notice the link that says "change color". Try clicking it. It should bring up a fancy color selector like you see in PhotoShop. Pick a new colour and click "OK". Neat, huh? You can also adjust the opacity of the path - the lower the value, the more translucent it will be on the map.
The Control Panel[edit]
This is the part where you can select the map's height and other stuff. It's pretty self-explanatory.
The <googlemap> tag[edit]
This will contain the current state of the map you see. It captures the current zoom level, the map's dimensions and center, all the markers and paths, and some other stuff too. If you paste this tag into the article, and hit "Preview", you should get a map like whatever the editor's map just looked like.
It is important that you copy and paste the <googlemap> tag into the article, otherwise it will not be saved, this applies even when editing an existing map.
Load this map[edit]
By default, when you click "make a map", the extension will look in the article for a map to load, and load the first one it finds. If there are multiple maps on a page, you can load any map. Click "refresh list" just above the article, and then choose which map you'd like to load. Click "load map", and all of that map's attributes will be loaded into the Editor's Map for you to manipulate. Don't forget to paste the result back into the article!!
The Google Maps section, based on [1] is available under the GNU Free Documentation License.