本文整理匯總了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);
}