Help:Maps
From Roader's Digest: The SABRE Wiki
|
Adding a Google Map to articles is simple. Note that articles which include the Junction, Services or Crossings infoboxes, already have the ability to display a mini map, simply by adding the lat and lng attributes.
Contents |
Adding a simple Google Map
You should see this icon
on the toolbar, click it. You should now see several components:
Search Box
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
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
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
This is the part where you can select the map's height and other stuff. It's pretty self-explanatory.
The <googlemap> tag
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
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!!
This page, based on [1] is available under the GNU Free Documentation License.