2016-04-21 57 views
0

我想在交互式地图上显示一个圆的轮廓(不填充),但是,mapbox-gl-js中的绘制选项似乎仅限于填充。 https://www.mapbox.com/mapbox-gl-style-spec/#layers-circle颜色只有一个圆圈的地图边框gl js

var styles = [{ 
    "id": 'points', 
    "interactive": true, 
    "type": "circle", 
    "source": "geojson", 
    "paint": { 
     "circle-radius": 5, 
     "circle-color": "#000 
    }, 
    "filter": ["in", "$type", "Point"] 
}, { 
    "type": "line", 
    "source": "geojson", 
    "layout": { 
     "line-cap": "round", 
     "line-join": "round" 
    }, 
    "paint": { 
     "line-color": "#000", 
     "line-width": 2.5 
    }, 
    "filter": ["in", "$type", "LineString"] 
}]; 

我缺少的东西或者是这是不可能的?

回答

0

这是现在可能的,circle-opacity

例如为:

"paint": { 
    "circle-opacity": 0, 
    "circle-stroke-width": 1, 
    "circle-stroke-color": #000 
}