nestjs rewrite
This commit is contained in:
@ -235,7 +235,7 @@ export const initializeMapState = (
|
||||
const printAreaDraw = new Draw({
|
||||
source: printSource,
|
||||
type: 'Circle',
|
||||
style: (feature) => {
|
||||
style: () => {
|
||||
return new Style({
|
||||
fill: new Fill({
|
||||
color: "rgba(0, 0, 255, 0.3)", // Semi-transparent blue fill
|
||||
@ -331,12 +331,13 @@ export const initializeMapState = (
|
||||
|
||||
if (pixel) {
|
||||
map?.forEachFeatureAtPixel(pixel, function (feature, layer) {
|
||||
if (layer.get('type') === 'region') {
|
||||
console.log("clicked on region")
|
||||
zoomToFeature(id, feature as Feature)
|
||||
if (layer) {
|
||||
if (layer.get('type') === 'region') {
|
||||
zoomToFeature(id, feature as Feature)
|
||||
|
||||
if (feature.get('entity_id')) {
|
||||
setSelectedRegion(id, feature.get('entity_id'))
|
||||
if (feature.get('entity_id')) {
|
||||
setSelectedRegion(id, feature.get('entity_id'))
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
|
Reference in New Issue
Block a user