Deletions are marked like this. | Additions are marked like this. |
Line 36: | Line 36: |
{{{[[address(1600 Pennsylvania Avenue)]]}}} | {{{[[address(950 Elm Avenue)]]}}} |
Line 39: | Line 39: |
{{{[[address(1600 Pennsylvania Avenue, 20500)]]}}} | {{{[[address(950 Elm Avenue, 94066)]]}}} |
All pages on a wiki can be linked to a physical location via Google Maps. The only requirement is that the mapped item have a physical location: Latitude and Longitude or a street address.
How to
To map to an address, add the [[address()]] macro. Insert that command anywhere you wish to map a location.
The address macro will add a map icon to the top of the page. Upon clicking this link, you'll see a smaller version of Google Maps. Click the map icon again to collapse the map.
For instance, [[address(1600 Pennsylvania Avenue, Washington, DC 20500)]] will print the address you enter, as such:
1600 Pennsylvania Avenue, Washington, DC 20500
If a wiki administrator has set a default location for your wiki then you can often leave out the city and state (more on this below).
More advanced: Latitude and Longitude
To map something with Lat/Long coordinates do [[Address("description here", "latitude", "longitude")]]. You can also provide Lat/Long to give a more exact address location, e.g. [[Address("1 Shields Ave., Davis, CA", "better latitude", "better longitude")]]. In that case, the address is really just a description — it helps people reading the page find the place without looking at the map.
Latitude and longitude need to be given in decimal degrees without the degree sign or compass direction. For example, A page is not limited to a single map point. For multiple points, simply add more address macros, they will all be mapped.
For instance, [[address("1 Shields Ave., Davis, CA", "38.537101", "-121.749070")]] will display as
1 Shields Ave., Davis, CA
Making the address shorter
Administrators may set a default city and state for a wiki. If a default location has been set then editors do not need to include such information in their address macros. However, if the default location (it's called "Address locale" in the admin wiki settings) has not been set, users should include city and state alongside their mapped addresses. Oddly, just zip codes doesn't work.
Examples
[[address(1600 Pennsylvania Avenue, Washington, DC, 20500)]]
[[address(1600 Pennsylvania Avenue, Washington, DC)]]
[[address(1600 Pennsylvania Avenue, Washington, District of Columbia)]]
and now with coordinates instead!:
[[address("1600 Pennsylvania Avenue, Washington, DC", "38.89763", "-77.03658")]]
On a wiki with a default location set to Washington, DC, this will also work:
[[address(950 Elm Avenue)]]
This should probably work, but doesn't:
[[address(950 Elm Avenue, 94066)]]
Finding Latitude/Longitude Coordinates
To get finer scale detail, you may feel like you want lat/long coordinates to get the job done. One easy way to do this is to download Google Earth. Go to Preferences > 3D View > Show Lat/Long > and select "Degrees" — this will give you the degree decimal format used by the wiki. You can use the thumbtack tool to nail it down precisely.
(If someone else has another solution, perhaps an open source solution, feel free to add... what about http://www.openstreetmap.org/ ?)
We're working on integrating open street map as a replacement. See mapping discussion
Here's what the maps look like, in general.