Skip to content

style: Fix bug in layering

James Westman requested to merge jwestman/gnome-maps:fix-highway-shields into main

The code that inserted the highway shields layer worked by finding the index of the 'road_shield' layer in OSM Liberty, then splicing the Americana shield layer over it. The new map style doesn't have a 'road_shield' layer though, so findIndex() returned -1, which splice() interpreted to mean the last item of the list. This happened to delete the neighborhoods layer.

Fixed by moving the code that inserts the Americana shields layer into the map style itself, so no splice is needed.

Merge request reports