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
It looks to me, that the feature presets=https://path/to/presets.jsonby@maxgrossman is broken.
This, or I just don't understand how to use it :-).
What I found out so far:
In the current master, the .fromExternal method gets a external variable that IMO is not existent. There is also a 404-error that points to this, once I try to load an external preset. This commit fixes the 404, but that is not enough tordans@6a0b0d0
@tordans - thanks for the diligence of testing out the feature I wrote 😄
The format of the preset JSON is intended to match the large hashmap that iD reads, seen here.
This format of hashmap is what iD ingests in the non-from-external scenario. When I added this feature, the intent was to just match that.
That said, looking at the #6553 feature since it seems like the preset above is in the iD source tree, using the comma-delimited list of preset names looks like it should work.
As for your second bullet point question, this feature comes in tandem with working my work on maprules. So I do not have a document on how to build this json, but am happy to help you get that tool set up w/iD so you can test out what you intended to.
I've change the code flow in presets/index.js a bit as a result of working on #4994. Now all the presets are essentially external, so we are always deferring the build step. I've renamed build to merge and I've made this function the sort of thing that we can run several times if we want to.
It looks to me, that the feature
presets=https://path/to/presets.json
by @maxgrossman is broken.This, or I just don't understand how to use it :-).
What I found out so far:
In the current master, the
.fromExternal
method gets aexternal
variable that IMO is not existent. There is also a 404-error that points to this, once I try to load an external preset. This commit fixes the 404, but that is not enough tordans@6a0b0d0The "d3_json -> then -> catch -> finally"-chain at
iD/modules/presets/index.js
Lines 286 to 295 in eb0647a
iD/modules/presets/index.js
Lines 218 to 225 in d87b182
I also wonder about the correct format, of an "external_presets.json". In my tests I tried using https://github.com/tordans/iD/blob/master/bicycle_parking_custom_preset.json.
The text was updated successfully, but these errors were encountered: