fix waytype options in routing
This commit is contained in:
parent
b776a7be29
commit
348c176502
1 changed files with 9 additions and 1 deletions
|
@ -812,9 +812,17 @@ c3nav = {
|
|||
},
|
||||
_route_options_submit: function () {
|
||||
var options = {};
|
||||
var waytypes = {};
|
||||
$('#route-options').find('.route-options-fields [name]').each(function() {
|
||||
options[$(this).attr('name')] = $(this).val();
|
||||
var name = $(this).attr('name');
|
||||
var value = $(this).val();
|
||||
if (name.startsWith('waytype_')) {
|
||||
waytypes[name.substring('waytype_'.length)] = value;
|
||||
} else {
|
||||
options[name] = value;
|
||||
}
|
||||
});
|
||||
options.way_types = waytypes;
|
||||
if ($(this).is('.save')) {
|
||||
c3nav_api.put('routing/options', options);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue