Personal tools

Map Quick Guide

From YETI Wiki
Jump to: navigation, search

Map Guide!

v0.1



The basics of placing a map on a wiki page are very simple! After reading through this short article, you should have a good grasp of everything you need to get started. For those who know a thing or two but need to brush up on their syntax, jump to the bottom for the Quick Reference!

Basics

{{#display_map:kofu}}

This will show a map of Kofu with the default settings. Go ahead and try it!

You can replace Kofu with anything. If Google Maps can find it, it will work. Try replacing Kofu with "Madrid, Spain" and see for yourself.

{{#display_map:Madrid, Spain}}

But what if Google Maps is having trouble finding what you want? You may also use coordinates to show a precise location. For example,

{{#display_map:33.12592,-117.31096}}

In fact, using coordinates is the best way to make sure your map works! You may use the following website to easily find coordinates: [1]

Options

Now we know the basic format for displaying a map:

display_map:location

But what if you want to show the map at a different zoom level, or if you want to show a terrain map instead of a roadmap? Luckily, there are all kinds of ways that you can easily customize your map! The basic form of how you include these extra options is simple:

display_map:location|option1|option2|...

The order of your options doesn't matter! Just put them in there. This is an example of a map with a few options included:

{{#display_map:33.12592,-117.31096|zoom=16|type=hybrid|autozoom=on|service=googlemaps2}}

I will list a set of useful options at the end of this article.

Points of Interest

Oftentimes we want to point out locations on our map. The way to do this varies depending on what "service" is being used to display the map. By default the YETI wiki is currently using the service Google Maps v2 (service=googlemaps2). To display points with the service, you will use the parser display_points instead of display_map. An example of a map with points is:

{{#display_points:Kofu;Enzan;Minami Alps|service=googlemaps2|zoom=11}}

Two things to note here are that: 1. "Minami Alps" has a space in it, which is perfectly acceptable; and 2. I set the zoom level to 11 in order to fit all of the points within the viewable portion of the map. By default, the parser display_points will center the map in the middle of the locations that you provide it.

Here is another example with the same points:

{{#display_points: Kofu~[[Kofu]]~Capital of Yamanashi; Enzan~Somewhere out East; Minami Alps~Just Another City~Some cool cats chill around here| autozoom=off|service=googlemaps2|zoom=11}}

In this example, we see that line breaks are okay! In fact, creating line breaks (pressing enter) between each marker is a good practice as it will help with readability for other users.

If you look at the map that this creates, you can see that clicking on the markers now reveals descriptions. Refer to the quick reference at the end of this article for marker description options.

While we use Google Maps v2 as the default service, you are free to choose another if you require its functionality. However, please note: The YETI wiki is set to Google Maps v2 because it supports the disabling of scroll wheel zoom on maps. With our current design, having the scroll wheel zoom enabled makes navigating the page extremely inconvenient. Please only use a different service if you need its functionality, as Google Maps v2 is the only service that currently provides this feature.



Quick Reference:

Map Template (Feel free to copy / paste!)

{{display_points:35.65,138.56|autozoom=off|service=googlemaps2|zoom=12|additional_options_here}}

  • The symbol ; acts as a breaker between different locations, and the symbol | acts as a breaker between different options.


Suggested Format

display_points:coords|autozoom=off|service=googlemaps2

  • Please use these two options as a bare minimum to make sure that your maps function properly.

Useful Options

Format

Name (paramater=[default],variable1,variable2)

Options

Height (height=[px],number%)

Width (width=[px],number%)

Service (service=[googlemaps2],osm,openlayers,yahoomaps,googlemaps,googlemaps3)

Center (center=location)

Zoom Level (zoom=#)

Map Type (type=[roadmap],satellite,hybrid,terrain)


Marker Descriptions

Format

display_points: location1~title~description; location2~description| ...

Description Formatting

Title - A title will be displayed if two data entries for one location are provided. The first entry will be used for the title.

Description - If only one entry is provided, it will be formatted as a plain description. If two entries are provided, the first will be a title and the second will be the description.

[[title]] - Setting your title inside two square brackets will cause the title to act as a link to the wiki article of that name.




For more information on how to use maps in the YETI wiki, please go to: [2]