Config option for tile layers.
See: https://github.com/freifunkhamburg/ffffng/issues/23
This commit is contained in:
parent
51978bfd70
commit
7c09523e53
|
@ -342,6 +342,12 @@ module.exports = function (grunt) {
|
||||||
'fonts/*'
|
'fonts/*'
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
expand: true,
|
||||||
|
cwd: '<%= yeoman.app %>/bower_components/leaflet-dist/images',
|
||||||
|
dest: '<%= yeoman.dist %>/client/styles/images',
|
||||||
|
src: ['*.png']
|
||||||
|
},
|
||||||
{
|
{
|
||||||
expand: true,
|
expand: true,
|
||||||
cwd: '.tmp/images',
|
cwd: '.tmp/images',
|
||||||
|
|
|
@ -29,20 +29,9 @@ angular.module('ffffng')
|
||||||
zoom: config.coordsSelector.defaultZoom
|
zoom: config.coordsSelector.defaultZoom
|
||||||
},
|
},
|
||||||
markers: {},
|
markers: {},
|
||||||
|
hasMultipleLayers: _.size(config.coordsSelector.layers) > 1,
|
||||||
layers: {
|
layers: {
|
||||||
baselayers: {
|
baselayers: config.coordsSelector.layers
|
||||||
osm: {
|
|
||||||
name: 'MapQuest (OSM)',
|
|
||||||
url: 'https://otile{s}-s.mqcdn.com/tiles/1.0.0/map/{z}/{x}/{y}.jpg',
|
|
||||||
type: 'xyz',
|
|
||||||
layerOptions: {
|
|
||||||
subdomains: '1234',
|
|
||||||
attribution:
|
|
||||||
'Tiles © <a href=\"https://www.mapquest.com/\" target=\"_blank\">MapQuest</a>, ' +
|
|
||||||
'Data CC-BY-SA OpenStreetMap'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -123,9 +123,25 @@ f-node-form {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
|
|
||||||
.leaflet-control-layers.leaflet-control {
|
&.map-hide-layers-control .leaflet-control-layers.leaflet-control {
|
||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// reset styling from bootstrap as it breaks the layer control
|
||||||
|
.leaflet-control-layers {
|
||||||
|
input {
|
||||||
|
display: initial;
|
||||||
|
border: initial;
|
||||||
|
box-shadow: initial;
|
||||||
|
width: initial;
|
||||||
|
height: initial;
|
||||||
|
}
|
||||||
|
|
||||||
|
input, label {
|
||||||
|
margin: initial;
|
||||||
|
padding: initial;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttons {
|
.buttons {
|
||||||
|
|
|
@ -59,7 +59,7 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-8">
|
<div class="col-md-8">
|
||||||
<leaflet
|
<leaflet
|
||||||
class="map"
|
class="map" ng-class="{'map-hide-layers-control' : !map.hasMultipleLayers }"
|
||||||
center="map.center"
|
center="map.center"
|
||||||
layers="map.layers"
|
layers="map.layers"
|
||||||
markers="map.markers"
|
markers="map.markers"
|
||||||
|
|
|
@ -51,7 +51,8 @@
|
||||||
"coordsSelector": {
|
"coordsSelector": {
|
||||||
"lat": 53.565278,
|
"lat": 53.565278,
|
||||||
"lng": 10.001389,
|
"lng": 10.001389,
|
||||||
"defaultZoom": 10
|
"defaultZoom": 10,
|
||||||
|
"layers": {}
|
||||||
},
|
},
|
||||||
"otherCommunityInfo": {
|
"otherCommunityInfo": {
|
||||||
"showInfo": true,
|
"showInfo": true,
|
||||||
|
|
|
@ -109,7 +109,8 @@ var defaultConfig = {
|
||||||
localCommunityPolygon: [],
|
localCommunityPolygon: [],
|
||||||
lat: 53.565278,
|
lat: 53.565278,
|
||||||
lng: 10.001389,
|
lng: 10.001389,
|
||||||
defaultZoom: 10
|
defaultZoom: 10,
|
||||||
|
layers: {}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
Loading…
Reference in a new issue