You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Dec 3, 2018. It is now read-only.
In lib/middleware.js, the function normalizePaths drops the host portion of the URI for the id and source entries in the body object. This means that if your source is a remote TileJSON URI on a different host, then any attempt to save the style results in an error saying "Invalid URL".
For the specific case that I am experiencing, the patch below fixes it. However, I assume normalizePaths was dropping the host for a reason, so perhaps this is not an appropriate fix for everyone (refs #1278), but I'd like to try and find a fix which allows us to use remote TileJSON sources.
@zerebubuth sorry about that -- do you want to roll a branch/PR for this change? I added a bunch of testcases to cover the issues we were seeing (read: Windows paths) so if your change handles those correctly then I think all that would be left to do would be to add some tests for sample hostnames that you expect to work with your changes.
@zerebubuth@yhahn
I am running into this issue as well in mapbox studio 0.2.7 OSX. I ran into this trying to use non mapbox remote sources but even using a mapbox tilejson uri fails:
I realize that this is a fringe use case for mapbox studio but it would great if this worked. Is there any chance this will be fixed in a future release? Are there any workarounds for getting this to work in version 0.2.7?
In
lib/middleware.js
, the functionnormalizePaths
drops the host portion of the URI for theid
andsource
entries in the body object. This means that if your source is a remote TileJSON URI on a different host, then any attempt to save the style results in an error saying "Invalid URL".For the specific case that I am experiencing, the patch below fixes it. However, I assume
normalizePaths
was dropping the host for a reason, so perhaps this is not an appropriate fix for everyone (refs #1278), but I'd like to try and find a fix which allows us to use remote TileJSON sources.The text was updated successfully, but these errors were encountered: