From 189df56bd17157c27b39d3ec44ea1c9b093f3ad3 Mon Sep 17 00:00:00 2001 From: Tobias Gall Date: Thu, 26 Nov 2015 22:12:05 +0100 Subject: [PATCH] added url opts --- wbc/core/context_processors.py | 1 + wbc/core/static/adminmap.js | 4 ++-- wbc/core/static/map.js | 4 ++-- wbc/core/static/placemap.js | 2 +- wbc/core/templates/core/map.html | 1 + wbc/process/templates/process/admin/change_form.html | 1 + wbc/process/templates/process/place.html | 1 + wbc/process/templates/process/place_form.html | 1 + 8 files changed, 10 insertions(+), 5 deletions(-) diff --git a/wbc/core/context_processors.py b/wbc/core/context_processors.py index f99502c..c2400e2 100644 --- a/wbc/core/context_processors.py +++ b/wbc/core/context_processors.py @@ -11,6 +11,7 @@ def settings(request): 'site_title': django_settings.SITE_TITLE, 'site_url': django_settings.SITE_URL, 'tiles_url': django_settings.TILES_URL, + 'tiles_url_opt': django_settings.TILES_URL_OPT, 'tiles_opt': django_settings.TILES_OPT, 'default_view': django_settings.DEFAULT_VIEW, 'facebook_apikey': facebookapikey diff --git a/wbc/core/static/adminmap.js b/wbc/core/static/adminmap.js index 65cbea9..6421636 100644 --- a/wbc/core/static/adminmap.js +++ b/wbc/core/static/adminmap.js @@ -12,7 +12,7 @@ function drawMap(){ // add the map layer map = new L.Map("adminmap"); - map.addLayer(new L.TileLayer(_tiles_url + '/{z}/{x}/{y}.png',_tiles_opt)); + map.addLayer(new L.TileLayer(_tiles_url + '/{z}/{x}/{y}.png' + _tiles_url_opt,_tiles_opt)); // get lat and lon from the form fields var lat, lon; @@ -103,4 +103,4 @@ function drawMap(){ $(document).ready(function() { setTimeout('drawMap()',100); -}); \ No newline at end of file +}); diff --git a/wbc/core/static/map.js b/wbc/core/static/map.js index 5564dd1..1c78df5 100644 --- a/wbc/core/static/map.js +++ b/wbc/core/static/map.js @@ -12,7 +12,7 @@ app.factory('MapService',['$http',function($http) { 'scrollWheelZoom': false }); - map.addLayer(new L.TileLayer(_tiles_url + '/{z}/{x}/{y}.png',_tiles_opt)); + map.addLayer(new L.TileLayer(_tiles_url + '/{z}/{x}/{y}.png' + _tiles_url_opt,_tiles_opt)); map.setView(new L.LatLng(_default_view.lat,_default_view.lon),_default_view.zoom); var markerLayer = L.layerGroup().addTo(map); @@ -193,4 +193,4 @@ app.controller('MapController',['$scope','$document','$window','$timeout','$loca $scope.showMap(); }); -}]); \ No newline at end of file +}]); diff --git a/wbc/core/static/placemap.js b/wbc/core/static/placemap.js index 0b6f366..49a6615 100644 --- a/wbc/core/static/placemap.js +++ b/wbc/core/static/placemap.js @@ -1,7 +1,7 @@ function initMap() { // add the map layer and center map map = new L.Map("place-map",{scrollWheelZoom: false}); - map.addLayer(new L.TileLayer(_tiles_url + '/{z}/{x}/{y}.png',_tiles_opt)); + map.addLayer(new L.TileLayer(_tiles_url + '/{z}/{x}/{y}.png' + _tiles_url_opt,_tiles_opt)); map.setView(new L.LatLng(_lat, _lon), 15); var osmb = new OSMBuildings(map).loadData(); diff --git a/wbc/core/templates/core/map.html b/wbc/core/templates/core/map.html index b6c68cf..c0a086a 100755 --- a/wbc/core/templates/core/map.html +++ b/wbc/core/templates/core/map.html @@ -12,6 +12,7 @@ diff --git a/wbc/process/templates/process/admin/change_form.html b/wbc/process/templates/process/admin/change_form.html index c6e158c..4aa906b 100644 --- a/wbc/process/templates/process/admin/change_form.html +++ b/wbc/process/templates/process/admin/change_form.html @@ -11,6 +11,7 @@ diff --git a/wbc/process/templates/process/place.html b/wbc/process/templates/process/place.html index 1653b89..b51167f 100644 --- a/wbc/process/templates/process/place.html +++ b/wbc/process/templates/process/place.html @@ -12,6 +12,7 @@