Load profile content for selected profile

This commit is contained in:
Norbert Renner 2015-03-17 20:39:26 +01:00
parent 433d4c4b85
commit 93d0b7f7df
7 changed files with 109 additions and 10 deletions

View file

@ -120,6 +120,9 @@
routingOptions = new BR.RoutingOptions();
routingOptions.on('update', updateRoute);
routingOptions.on('update', function(evt) {
profile.update(evt.options);
});
nogos = new BR.NogoAreas();
nogos.on('update', updateRoute);
@ -229,6 +232,7 @@
// initial option settings (after controls are added and initialized with onAdd, before permalink)
router.setOptions(nogos.getOptions());
router.setOptions(routingOptions.getOptions());
profile.update(routingOptions.getOptions());
map.addControl(new L.Control.Permalink({
text: 'Permalink',
@ -237,7 +241,8 @@
routingOptions: routingOptions,
nogos: nogos,
router: router,
routing: routing
routing: routing,
profile: profile
}));
}