Skip to main content

dg-project-detector

Project is agglomeration, which includes a major city and the surrounding areas. This plugin allows to get information about the project which is being viewed at the current moment of time.

Examples of usage

Subscribe to the projectchange event:

map.on('projectchange', function (e) {
console.log(e);
});

Subscribe to the projectleave event:

map.on('projectleave', function (e) {
console.log(e);
});

Events

EventDataDescription
projectchangeProjectEventOccurs when the user goes from one project to another.
projectleaveProjectEventOccurs when the user is outside of the current project.

Methods

MethodReturnsDescription
getProjectListObjectReturns all available projects.
getProjectObjectReturns the current project.