Wiki Help

From OpenStreetMap Wiki
(Redirected from Wiki:Help)
Jump to navigation Jump to search

This is the help page for editing the OpenStreetMap wiki. For support related to any other aspect of OpenStreetMap, please see the Main Help Page.

FAQ

For frequently asked questions about the Wiki, see Wiki FAQ.

Getting started with wiki editing

We aim to build a user friendly wiki that helps OpenStreetMap contributors and users find the information they need quickly and easily. If you can help, please feel free to edit this wiki. Our general advice is to be bold - if a page can be improved, go forth and do it!

Jump straight in: Click 'Edit' at the top of any page, to edit the contents. You do need to create a wiki account before editing.

For introductory instructions on editing wiki pages, see Help:Wiki-Editing. This explains some of the wiki text syntax for achieving special effects in the text such as bold and italic text. You may also wish to visit Wikipedia's help. Wikipedia is the largest online Wiki, and has detailed articles covering almost every imaginable aspect of editing pages. It also has a group of volunteers who answer questions and provide help with editing. The OpenStreetMap Wiki shares the same platform as Wikipedia (namely Mediawiki), so much of what works there will work here too.

Mediawiki software

We cannot cover every topic about Mediawiki at https://wiki.openstreetmap.org/. Please refer to MediaWiki main help site.

Wiki guidelines

Main article: Wiki guidelines

Remember that anyone can edit anything on the OSM Wiki. This includes you. When adding to the wiki, you should seek to find the correct place within the current structure, to build upon the information we already have. This is better than creating a new page as your page where things are written your way. Also be prepared for others to edit the page after you.

The wiki currently needs some re-organisation, and this effort is being coordinated at WikiProject Cleanup. Large-scale re-arrangements or deletions may be necessary in order to achieve this. Feel free to get involved, but for any change which might be viewed as destructive, you should leave a trail of comments on the associated discussion pages, to explain what you are doing and why. For really big changes which might upset someone, it is best to hold a discussion about it first. Propose the change, discuss it, and reach agreement on the best organisation. Different people have different ideas for how to organise the wiki pages.

History and Discussion

All wiki pages have an associated history page where you can view previous versions of the page. You can also undo a recent edit if you are not happy with the result (although it is always worth previewing any changes before saving an edit). This can be accessed at the top right of each wiki page.

In addition to a history, all wiki pages also include a talk page. This is an ideal place to discuss potential changes to a page, particularly if they are large or could be deemed as controversial. This can be accessed by clicking "Discussion" at the top of each page.

Make a user page

You may want to start by editing your user page. It's a page where you can tell us about yourself. This can be standard "bio" profile info, but also think about the OpenStreetMap context e.g. how did you come across OpenStreetMap? What interests you most about it? Where do you contribute? How do you use it?

It's good to write descriptive text to express yourself on your user page, but you can also quickly and easily add Wiki userboxes which are kind of badge to categorise yourself in various ways, or to link to other contact channels in a standard way.

If you wish to tell the OSM community where you are (for example, so neighboring OSM members can collaborate with you to map your locale), place some category links like the following at the bottom of your user page, as necessary to identify the area(s) you want to help map:

[[Category:Users in Country]]
[[Category:Users in State/Province]]
[[Category:Users in City]]

Replace Country with the name of your country, etc. Then your username should appear under the Users by country category tree. If you happen to be the first user in a particular geographical region category (country, city, etc.), the category link at the bottom of your user page will appear in red until someone creates the category page. If you are new to Wiki editing, don't worry about this - someone else should eventually create it for you.

If you upload images of you or other specific for the user page, place it in Category:User images with code [[Category:User images]].

You may also create user subpages, to practice editing before you post something to the main Wiki. Wikipedia provides some help on this.

Display OpenStreetMap

Main article: Wiki:Maps

This is the OpenStreetMap wiki - of course you can insert the OSM's map into any pages. If you want to use dynamic Slippy Map, see section Slippy Maps in Wiki:Maps.

Include images

Include images from Wikimedia Commons

It is possible to include images from Wikimedia Commons on the OSM wiki.

There is no difference in doing this compared to including images as described above. If the image with the given name exists in the OSM wiki, the image from the OSM wiki will be preferred. If not, the image is automatically fetched from Commons (if an image with the specified name exists there).

Short HowTo: Look at Wikimedia Commons for the desired picture and embed it here like this:

[[File:image filename.extension]]

Example:

photograph of Dunvegan Castle on the Isle of Skye in the mist
Dunvegan castle on Isle of Skye
[[File:Dunvegan Castle in the mist01editcrop 2007-08-22.jpg]]

used here with these options:

[[File:Dunvegan Castle in the mist01editcrop 2007-08-22.jpg|thumb|right|
200px|alt=photograph of Dunvegan Castle on the Isle of Skye in the mist|
Dunvegan castle on Isle of Skye]]

Options for resizing and placement are

[[File:image.png|thumb/frame|left/right/center|size in px (e.g. 100px)|
alt=text describing picture (useful for people with screenreaders)|
description here is displayed below the image]]

For a more verbose HowTo see the Picture tutorial on Wikipedia.

Upload (New user restrictions)

Use the "Upload file" option on the lower left sidebar to take you to Special:Upload where you can upload your image. Lots more information on that page, including times when you shouldn't upload a file (or when you should upload to wikimedia commons instead)

See a permissions error? We do not allow brand new wiki users to upload files. Your wiki account must be at least 4 days old and have made at least 10 wiki edits before you are "autoconfirmed". See Wiki:User confirmation

Please, if possible, upload images to Wikimedia Commons - not directly to this wiki (Wikimedia Commons community is specifically about free images and are more experienced in dealing with tricky copyright situations - thousands of files on OSM Wiki are in limbo legal situation due to missing necessary info and it was spotted only years after upload, something that would not happen on Wikimedia Commons).

Wiki text syntax

[[File:image filename.extension]] e.g. [[File:example image.png]]

Options:

[[File:image.png|layout|alignment|size|alt=alternative text|caption]]
parameter possible value comment
layout (empty)
thumb
normal image,
minimized image with frame and caption
alignment left
middle
right
horizontal placement left,
center,
right
size ###px image width in pixel (with "thumb" not necessary)
alternative text text short description (shown when loading fails and as tooltip with mouse hover)
caption text with "thumb": text below the image

External websites

There are some external websites which content can be hotlinked at OSM Wiki, see https://github.com/openstreetmap/chef/blob/master/cookbooks/mediawiki/templates/default/LocalSettings.php.erb#L258

Copyright and licensing

Green copyright.svg
  • Please remember to state source and author, as well as the image rights and license. See Wiki content license.
  • You may use images that are licensed under Public Domain, CC-BY, or CC-BY-SA, for example.

How to purge cache

Include source code

Surround your code with

  • <syntaxhighlight lang="???">...</syntaxhighlight>, or
  • <source lang="???">...</source> (in use, but deprecated by MediaWiki and support may end once [1]),

where "???" is the programming language, one of (listed below in alphabetic order):

abap, abl, aconf, actionscript, actionscript3, ada, ada2005, ada95, agda, ahk, alloy, ambienttalk, ambienttalk/2, antlr, antlr-actionscript, antlr-as, antlr-c#, antlr-cpp, antlr-csharp, antlr-java, antlr-objc, antlr-perl, antlr-python, antlr-rb, antlr-ruby, apache, apacheconf, apl, applescript, arexx, as, as3, asm, aspectj, aspx-cs, aspx-vb, asy, asymptote, at, autohotkey, autoit, awk, b3d, basemake, bash, basic, bat, batch, bbcode, befunge, bf, blitzbasic, blitzmax, bmax, boo, bplus, brainfuck, bro, bsdmake, bugs, c, c#, c++, c++-objdumb, c-objdump, ca65, cbmbas, ceylon, cf3, cfc, cfengine3, cfg, cfm, cfs, chai, chaiscript, chapel, cheetah, chpl, cirru, cl, clay, clipper, clj, cljs, clojure, clojurescript, cmake, cobol, cobolfree, coffee, coffee-script, coffeescript, common-lisp, console, control, coq, cpp, cpp-objdump, croc, cry, cryptol, csh, csharp, css, css+django, css+erb, css+genshi, css+genshitext, css+jinja, css+lasso, css+mako, css+mozpreproc, css+myghty, css+php, css+ruby, css+smarty, cu, cucumber, cuda, cxx-objdump, cypher, cython, d, d-objdump, dart, debcontrol, debsources, delphi, dg, diff, django, docker, dockerfile, dosbatch, dosini, dpatch, dtd, duby, duel, dylan, dylan-console, dylan-lid, dylan-repl, ebnf, ec, ecl, eiffel, elisp, elixir, emacs, emacs-lisp, erb, erl, erlang, evoque, ex, exs, factor, fan, fancy, felix, flx, fortran, foxpro, fsharp, fy, gap, gas, gawk, genshi, genshitext, gherkin, glsl, gnuplot, go, golo, gooddata-cl, gosu, groff, groovy, gst, haml, handlebars, haskell, haxe, haxeml, hs, html, html+cheetah, html+django, html+erb, html+evoque, html+genshi, html+handlebars, html+jinja, html+kid, html+lasso, html+mako, html+myghty, html+php, html+ruby, html+smarty, html+spitfire, html+twig, html+velocity, htmlcheetah, htmldjango, http, hx, hxml, hxsl, hy, hybris, hylang, i6, i6t, i7, idl, idr, idris, iex, igor, igorpro, ik, inform6, inform7, ini, io, ioke, ipython, ipython2, ipython3, ipythonconsole, irb, irc, isabelle, jade, jags, jasmin, jasminxt, java, javascript, javascript+cheetah, javascript+django, javascript+erb, javascript+genshi, javascript+genshitext, javascript+jinja, javascript+lasso, javascript+mako, javascript+mozpreproc, javascript+myghty, javascript+php, javascript+ruby, javascript+smarty, javascript+spitfire, jbst, jinja, jl, jlcon, jproperties, js, js+cheetah, js+django, js+erb, js+genshi, js+genshitext, js+jinja, js+lasso, js+mako, js+myghty, js+php, js+ruby, js+smarty, js+spitfire, json, json-ld, jsonld, jsonml+bst, jsp, julia, kal, kconfig, kernel-config, kid, koka, kotlin, ksh, lagda, lasso, lassoscript, latex, lcry, lcryptol, lean, lhaskell, lhs, lid, lidr, lidris, lighttpd, lighty, limbo, linux-config, liquid, lisp, literate-agda, literate-cryptol, literate-haskell, literate-idris, live-script, livescript, llvm, logos, logtalk, lsl, lua, m2, make, makefile, mako, man, maql, mask, mason, mathematica, matlab, matlabsession, mawk, menuconfig, mf, minid, mma, modelica, modula2, moin, monkey, moo, moocode, moon, moonscript, mozhashpreproc, mozpercentpreproc, mq4, mq5, mql, mql4, mql5, msc, mscgen, mupad, mxml, myghty, mysql, nasm, nawk, nb, nemerle, nesc, newlisp, newspeak, nginx, nim, nimrod, nit, nix, nixos, nroff, nsh, nsi, nsis, numpy, obj-c, obj-c++, obj-j, objc, objc++, objdump, objdump-nasm, objective-c, objective-c++, objective-j, objectivec, objectivec++, objectivej, objectpascal, objj, ocaml, octave, ooc, opa, openbugs, openedge, pan, pas, pascal, pawn, perl, perl6, php, php3, php4, php5, pig, pike, pl, pl6, plpgsql, po, posh, postgres, postgres-console, postgresql, postgresql-console, postscr, postscript, pot, pov, powershell, progress, prolog, properties, proto, protobuf, ps1, psm1, psql, puppet, py, py3, py3tb, pycon, pypy, pypylog, pyrex, pytb, python, python3, pyx, qbasic, qml, r, racket, ragel, ragel-c, ragel-cpp, ragel-d, ragel-em, ragel-java, ragel-objc, ragel-rb, ragel-ruby, raw, rb, rbcon, rconsole, rd, rebol, red, red/system, redcode, registry, resource, resourcebundle, rest, restructuredtext, rexx, rhtml, rkt, robotframework, rout, rql, rsl, rst, ruby, rust, s, sage, salt, sass, scala, scaml, scheme, scilab, scm, scss, sh, shell, shell-session, slim, sls, smali, smalltalk, smarty, sml, snobol, sources.list, sourceslist, sp, sparql, spec, spitfire, splus, sql, sqlite3, squeak, squid, squid.conf, squidconf, ssp, st, stan, sv, swift, swig, systemverilog, tads3, tcl, tcsh, tea, tex, text, todotxt, trac-wiki, treetop, ts, twig, udiff, urbiscript, v, vala, vapi, vb.net, vbnet, vctreestatus, velocity, verilog, vfp, vgl, vhdl, vim, winbatch, winbugs, xbase, xml, xml+cheetah, xml+django, xml+erb, xml+evoque, xml+genshi, xml+jinja, xml+kid, xml+lasso, xml+mako, xml+myghty, xml+php, xml+ruby, xml+smarty, xml+spitfire, xml+velocity, xq, xql, xqm, xquery, xqy, xslt, xtend, xul+mozpreproc, yaml, yaml+jinja, zephir.

Initially this source code formatting and highlighting extension recognized the languages supported by the GeSHI highlighter; since June 2015 (and its integration in MediaWiki since version 1.26 or later, integrated on this wiki since end of May 2017), the extension uses the Pygments highlighter (bundled version 2.0.2) which is much better performing, and the list of supported languages was largely extended, with a few of them removed (old assembly languages rarely used) or supported under different names; this new list of languages also includes various predefined aliases. Additional aliases have also been added by the Mediawiki syntaxhighlight extension itself, for compatiblity with other MediaWiki extensions in order to help the transition from GeSHI to Pygments, including:

asp, bascomavr, basic4gl, cadlisp, cpp-qt, cpp-winapi, c_loadrunner, c_mac, c_winapi, dos, ecmascript, freebasic, gambas, gwbasic, html4strict, html5, j, java5, jquery, locobasic, mapbasic, modula3, netrexx, oberon2, ocaml-brief, oobas, oorexx, oracle11, oracle8, php-brief, plsql, povray, purebasic, pys60, rails, reg, rpmspec, rsplus, sdlbasic, standardml, thinbasic, tsql, upc, urbi, vb, visualfoxpro, visualprolog, xbasic, zxbasic.

Note: You also can (mis)use other language highlighting if your desired languages is not listed. E.g. for Overpass QL code, "cpp" (or just "c" as it avoids highlighting additional C++ keywords such as operator) is often used and looks fine. For Overpass XML code, the "xml" language is fine of course, and for MapCSS code you'll simply use "css".

For fragments of Mediawiki syntax (including invokation of templates and parser functions or in examples shown in template documentation pages), the "html5" language is frequently the best choice (but it won't highlight the wikikinks, template invokations, parser functions and magic keywords, highlighted as if they were part of standard HTML text elements). If the wiki code is a single template invokation (with only one parameter "| name = value" per source line), you may want to use the "ini" language.

For example the wiki syntax:

<syntaxhighlight lang="perl">
#-TEST--------------------------------------------------------------------------
our $help=0;
my $coord;
print "TEST\n\n";
</syntaxhighlight>

will render the embedded Perl source code as:

#-TEST--------------------------------------------------------------------------
our $help=0;
my $coord; 
print "TEST\n\n";

References

See also