Module:Mapframe/doc: Difference between revisions

Content deleted Content added
High-use template
GeoJSON
 
(3 intermediate revisions by 3 users not shown)
Line 1:
{{Module rating |beta}}
<!-- Please place categories where indicated at the bottom of this page and interwikis at Wikidata (see [[Wikipedia:Wikidata]]) -->
{{#ifeq:{{SUBPAGENAME}}|sandbox||{{High-use}}}}
{{Lua|Module:Transcluder}}
{{Uses TemplateStyles|Template:Maplink/styles-multi.css}}
On English Wikipedia, this module is called by {{tlx|Maplink}}, see that template's documentation for usage instructions.
== Usage ==
;Standard usage:
:Just use {{tl|Maplink}}, which passes its parameters to this module's {{mono|main}} function as default.
::If a page has a rendering time by Lua of between 5 seconds and 10 seconds using {{tl|Maplink}} the use of the direct module call by syntax like: <code><nowiki>{{#tag:mapframe|[raw GeoJSON]|frameless=[1 for frame]|align=[left/right/center]|text=[caption]|width=[in px]|height=[in px]|latitude=[decimal degrees]|longitude=[decimal degrees]|zoom=[zoom factor]}}</nowiki></code> saves Lua over-head. An example of this substitution is at https://en.wikipedia.org/w/index.php?diff=970846012. Such code minimises the chances of hitting the ten second Lua timeout if the back-end servers are busy.
 
;From another module:
:# Import this module, e.g. <code><nowiki>local mf = require('Module:Mapframe')</nowiki></code>