highcharts - Highmaps - 如何从西班牙突出显示加那利群岛
问题描述
我正在使用带有自定义世界地图数据的高地图。在我的示例中仅突出显示了西班牙。但是,当您将鼠标悬停在西班牙国家/地区时,非洲北部的一些岛屿也会突出显示。我怀疑这些是加那利群岛。如何防止这些岛屿被突出显示?示例: http ://bastionstudio.co.za/test/spain.html
解决方案
可以通过推送西班牙的新坐标来解决。 http://bastionstudio.co.za/test/spain-no-canary-islands.html
console.log(Highcharts.maps['custom/world'].features);
Highcharts.maps['custom/world'].features.push({
"type":"Feature",
"id":"ES",
"properties": {
"hc-group":"admin0",
"hc-middle-x":0.76,
"hc-middle-y":0.27,
"hc-key":"es",
"hc-a2":"ES","name":"Spain",
"labelrank":"2",
"country-abbrev":"Sp.",
"subregion":"Southern Europe",
"region-wb":"Europe & Central Asia",
"iso-a3":"ESP","iso-a2":"ES","woe-id":"23424950",
"continent":"Europe"
},
"geometry":{
"type":"MultiPolygon",
"coordinates":[
[
[
[4045, 7594],
[4021, 7599],
[4011, 7621],
[3984, 7629],
[3997, 7692],
[3998, 7762],
[4020, 7781],
[4009, 7795],
[3944, 7795],
[3930, 7838],
[3969, 7860],
[3988, 7852],
[4098, 7851],
[4151, 7846],
[4203, 7821],
[4246, 7818],
[4249, 7812],
[4255, 7814],
[4262, 7812],
[4262, 7813],
[4262, 7814],
[4263, 7812],
[4263, 7812],
[4279, 7808],
[4298, 7812],
[4300, 7795],
[4265, 7771],
[4233, 7763],
[4194, 7709],
[4211, 7683],
[4189, 7669],
[4183, 7644],
[4154, 7635],
[4143, 7615],
[4072, 7613],
[4046, 7594],
[4045, 7594]
]
]
]
}
});
推荐阅读
- java - 如何处理重复测试的持续时间并计算它们的平均时间
- pandas - JupyterLab 无花果不显示。它显示空白结果(但在 jupyternotebook 上工作正常)
- python - python如何使用opencv waitkey库检测组合键?
- django - 如何编写发送电子邮件的测试用例
- java - 在 web-inf 之外使用 web.xml jsp 的安全约束
- tensorflow - 定义具有多个输入的自定义 LSTM
- excel - 如何修复 VBA 中的 vlookup 工作表属性错误
- python-3.x - 如何在 Python 中找到两个时间戳之间的差异?
- python-3.x - 如何获取与特定列的最大值对应的索引值
- python - xgboost.train bst_score 返回训练错误,而不是验证错误?