[js] use L.version to build cdn url rather than harcoding version number (closes #4725752)

authorAdrien Di Mascio <Adrien.DiMascio@logilab.fr>
changeset08a33b22da5a
branchdefault
phasepublic
hiddenno
parent revision#f25f63abb422 Fix bug in multi-exceptions catch.
child revision#58ab0d018ee9 Use a more recent version of leaflet
files modified by this revision
data/cubes.leaflet.js
# HG changeset patch
# User Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
# Date 1417802292 -3600
# Fri Dec 05 18:58:12 2014 +0100
# Node ID 08a33b22da5adf53c6869bcf180ea4d97c0b6414
# Parent f25f63abb42271915b2eae5fc074d1f7de424e89
[js] use L.version to build cdn url rather than harcoding version number (closes #4725752)

diff --git a/data/cubes.leaflet.js b/data/cubes.leaflet.js
@@ -14,11 +14,11 @@
1       * @param datasource either a list or leaflet markers or an url deferencing json markers
2       * @param settings leaflet settings
3       **/
4      renderLeafLetMap: function(datasource, settings) {
5          function _renderMarkers(markers, settings) {
6 -            L.Icon.Default.imagePath = 'http://cdn.leafletjs.com/leaflet-0.4.5/images';
7 +            L.Icon.Default.imagePath = 'http://cdn.leafletjs.com/leaflet-' + L.version + '/images';
8              // center on first marker if no center is specified
9              if (markers.length > 0) {
10                  var center = settings.center || [markers[0].latitude, markers[0].longitude];
11              } else {
12                  var center = [0, 0];