Support black and white labels at Map of Science's comparison view
After Width: | Height: | Size: 2.7 KiB |
After Width: | Height: | Size: 3.7 KiB |
After Width: | Height: | Size: 3.9 KiB |
After Width: | Height: | Size: 3.1 KiB |
After Width: | Height: | Size: 8 KiB |
After Width: | Height: | Size: 3.8 KiB |
After Width: | Height: | Size: 8.1 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 2.8 KiB |
After Width: | Height: | Size: 4.6 KiB |
After Width: | Height: | Size: 4.3 KiB |
After Width: | Height: | Size: 4.7 KiB |
After Width: | Height: | Size: 4 KiB |
|
@ -81,7 +81,7 @@ var ComparisonScimapWidget = Class.extend({
|
||||||
|
|
||||||
/* create */
|
/* create */
|
||||||
if (me.disciplineLabelsControl == null) {
|
if (me.disciplineLabelsControl == null) {
|
||||||
me.labelsMarkerManager = new DisciplineLabelsMarkerManager(map);
|
me.labelsMarkerManager = new DisciplineLabelsMarkerManager(map, getDisciplineBlackLabelImageURL);
|
||||||
me.disciplineLabelsControl = new CheckBoxPanel({
|
me.disciplineLabelsControl = new CheckBoxPanel({
|
||||||
map: map,
|
map: map,
|
||||||
checked: true,
|
checked: true,
|
||||||
|
|
|
@ -10,6 +10,10 @@ function getDisciplineLabelImageURL(key) {
|
||||||
return disciplineLabelImageUrlPrefix + DISCIPLINES[key].image;
|
return disciplineLabelImageUrlPrefix + DISCIPLINES[key].image;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function getDisciplineBlackLabelImageURL(key) {
|
||||||
|
return disciplineBlackLabelImageUrlPrefix + DISCIPLINES[key].image;
|
||||||
|
}
|
||||||
|
|
||||||
function createScimapType(map, mapName) {
|
function createScimapType(map, mapName) {
|
||||||
var sciMapTypeOptions = {
|
var sciMapTypeOptions = {
|
||||||
getTileUrl: function(coord, zoom) {
|
getTileUrl: function(coord, zoom) {
|
||||||
|
|
|
@ -58,9 +58,13 @@ var MarkerManager = Class.extend({
|
||||||
* Customized Discipline labels MarkerManager for Science map purpose. It is an abstract class
|
* Customized Discipline labels MarkerManager for Science map purpose. It is an abstract class
|
||||||
*/
|
*/
|
||||||
var DisciplineLabelsMarkerManager = MarkerManager.extend({
|
var DisciplineLabelsMarkerManager = MarkerManager.extend({
|
||||||
init: function(map) {
|
init: function(map, getLabelURL) {
|
||||||
this._super();
|
this._super();
|
||||||
this.map = map;
|
this.map = map;
|
||||||
|
this.getLabelURL = getDisciplineLabelImageURL;
|
||||||
|
if (getLabelURL != null) {
|
||||||
|
this.getLabelURL = getLabelURL;
|
||||||
|
}
|
||||||
this.initMarkers(map);
|
this.initMarkers(map);
|
||||||
},
|
},
|
||||||
initMarkers: function(map) {
|
initMarkers: function(map) {
|
||||||
|
@ -69,7 +73,7 @@ var DisciplineLabelsMarkerManager = MarkerManager.extend({
|
||||||
var opts = {
|
var opts = {
|
||||||
map: map,
|
map: map,
|
||||||
position: createNoWrapLatLng(discipline.labelLatitude, discipline.labelLongitude),
|
position: createNoWrapLatLng(discipline.labelLatitude, discipline.labelLongitude),
|
||||||
icon: getDisciplineLabelImageURL(id),
|
icon: me.getLabelURL(id),
|
||||||
clickable: false
|
clickable: false
|
||||||
};
|
};
|
||||||
me.addMarker(id, new Marker(opts));
|
me.addMarker(id, new Marker(opts));
|
||||||
|
|
|
@ -45,6 +45,7 @@ var entityUnmappedJournalsCSVURLPrefix = "${urls.base}${dataVisualizationURLRoot
|
||||||
var imageFolderPrefix = "${urls.images}/visualization/";
|
var imageFolderPrefix = "${urls.images}/visualization/";
|
||||||
var mapOfScienceImageFolderPrefix = imageFolderPrefix + "mapofscience/";
|
var mapOfScienceImageFolderPrefix = imageFolderPrefix + "mapofscience/";
|
||||||
var disciplineLabelImageUrlPrefix = mapOfScienceImageFolderPrefix + "labels/";
|
var disciplineLabelImageUrlPrefix = mapOfScienceImageFolderPrefix + "labels/";
|
||||||
|
var disciplineBlackLabelImageUrlPrefix = disciplineLabelImageUrlPrefix + "black/";
|
||||||
|
|
||||||
var infoIconUrl = "${urls.images}/iconInfo.png";
|
var infoIconUrl = "${urls.images}/iconInfo.png";
|
||||||
var drillDownIconUrl = "${urls.images}/visualization/drill_down_icon.png";
|
var drillDownIconUrl = "${urls.images}/visualization/drill_down_icon.png";
|
||||||
|
|