Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
private getMarkerStyle(feature: Feature) {
if (!feature.geometry || feature.geometry.type === 'Point') {
return createOverlayMarkerStyle({text: feature.meta.mapTitle, opacity: 0.5});
} else if (feature.geometry.type === 'LineString' || feature.geometry.type === 'MultiLineString') {
return createOverlayDefaultStyle({text: feature.meta.mapTitle, strokeOpacity: 0.5});
} else {
return createOverlayDefaultStyle({text: feature.meta.mapTitle, fillOpacity: 0.15});
}
}
private getSelectedMarkerStyle(feature: Feature) {
if (!feature.geometry || feature.geometry.type === 'Point') {
return createOverlayMarkerStyle({text: feature.meta.mapTitle});
} else {
return createOverlayDefaultStyle({text: feature.meta.mapTitle});
}
}