Skip to content

Commit

Permalink
Actualización readme.md
Browse files Browse the repository at this point in the history
  • Loading branch information
irenevinas committed Jul 14, 2020
1 parent d6d2df4 commit 3b1da90
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 121 deletions.
124 changes: 3 additions & 121 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ const map = M.map({
y: 4493011.77,
},
projection: "EPSG:3857*m",
zoom: 15,
zoom: 8,
});

const mpMirrorPanel = new M.plugin.Mirrorpanel();
Expand All @@ -93,15 +93,14 @@ const map = M.map({
y: 4493011.77,
},
projection: "EPSG:3857*m",
zoom: 15,
zoom: 8,
});

const mpMirrorPanel = new M.plugin.Mirrorpanel({
position: 'TR',
collapsible: true,
collapsed: false,
modeViz: 0,
enabledPlugins: true,
enabledKeyFunctions: true,
showCursors: true,
defaultBaseLyrs: [
Expand All @@ -112,121 +111,4 @@ const mpMirrorPanel = new M.plugin.Mirrorpanel({
});

map.addPlugin(mpMirrorPanel);
```

## Ejemplo 2
### Con plugin BackImgLayers

```javascript
const map = M.map({
container: 'mapjs',
center: {
x: -667143.31,
y: 4493011.77,
},
projection: "EPSG:3857*m",
zoom: 15,
});

let backImgLayerParams = {
position: 'TR',
collapsible: true,
collapsed: true,
layerId: 0,
layerVisibility: true,
layerOpts: [
{
id: 'mapa',
preview: 'http://componentes.ign.es/api-core/plugins/backimglayer/images/svqmapa.png',
title: 'Mapa',
layers: [new M.layer.WMTS({
url: 'http://www.ign.es/wmts/ign-base?',
name: 'IGNBaseTodo',
legend: 'Mapa IGN',
matrixSet: 'GoogleMapsCompatible',
transparent: false,
displayInLayerSwitcher: false,
queryable: false,
visible: true,
format: 'image/jpeg',
})],
},
{
id: 'imagen',
title: 'Imagen',
preview: 'http://componentes.ign.es/api-core/plugins/backimglayer/images/svqimagen.png',
layers: [new M.layer.WMTS({
url: 'http://www.ign.es/wmts/pnoa-ma?',
name: 'OI.OrthoimageCoverage',
legend: 'Imagen (PNOA)',
matrixSet: 'GoogleMapsCompatible',
transparent: false,
displayInLayerSwitcher: false,
queryable: false,
visible: true,
format: 'image/jpeg',
})],
},
{
id: 'raster',
preview: '../src/templates/img/svqmtn.png',
title: 'Ráster',
layers: [new M.layer.WMTS({
url: 'http://www.ign.es/wmts/mapa-raster?',
name: 'MTN',
legend: 'Mapa IGN',
matrixSet: 'GoogleMapsCompatible',
transparent: false,
displayInLayerSwitcher: false,
queryable: false,
visible: true,
format: 'image/jpeg',
})],
},
{
id: 'hibrido',
title: 'Híbrido',
preview: 'http://componentes.ign.es/api-core/plugins/backimglayer/images/svqhibrid.png',
layers: [new M.layer.WMTS({
url: 'http://www.ign.es/wmts/pnoa-ma?',
name: 'OI.OrthoimageCoverage',
legend: 'Imagen (PNOA)',
matrixSet: 'GoogleMapsCompatible',
transparent: true,
displayInLayerSwitcher: false,
queryable: false,
visible: true,
format: 'image/png',
}),
new M.layer.WMTS({
url: 'http://www.ign.es/wmts/ign-base?',
name: 'IGNBaseOrto',
matrixSet: 'GoogleMapsCompatible',
legend: 'Mapa IGN',
transparent: false,
displayInLayerSwitcher: false,
queryable: false,
visible: true,
format: 'image/png',
})
],
},
],
}
const mpBIL = new M.plugin.BackImgLayer(backImgLayerParams);
map.addPlugin(mpBIL);

const mpMirrorPanel = new M.plugin.Mirrorpanel({
position: 'TR',
collapsible: true,
collapsed: false,
modeViz: 0,
enabledPlugins: true,
enabledKeyFunctions: true,
showCursors: true,
backImgLayersParams: backImgLayerParams
});

map.addPlugin(mpMirrorPanel);
```

```
Binary file modified img/mirrorpanel_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 3b1da90

Please sign in to comment.