提交 a1cdac5b 编写于 作者: L lang

Map not exists error

上级 5388954d
...@@ -49,6 +49,10 @@ define(function (require) { ...@@ -49,6 +49,10 @@ define(function (require) {
}); });
} }
function mapNotExistsError(name) {
console.error('Map ' + name + ' not exists');
}
var geoCreator = { var geoCreator = {
create: function (ecModel, api) { create: function (ecModel, api) {
...@@ -58,9 +62,9 @@ define(function (require) { ...@@ -58,9 +62,9 @@ define(function (require) {
ecModel.eachComponent('geo', function (geoModel, idx) { ecModel.eachComponent('geo', function (geoModel, idx) {
var name = geoModel.get('map'); var name = geoModel.get('map');
var mapData = mapDataStores[name]; var mapData = mapDataStores[name];
// if (!mapData) { if (!mapData) {
// Warning mapNotExistsError(name);
// } }
var geo = new Geo( var geo = new Geo(
name + idx, name, name + idx, name,
mapData && mapData.geoJson, mapData && mapData.specialAreas, mapData && mapData.geoJson, mapData && mapData.specialAreas,
...@@ -100,9 +104,9 @@ define(function (require) { ...@@ -100,9 +104,9 @@ define(function (require) {
zrUtil.each(mapModelGroupBySeries, function (mapSeries, mapType) { zrUtil.each(mapModelGroupBySeries, function (mapSeries, mapType) {
var mapData = mapDataStores[mapType]; var mapData = mapDataStores[mapType];
// if (!mapData) { if (!mapData) {
// Warning mapNotExistsError(name);
// } }
var nameMapList = zrUtil.map(mapSeries, function (singleMapSeries) { var nameMapList = zrUtil.map(mapSeries, function (singleMapSeries) {
return singleMapSeries.get('nameMap'); return singleMapSeries.get('nameMap');
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册