个人工具

模板:Map

出自Meshal Lite

跳转到: 导航, 搜索
 
第1行: 第1行:
<includeonly><div class="litemap-container" style="width:{{#ifeq: {{{width|100%}}}||100%|{{{width|100%}}}}}; height:{{#ifeq: {{{height|600px}}}||600px|{{{height|600px}}}}}; {{{containerstyle|}}}"><div class="litemap-pinLayer" style="width:{{#ifeq: {{{width|100%}}}||100%|{{{width|100%}}}}}; height:{{#ifeq: {{{height|600px}}}||600px|{{{height|600px}}}}};">{{{2|{{{pin|}}}}}}</div><div class="litemap-imageLayer" style="left: {{#ifeq: {{{offx|0}}}||0|{{{offx|0}}}}}; top: {{#ifeq: {{{offy|0}}}||0|{{{offy|0}}}}};}}; {{{imgstyle|}}};"><div style="width: max-content; zoom: {{#ifeq: {{{scale|100%}}}||100%|{{{scale|100%}}}">{{{1|{{{src|}}}}}}</div></div>
+
<includeonly><div class="litemap-container" style="width:{{#ifeq: {{{width|100%}}}||100%|{{{width|100%}}}}}; height:{{#ifeq: {{{height|600px}}}||600px|{{{height|600px}}}}}; overflow:{{#ifeq:{{{scroll|}}}|y|scroll|unset}}; background:{{{bgcolor|transparent}}};{{{containerstyle|}}}"><div class="litemap-labelLayer" style="width:{{#ifeq: {{{width|100%}}}||100%|{{{width|100%}}}}}; height:{{#ifeq: {{{height|600px}}}||600px|{{{height|600px}}}}};">{{{2|{{{label|}}}}}}</div><div class="litemap-imageLayer" style="width:{{#ifeq: {{{width|100%}}}||100%|{{{width|100%}}}}}; height:{{#ifeq: {{{height|600px}}}||600px|{{{height|600px}}}}};"><div style="position: absolute; left: {{#ifeq: {{{offx|0}}}||0|{{{offx|0}}}}}; top: {{#ifeq: {{{offy|0}}}||0|{{{offy|0}}}}}; width: max-content; width: -moz-max-content; width: -webkit-max-content; transform: rotate({{{rotate|0}}}deg) translateZ(0) scale({{#ifeq: {{{scale|100%}}}||100%|{{{scale|100%}}}}}); transform-origin: left top; {{{imgstyle|}}}">{{{1|{{{src|}}}}}}</div></div>
</div></includeonly><noinclude>[[category:模板]]
+
</div></includeonly><noinclude>{{tpl_helpdoc}}</noinclude>
这个模板用来嵌入一张地图,可以调整地图的尺寸和位置,并有一个标注层可供添加标注。
+
 
+
{{block|1 或 src|
+
用作地图的图像文件,可以使用<code>{{tpl|img}}</code>、<code>{{tpl|eximg}}</code>模板来调取图片。
+
}}
+
 
+
{{block|width、height|
+
地图容器的尺寸参数,可使用css格式的参数。
+
*width默认宽度为“100%”
+
*height默认高度为“600px”
+
}}
+
 
+
{{block|containerstyle|
+
地图容器的追加样式属性,可以使用css格式的参数。
+
}}
+
 
+
{{block|scale|
+
地图的缩放比例,可以为百分数或浮点数。
+
*默认为100%
+
}}
+
 
+
{{block|offx、offy|
+
地图的水平偏移值、垂直偏移值。计算偏移值时,以图片左上角为坐标点0,0。
+
*默认为0。
+
*图片向左偏移,则offx设为负数,比如向左偏移10px,设<nowiki>offx=-10px</nowiki>
+
*图片向上偏移,则offy设为负数,比如向上偏移30px,设<nowiki>offy=-30px</nowiki>
+
}}
+
 
+
{{block|imgstyle|
+
地图图片的追加样式属性,可以使用css格式的参数。
+
}}
+
 
+
{{block|2 或 pin|
+
这个参数用于加入<code>{{tpl|mapPin}}</code>,在地图上添加多个图钉点。
+
}}
+
</noinclude>
+

在2019年3月31日 (日) 05:47的最新修订版本