Skip to content
Snippets Groups Projects
Commit 7f37660a authored by Piotr Gawron's avatar Piotr Gawron
Browse files

map options contain information about projectId

parent a189a2d2
No related branches found
No related tags found
1 merge request!5Frontend refactor
......@@ -11,11 +11,8 @@ function CustomMapOptions(params) {
throw new Error("element must be defined");
}
this.setElement(params.element);
if (params.project === undefined) {
throw new Error("project must be defined");
}
this.setProject(params.project);
this.setProjectId(params.projectId);
if (params.markerOptimization !== undefined) {
if (typeof params.markerOptimization === "boolean") {
......@@ -70,6 +67,17 @@ CustomMapOptions.prototype.getProject = function() {
CustomMapOptions.prototype.setProject = function(project) {
this._project = project;
};
CustomMapOptions.prototype.getProjectId = function() {
if (this.getProject() !== undefined) {
return this.getProject().getProjectId();
} else {
return this._projectId;
}
};
CustomMapOptions.prototype.setProjectId = function(projectId) {
this._projectId = projectId;
};
CustomMapOptions.prototype.setDebug = function(debug) {
if (debug !== undefined) {
if (typeof debug !== "boolean") {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment