Resolved an issue where the stylesheet file location and the directory in which it resides were being conflated. Now, we are using styleLocation and styleDir to distinguish and utilize each path separately. This change ensures that font and sprite assets will be found when located in the same directory as the style. (I have not seen a use case where fonts & sprites were stored in a separate location from the style, but open to thoughts.)
Added a test for a style with fonts.
What I'm not doing here
Addressing the issue with sprites not working. As noted here, there is a current problem with MapLibre hanging indefinitely when attempting to render styles with sprites (or, at least, the sprites in the test fixture; it's possible that other sprites may work without issue).
Goal
This PR fixes an issue identified in https://github.com/ConservationMetrics/mapgl-tile-renderer/pull/39, where the paths for local sprites and glyphs were incorrectly specified.
What I changed
styleLocation
andstyleDir
to distinguish and utilize each path separately. This change ensures that font and sprite assets will be found when located in the same directory as the style. (I have not seen a use case where fonts & sprites were stored in a separate location from the style, but open to thoughts.)What I'm not doing here