UNPKG

cione-comp-lib

Version:

`$ yarn add cione-comp-lib` 或者 `$ npm i cione-comp-lib -S`

16 lines (15 loc) 370 B
var geoCoordMap = { "Russia": [100, 60], "United States": [-99, 38], "United States of America": [-99, 38] }; function fixGeoCoords(mapType, region) { if (mapType === "world") { var geoCoord = geoCoordMap[region.name]; if (geoCoord) { var cp = [geoCoord[0], geoCoord[1]]; region.setCenter(cp); } } } export { fixGeoCoords as default };