Skip to content

Commit

Permalink
Rename 'keyid' layer option to 'keyId'
Browse files Browse the repository at this point in the history
  • Loading branch information
AntonKhorev committed Dec 9, 2024
1 parent 5fa8a5c commit 83f436c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
2 changes: 1 addition & 1 deletion app/assets/javascripts/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ $(document).ready(function () {
if (OSM.MATOMO) {
map.on("layeradd", function (e) {
if (e.layer.options) {
var goal = OSM.MATOMO.goals[e.layer.options.keyid];
var goal = OSM.MATOMO.goals[e.layer.options.keyId];

if (goal) {
$("body").trigger("matomogoal", goal);
Expand Down
4 changes: 1 addition & 3 deletions app/assets/javascripts/leaflet.map.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ L.OSM.Map = L.Map.extend({
for (const [property, value] of Object.entries(layerDefinition)) {
if (property === "credit") {
layerOptions.attribution = makeAttribution(value);
} else if (property === "keyId") {
layerOptions.keyid = value;
} else if (property === "nameId") {
layerOptions.name = I18n.t(`javascripts.map.base.${value}`);
} else if (property === "apiKeyId") {
Expand Down Expand Up @@ -133,7 +131,7 @@ L.OSM.Map = L.Map.extend({

getMapBaseLayerId: function () {
const layer = this.getMapBaseLayer();
if (layer) return layer.options.keyid;
if (layer) return layer.options.keyId;
},

getMapBaseLayer: function () {
Expand Down

0 comments on commit 83f436c

Please sign in to comment.