8000 Add new `_createMap` method to allow custom mixins to override by tmcgee · Pull Request #499 · cmv/cmv-app · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Add new _createMap method to allow custom mixins to override #499

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Jan 14, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -151,9 +151,7 @@
"comma-style": 2,
"computed-property-spacing": [2, "never"],
"consistent-this": [2, "self"],
"constructor-super": 2,
"func-style": [2, "declaration"],
"id-match": [2, "^[a-z]+([A-Z][a-z]+)*$", {"properties": true}],
"indent": [2, 4],
"key-spacing": [2, {
"beforeColon": false,
Expand Down
8 changes: 6 additions & 2 deletions viewer/js/viewer/_MapMixin.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ define([
var returnDeferred = new Deferred();
var returnWarnings = [];

var container = dom.byId(this.config.layout.map) || 'mapCenter';
this.map = new Map(container, this.config.mapOptions);
this._createMap();

if (this.config.mapOptions.basemap) {
this.map.on('load', lang.hitch(this, '_initLayers', returnWarnings));
Expand All @@ -44,6 +43,11 @@ define([
return returnDeferred;
},

_createMap: function () {
var container = dom.byId(this.config.layout.map) || 'mapCenter';
this.map = new Map(container, this.config.mapOptions);
},

_onLayersAddResult: function (returnDeferred, returnWarnings, lyrsResult) {
array.forEach(lyrsResult.layers, function (addedLayer) {
if (addedLayer.success !== true) {
Expand Down
0