Skip to content

Commit

Permalink
fix nale layers
Browse files Browse the repository at this point in the history
  • Loading branch information
stefanocudini committed Dec 5, 2018
1 parent 6b784ba commit 0473231
Showing 1 changed file with 17 additions and 13 deletions.
30 changes: 17 additions & 13 deletions packages/ui/client/views/panels/settings/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ Template.panelSettings_ui_map.helpers({
var layer = K.Profile.getOpts('map.layer') || K.settings.public.map.layer,
layers = [];

_.each(K.settings.public.map.layers, function(v,k) {
if(!!v && _.isString(v)) {
layers.push({
key: k,
val: k,
name: i18n('map_layer_'+k),
active: k===layer,
url: K.Util.tmpl(v,{s:'a',z:'15',x:'17374',y:'11667'})
});
}
});
return layers;
_.each(K.settings.public.map.layers, function(v,k) {
if(!!v && _.isString(v)) {
layers.push({
key: k,
val: k,
name: i18n('map_layer_'+k) || k,
active: k===layer,
url: K.Util.tmpl(v,{s:'a',z:'15',x:'17374',y:'11667'})
});
}
});
return layers;
},
mapcenter: function() {
var z = K.Profile.getOpts('map.zoom');
Expand All @@ -30,7 +30,11 @@ Template.panelSettings_ui_map.events({

var val = $(e.currentTarget).val();

Users.update(Meteor.userId(), { $set: {'settings.map.layer': val } });
Users.update(Meteor.userId(), {
$set: {
'settings.map.layer': val
}
});

K.Map.setOpts({layer: val });

Expand Down

0 comments on commit 0473231

Please sign in to comment.