Skip to content

Commit

Permalink
add an event in wmsImport to load a getCapabilities
Browse files Browse the repository at this point in the history
  • Loading branch information
fgravin committed Jan 23, 2015
1 parent 4b17308 commit 1cbf7c9
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,23 @@
}],
link: function(scope, element, attrs) {


scope.format = attrs['gnWmsImport'];
scope.servicesList = gnViewerSettings.servicesUrl[scope.format];

scope.loading = false;

// This event focus on map, display the WMSImport and request
// a getCapabilities
//TODO : to be improved
var event = 'requestCapLoad'+ scope.format.toUpperCase();
scope.$on(event, function(e,url) {
$('#layers').removeClass('force-hide');
$('[gn-wms-import]').removeClass('collapsed');
scope.url = url;
scope.load(url)
});

scope.load = function(url) {
scope.loading = true;
gnOwsCapabilities['get' + scope.format.toUpperCase() +
Expand Down

0 comments on commit 1cbf7c9

Please sign in to comment.