- // Unselect previously selected feature
- if (selectedLayer) {
- selectedLayer.setStyle(selectedLayer.originalStyle);
- }
-
- // Redraw in selected style
- layer.originalStyle = layer.options;
- layer.setStyle({color: '#0000ff', weight: 8});
-
- OSM.router.route('/' + layer.feature.type + '/' + layer.feature.id);
-
- // Stash the currently drawn feature
- selectedLayer = layer;