本文整理汇总了TypeScript中leaflet.circleMarker函数的典型用法代码示例。如果您正苦于以下问题:TypeScript circleMarker函数的具体用法?TypeScript circleMarker怎么用?TypeScript circleMarker使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了circleMarker函数的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: function
pointToLayer: function(feature, latlng) {
if (!feature || !feature.properties) {
return;
}
const properties = feature.properties;
if (properties.radius) {
// create a circle, with radius = properties.radius
return L.circle(latlng, properties);
} else if (
properties.icon &&
properties.icon.toUpperCase() === 'EPICENTER'
) {
// create an epicenter marker
return new EpicenterOverlay({
properties: {
latitude: latlng.lat,
longitude: latlng.lng
}
});
} else {
// display an orange circle marker
const defaultOptions = {
color: '#000',
fillColor: '#ff7800',
fillOpacity: 0.8,
opacity: 1,
radius: 8,
weight: 1
};
return L.circleMarker(latlng, defaultOptions);
}
},
示例2: function
pointToLayer: function(feature, latlng) {
// subclasses should override this method
const defaultOptions = {
color: '#000',
fillColor: '#ff7800',
fillOpacity: 0.8,
opacity: 1,
radius: 8,
weight: 1
};
return L.circleMarker(latlng, defaultOptions);
},
示例3: function
var circleMarkerHandler = function (feature, latlng) {
return L.circleMarker(latlng, args.style);
};
示例4: function
pointToLayer: function (feature, latlng) {
let style = myStyle;
style.fillColor = feature.properties.shaking.alert_level;
return L.circleMarker(latlng, myStyle);
}