2GIS Project Detection Module | RasterJS API | 2GIS Documentation

2GIS Project Detection Module

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.

Subscribe to the projectchange event:

map.on('projectchange', function (e) {

Subscribe to the projectleave event:

map.on('projectleave', function (e) {
Event Data Description
projectchange ProjectEvent Occurs when the user goes from one project to another.
projectleave ProjectEvent Occurs when the user is outside of the current project.
Method Returns Description
getProjectList Object Returns all available projects.
getProject Object Returns the current project.