Skip to content

Commit

Permalink
Merge pull request #50 from tcarreira/remove-old-html
Browse files Browse the repository at this point in the history
Remover html que já não é usado
  • Loading branch information
marado authored Oct 25, 2020
2 parents b2849b3 + e6b7677 commit 03bb9d0
Show file tree
Hide file tree
Showing 9 changed files with 32 additions and 332 deletions.
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Os contribuidores iniciais incluem membros de várias comunidades locais ligadas

### O que queremos mapear?

- [x] [bibliotecas](https://interruptorpt.github.io/ate-onde-chega-cultura/bibliotecas)
- [x] [teatros](https://interruptorpt.github.io/ate-onde-chega-cultura/teatros)
- [x] [cinemas](https://interruptorpt.github.io/ate-onde-chega-cultura/cinemas)
- [x] [museus](https://interruptorpt.github.io/ate-onde-chega-cultura/museus)
- [x] [recintos de espectáculo](https://interruptorpt.github.io/ate-onde-chega-cultura/recintos)
- [x] [galerias de arte](https://interruptorpt.github.io/ate-onde-chega-cultura/galerias)
- [x] [monumentos](https://interruptorpt.github.io/ate-onde-chega-cultura/monumentos)
- [x] [bibliotecas](https://interruptorpt.github.io/ate-onde-chega-cultura/mapa?categories=bibliotecas)
- [x] [teatros](https://interruptorpt.github.io/ate-onde-chega-cultura/mapa?categories=teatros)
- [x] [cinemas](https://interruptorpt.github.io/ate-onde-chega-cultura/mapa?categories=cinemas)
- [x] [museus](https://interruptorpt.github.io/ate-onde-chega-cultura/mapa?categories=museus)
- [x] [recintos de espectáculo](https://interruptorpt.github.io/ate-onde-chega-cultura/mapa?categories=recintos)
- [x] [galerias de arte](https://interruptorpt.github.io/ate-onde-chega-cultura/mapa?categories=galerias)
- [x] [monumentos](https://interruptorpt.github.io/ate-onde-chega-cultura/mapa?categories=monumentos)

## Contribuir

Expand Down
54 changes: 0 additions & 54 deletions cinemas.html

This file was deleted.

File renamed without changes.
54 changes: 0 additions & 54 deletions galerias.html

This file was deleted.

26 changes: 25 additions & 1 deletion mapa.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,20 @@
src="https://unpkg.com/leaflet@1.7.1/dist/leaflet.js"
integrity="sha512-XQoYMqMTK8LvdxXYG3nZ448hOEQiglfqkJs1NOQV44cWnUrBc8PkAOcXy20w0vlaXaVUearIOBhiXZ5V3ynxwA=="
crossorigin=""></script>

<script>
function getQueryVariable(variable) {
var query = window.location.search.substring(1);
var vars = query.split('&');
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split('=');
if (decodeURIComponent(pair[0]) == variable) {
return decodeURIComponent(pair[1]);
}
}
}

</script>
</head>
<body>
<style>
Expand All @@ -16,6 +30,14 @@
<div id="mapid"></div>

<script>

var filterCategories = getQueryVariable("categories");
if (filterCategories != undefined){
filterCategories = filterCategories.split(',');
}

console.log(filterCategories);

var categories = [
{ name: "Bibliotecas", icon: "local_library", url: "static-data/bibliotecas.json" },
{ name: "Cinemas", icon: "movie", url: "static-data/cinemas.json" },
Expand Down Expand Up @@ -61,7 +83,9 @@
layer.addLayer(L.marker(coords, { icon }).bindPopup(label));
});

layer.addTo(mymap);
if ( filterCategories == undefined || filterCategories.indexOf(category.name.toLowerCase()) >= 0 ){
layer.addTo(mymap);
}

return { ...category, layer };
}
Expand Down
54 changes: 0 additions & 54 deletions monumentos.html

This file was deleted.

54 changes: 0 additions & 54 deletions museus.html

This file was deleted.

54 changes: 0 additions & 54 deletions recintos.html

This file was deleted.

54 changes: 0 additions & 54 deletions teatros.html

This file was deleted.

0 comments on commit 03bb9d0

Please sign in to comment.