Mudanças entre as edições de "Predefinição:MapViewer"
Ir para navegação
Ir para pesquisar
| Linha 1: | Linha 1: | ||
<includeonly> | <includeonly> | ||
<div id="mw-map-viewer-{{{id|default}}}" style="width: {{{width|100%}}}; height: {{{height|500px}}};"></div> | <div id="mw-map-viewer-{{{id|default}}}" style="width: {{{width|100%}}}; height: {{{height|500px}}};"></div> | ||
<script> | <script> | ||
Edição das 09h07min de 8 de abril de 2026
Template documentation
|
|---|
| Note: portions of the template sample may not be visible without values provided. |
| View or edit this documentation. (About template documentation) |
| Editors can experiment in this template's Draft and test case pages. List of all subpages. |
| Usage of this template. |
Descrição
Este widget exibe um mapa interativo com suporte a múltiplos andares, marcadores clicáveis, zoom e pan.
Uso
{{#widget:MapViewer
| id = identificador_unico
| config = JSON_do_mapa
| width = 100%
| height = 500px
}}
Parâmetros
- id
- Identificador único para o container (opcional)
- config
- JSON completo do mapa gerado pelo editor
- width
- Largura do mapa (padrão: 100%)
- height
- Altura do mapa (padrão: 500px)
Exemplo
{{#widget:MapViewer
| id = meu-mapa
| config = {
"mapConfig": {
"initialFloor": 0,
"defaultZoom": 1,
"minZoom": 0.5,
"maxZoom": 3,
"zoomStep": 0.1
},
"layers": [
{
"id": 0,
"name": "Térreo",
"imagePath": "https://exemplo.com/mapa.jpg",
"alignment": {"offsetX": 0, "offsetY": 0, "scale": 1},
"markers": [
{
"id": "marker_1",
"name": "Recepção",
"x": 200,
"y": 300,
"hasBadge": true,
"action": "popup",
"actionData": {"text": "Bem-vindo!"}
}
]
}
]
}
| width = 800px
| height = 600px
}}
Ações Suportadas
- popup - Exibe um modal com informações
- nextFloor - Navega para o próximo andar
- prevFloor - Navega para o andar anterior
- gotoFloor - Navega para um andar específico
- link - Abre um link externo
- none - Sem interação
Atalhos de Teclado
- + / = - Zoom in
- - / _ - Zoom out
- R - Resetar visualização
- PageUp / ↑ - Andar anterior
- PageDown / ↓ - Próximo andar
- Ctrl + Scroll - Zoom