aboutsummaryrefslogtreecommitdiff
path: root/resources
diff options
context:
space:
mode:
Diffstat (limited to 'resources')
m---------resources/leaflet-minimap0
-rw-r--r--resources/map.js10
2 files changed, 8 insertions, 2 deletions
diff --git a/resources/leaflet-minimap b/resources/leaflet-minimap
new file mode 160000
+Subproject e1cc0a5978e6fd68642e5e276a77c7563b7df77
diff --git a/resources/map.js b/resources/map.js
index 7ec9cf5..1e962af 100644
--- a/resources/map.js
+++ b/resources/map.js
@@ -121,9 +121,12 @@ function catchmentAreaProperties(catchmentArea, healthPost) {
}
function initMap(self) {
- self.tileLayer = L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
+ var tileUrl = 'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png';
+ var tileAttribution = 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors';
+
+ self.tileLayer = L.tileLayer(tileUrl, {
maxZoom: 18,
- attribution: 'Map data &copy; <a href="http://openstreetmap.org">OpenStreetMap</a> contributors'
+ attribution: tileAttribution
});
// Create the map
@@ -134,6 +137,9 @@ function initMap(self) {
var hash = new L.Hash(map);
+ var miniMapTileLayer = new L.TileLayer(tileUrl, {minZoom: 0, maxZoom: 13, attribution: tileAttribution });
+ var miniMap = new L.Control.MiniMap(miniMapTileLayer, { toggleDisplay: true }).addTo(map);
+
self.amenitiesShown = ["hospital"];
self.amenities = {};
self.amenityLayers = {}; // contains the layers for each amenity type