Commit 397d2754 authored by Deployer's avatar Deployer

Removed legend control

parent 251d09e5
......@@ -7,11 +7,13 @@ var MMap = require('mapbox.js/src/map'),
function withAccessToken(options, accessToken) {
if (!accessToken || options.accessToken)
return options;
return L.extend({accessToken: accessToken}, options);
return L.extend({
accessToken: accessToken
}, options);
}
var CMap = MMap.Map.extend({
initialize: function(element, _, options) {
initialize: function (element, _, options) {
MMap.Map.prototype.initialize.call(this, element, _,
L.extend({}, MMap.Map.prototype.options, options));
......@@ -26,7 +28,7 @@ var CMap = MMap.Map.extend({
this.addControl(this._cedarmapsLogoControl);
},
_initialize: function(json) {
_initialize: function (json) {
MMap.Map.prototype._initialize.call(this, json);
this._cedarmapsLogoControl._setTileJSON(json);
......@@ -35,6 +37,10 @@ var CMap = MMap.Map.extend({
module.exports.Map = CMap;
module.exports.map = function(element, _, options) {
module.exports.map = function (element, _, options) {
if (options) {
options.legendControl = false
options.attributionControl = false
}
return new CMap(element, _, options);
};
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment