4c6cc4015aaefbaf5c92bfd68d1137520d1fd4157c962418983e6946c4a8768c.json 11 KB

1
  1. {"ast":null,"code":"/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport { createHashMap } from 'zrender/lib/core/util.js';\nimport { GeoSVGResource } from './GeoSVGResource.js';\nimport { GeoJSONResource } from './GeoJSONResource.js';\nvar storage = createHashMap();\nexport default {\n /**\r\n * Compatible with previous `echarts.registerMap`.\r\n *\r\n * @usage\r\n * ```js\r\n *\r\n * echarts.registerMap('USA', geoJson, specialAreas);\r\n *\r\n * echarts.registerMap('USA', {\r\n * geoJson: geoJson,\r\n * specialAreas: {...}\r\n * });\r\n * echarts.registerMap('USA', {\r\n * geoJSON: geoJson,\r\n * specialAreas: {...}\r\n * });\r\n *\r\n * echarts.registerMap('airport', {\r\n * svg: svg\r\n * }\r\n * ```\r\n *\r\n * Note:\r\n * Do not support that register multiple geoJSON or SVG\r\n * one map name. Because different geoJSON and SVG have\r\n * different unit. It's not easy to make sure how those\r\n * units are mapping/normalize.\r\n * If intending to use multiple geoJSON or SVG, we can\r\n * use multiple geo coordinate system.\r\n */\n registerMap: function (mapName, rawDef, rawSpecialAreas) {\n if (rawDef.svg) {\n var resource = new GeoSVGResource(mapName, rawDef.svg);\n storage.set(mapName, resource);\n } else {\n // Recommend:\n // echarts.registerMap('eu', { geoJSON: xxx, specialAreas: xxx });\n // Backward compatibility:\n // echarts.registerMap('eu', geoJSON, specialAreas);\n // echarts.registerMap('eu', { geoJson: xxx, specialAreas: xxx });\n var geoJSON = rawDef.geoJson || rawDef.geoJSON;\n if (geoJSON && !rawDef.features) {\n rawSpecialAreas = rawDef.specialAreas;\n } else {\n geoJSON = rawDef;\n }\n var resource = new GeoJSONResource(mapName, geoJSON, rawSpecialAreas);\n storage.set(mapName, resource);\n }\n },\n getGeoResource: function (mapName) {\n return storage.get(mapName);\n },\n /**\r\n * Only for exporting to users.\r\n * **MUST NOT** used internally.\r\n */\n getMapForUser: function (mapName) {\n var resource = storage.get(mapName);\n // Do not support return SVG until some real requirement come.\n return resource && resource.type === 'geoJSON' && resource.getMapForUser();\n },\n load: function (mapName, nameMap, nameProperty) {\n var resource = storage.get(mapName);\n if (!resource) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Map ' + mapName + ' not exists. The GeoJSON of the map must be provided.');\n }\n return;\n }\n return resource.load(nameMap, nameProperty);\n }\n};","map":{"version":3,"names":["createHashMap","GeoSVGResource","GeoJSONResource","storage","registerMap","mapName","rawDef","rawSpecialAreas","svg","resource","set","geoJSON","geoJson","features","specialAreas","getGeoResource","get","getMapForUser","type","load","nameMap","nameProperty","process","env","NODE_ENV","console","error"],"sources":["E:/git/2021项目/安科院大屏/node_modules/echarts/lib/coord/geo/geoSourceManager.js"],"sourcesContent":["\n/*\n* Licensed to the Apache Software Foundation (ASF) under one\n* or more contributor license agreements. See the NOTICE file\n* distributed with this work for additional information\n* regarding copyright ownership. The ASF licenses this file\n* to you under the Apache License, Version 2.0 (the\n* \"License\"); you may not use this file except in compliance\n* with the License. You may obtain a copy of the License at\n*\n* http://www.apache.org/licenses/LICENSE-2.0\n*\n* Unless required by applicable law or agreed to in writing,\n* software distributed under the License is distributed on an\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\n* KIND, either express or implied. See the License for the\n* specific language governing permissions and limitations\n* under the License.\n*/\n\n\n/**\n * AUTO-GENERATED FILE. DO NOT MODIFY.\n */\n\n/*\r\n* Licensed to the Apache Software Foundation (ASF) under one\r\n* or more contributor license agreements. See the NOTICE file\r\n* distributed with this work for additional information\r\n* regarding copyright ownership. The ASF licenses this file\r\n* to you under the Apache License, Version 2.0 (the\r\n* \"License\"); you may not use this file except in compliance\r\n* with the License. You may obtain a copy of the License at\r\n*\r\n* http://www.apache.org/licenses/LICENSE-2.0\r\n*\r\n* Unless required by applicable law or agreed to in writing,\r\n* software distributed under the License is distributed on an\r\n* \"AS IS\" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY\r\n* KIND, either express or implied. See the License for the\r\n* specific language governing permissions and limitations\r\n* under the License.\r\n*/\nimport { createHashMap } from 'zrender/lib/core/util.js';\nimport { GeoSVGResource } from './GeoSVGResource.js';\nimport { GeoJSONResource } from './GeoJSONResource.js';\nvar storage = createHashMap();\nexport default {\n /**\r\n * Compatible with previous `echarts.registerMap`.\r\n *\r\n * @usage\r\n * ```js\r\n *\r\n * echarts.registerMap('USA', geoJson, specialAreas);\r\n *\r\n * echarts.registerMap('USA', {\r\n * geoJson: geoJson,\r\n * specialAreas: {...}\r\n * });\r\n * echarts.registerMap('USA', {\r\n * geoJSON: geoJson,\r\n * specialAreas: {...}\r\n * });\r\n *\r\n * echarts.registerMap('airport', {\r\n * svg: svg\r\n * }\r\n * ```\r\n *\r\n * Note:\r\n * Do not support that register multiple geoJSON or SVG\r\n * one map name. Because different geoJSON and SVG have\r\n * different unit. It's not easy to make sure how those\r\n * units are mapping/normalize.\r\n * If intending to use multiple geoJSON or SVG, we can\r\n * use multiple geo coordinate system.\r\n */\n registerMap: function (mapName, rawDef, rawSpecialAreas) {\n if (rawDef.svg) {\n var resource = new GeoSVGResource(mapName, rawDef.svg);\n storage.set(mapName, resource);\n } else {\n // Recommend:\n // echarts.registerMap('eu', { geoJSON: xxx, specialAreas: xxx });\n // Backward compatibility:\n // echarts.registerMap('eu', geoJSON, specialAreas);\n // echarts.registerMap('eu', { geoJson: xxx, specialAreas: xxx });\n var geoJSON = rawDef.geoJson || rawDef.geoJSON;\n if (geoJSON && !rawDef.features) {\n rawSpecialAreas = rawDef.specialAreas;\n } else {\n geoJSON = rawDef;\n }\n var resource = new GeoJSONResource(mapName, geoJSON, rawSpecialAreas);\n storage.set(mapName, resource);\n }\n },\n getGeoResource: function (mapName) {\n return storage.get(mapName);\n },\n /**\r\n * Only for exporting to users.\r\n * **MUST NOT** used internally.\r\n */\n getMapForUser: function (mapName) {\n var resource = storage.get(mapName);\n // Do not support return SVG until some real requirement come.\n return resource && resource.type === 'geoJSON' && resource.getMapForUser();\n },\n load: function (mapName, nameMap, nameProperty) {\n var resource = storage.get(mapName);\n if (!resource) {\n if (process.env.NODE_ENV !== 'production') {\n console.error('Map ' + mapName + ' not exists. The GeoJSON of the map must be provided.');\n }\n return;\n }\n return resource.load(nameMap, nameProperty);\n }\n};"],"mappings":"AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAGA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAASA,aAAa,QAAQ,0BAA0B;AACxD,SAASC,cAAc,QAAQ,qBAAqB;AACpD,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