如何在 Geojson 中突出显示特定国家/地区?

时间:2021-07-29 13:44:55

标签: javascript angularjs leaflet geojson

所以我想突出法国,我如何在geojson中添加其他国家的背景,以便我们只能看到法国?

做类似的事情

image

我的js

var map = L.map('map', {
    center: [46.52863469527167, 2.43896484375]
});

L.tileLayer('http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png?access_token=', {
    attribution: '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a>',
    subdomains: ['a', 'b', 'c']
}).addTo(map);

我的html

#map{
    height: calc(100vh - 140px);
    width : 100% ;
    margin-top : 50px;
}
<div id="map"></div>

这就是我真正拥有的

img2

0 个答案:

没有答案
相关问题