Add copyright

This commit is contained in:
kongchinhua 2011-07-09 17:35:59 +00:00
parent 2936d1730c
commit 08c901d510
2 changed files with 27 additions and 1 deletions

View file

@ -133,3 +133,24 @@ var CheckBoxPanel = ControlPanel.extend({
return this.checkBox.attr('checked'); return this.checkBox.attr('checked');
} }
}); });
/**
* Copyright
*/
var CopyrightPanel = ControlPanel.extend({
init: function(options) {
this._super(options);
this.initCopyRight();
},
initCopyRight: function() {
var me = this;
var html = me.options.html;
var copyright = $("<div />").css("padding", "0px 5px 2px 5px").css("font-size", "75%").css("text-align", "center");
if (html) {
copyright.html(html);
}
me.copyright = copyright;
me.getDiv().append(copyright);
}
});

View file

@ -29,6 +29,11 @@ function createScimapType(map, mapName) {
}; };
var sciMapType = new google.maps.ImageMapType(sciMapTypeOptions); var sciMapType = new google.maps.ImageMapType(sciMapTypeOptions);
new CopyrightPanel ({
map: map,
controlPositions: google.maps.ControlPosition.BOTTOM_RIGHT,
html: '&copy; 2008 The Regents of the University of California and <a href="http://cns.iu.edu" >CNS.IU.EDU</a>'
});
map.mapTypes.set(mapName, sciMapType); map.mapTypes.set(mapName, sciMapType);
} }