How can I control a menu that appears when I click in a Map (AnalyticMap – SAPUI5) in a point where there are two or more concurrent areas?

I have an application that load a model with areas and routes in a Map Container and allows to draw spots and areas to define defect zones in a piece.

In Prod environment it is used an old library (XX_MOD1N97_LIB_UI5_144) but in the Integration environment it was pushed a new library (XX_1N97_UI5LIB_110820) that has caused some troubles in the current code. One of them is that when I click on a point where there are two or more areas, there is popup menu where I have to chose which one is being clicked.

I need to know how can I control that event to make this function useful instead annoying

This is the current XML:

mvc:View controllerName="XXXX.controller.Map" xmlns:mvc="sap.ui.core.mvc" xmlns:core="sap.ui.core" xmlns:l="sap.ui.layout"
    xmlns="sap.m" xmlns:vk="sap.ui.vk" xmlns:vbm="sap.ui.vbm" xmlns:form="sap.ui.layout.form" xmlns:tnt="sap.tnt" height="100%"
    displayBlock="true" xmlns:custom="XXXX.control" xmlns:html="http://www.w3.org/1999/xhtml">

    <Page id="mapPage" showHeader="false">
        <content>
            <HBox id="mapPageHBC" class="mapPageHBoxContainer">
                <items>
                    <VBox id="sideMenuMap" class="sideMenuMap">
                        <items>
                            <!-- ASISTED REPARATION BUTTONS -->
                            <HBox id="assistedVerificationAndDimensionalModeContainer" class="hBoxWith2Children customSmallMarginTop">
                                <items>
                                    <ToggleButton id="assistedDefectOrderButton" tooltip="{i18n>assistedVerification}"
                                    press="onAssistedVerificationPressed" icon="sap-icon://media-play" class="sideMenuButton"></ToggleButton>
                                    <ToggleButton id="startDimensionalModeButton" tooltip="{i18n>tipDimensionTools}" press="onDimensioningPressed"
                                    icon="sap-icon://fonts/caliper" class="sideMenuButton"></ToggleButton>
                                </items>
                            </HBox>

                            <HBox id="assistedVerificationArrowsContainer">
                                <items>
                                    <Button id="backDefectButton" tooltip="{i18n>tipNextDefect}" press="goBackDefect" icon="sap-icon://arrow-left" class="sideMenuButton"></Button>
                                    <Button id="nextDefectButton" tooltip="{i18n>tipBackDefect}" press="goAheadDefect" icon="sap-icon://arrow-right" class="sideMenuButton"></Button>
                                </items>
                            </HBox>
                            <Button id="repairDefectAssistedModeButton" text="{i18n>repair}" tooltip="{i18n>tipRepair}" press="onRepairDefectAssistedPressed"
                            icon="sap-icon://technical-object" class="sideMenuButton mapRepairButton"></Button>
                            <Button id="verifyDefectAssistedModeButton" text="{i18n>verify}" tooltip="{i18n>tipVerify}" press="onVerifyDefectAssistedPressed"
                            icon="sap-icon://activity-2" class="sideMenuButton mapVerifyButton"></Button>

                                
                            <!--END ASISTED REPARATION BUTTONS -->
                            <ToggleButton id="createEditDimensionsModeButton" text="Crear/Editar" tooltip="{i18n>tipCreateModifyDimensions}" press="onCreateEditDimensionsModePressed"
                            icon="sap-icon://activity-2" class="sideMenuButton"></ToggleButton>
                            <ToggleButton id="deleteAuxDimensionsModeButton" text="Borrar auxiliares" tooltip="{i18n>tipDeleteAuxDimensions}" press="onDeleteAuxDimensionsModePressed"
                            icon="sap-icon://activity-2" class="sideMenuButton"></ToggleButton>

                            <!--DIMENSIONING TOOLS BUTTONS -->


                            <!--END DIMENSIONING TOOLS BUTTONS -->                      
                            <Button text="Exportar PDF" id="exportPdfButton" tooltip="{i18n>tipExportPdf}" press="onDataExportPDF" icon="sap-icon://pdf-attachment" class="sideMenuButton"></Button>
                            <HBox>
                                <items>
                                    <Button id="undoButton" enabled="true" tooltip="{i18n>tipUndo}" press="undoAction" icon="sap-icon://undo" class="sideMenuButton"></Button>
                                    <Button id="redoButton" visible="false" enabled="false" tooltip="{i18n>tipRedo}" press="onDataExportPDF" icon="sap-icon://redo" class="sideMenuButton"></Button>
                                </items>
                            </HBox>
                            <HBox id="captureScreenButtonsContainer">
                                <items>
                                    <Button id="captureScreen" tooltip="{i18n>tipCaptureScreen}" press="generateImageFromVisiblePart" icon="sap-icon://camera" class="sideMenuButton"></Button>
                                    <!-- <Button id="sendEmailWithScreenshots" tooltip="{i18n>tipSendEmailWithScreenshots}" press="sendEmailWithScreenshots" icon="sap-icon://email" class="sideMenuButton"></Button> -->
                                </items>
                            </HBox>
                            <RadioButtonGroup id="LhRhRadioButtonGroup" columns="2" class="LhRhRadioButtonGroup" select="onS19Changed">
                                <buttons>
                                    <RadioButton text="LH"></RadioButton>
                                    <RadioButton text="RH"></RadioButton>
                                </buttons>
                            </RadioButtonGroup>
                            <Button id="saveInspectionButton" text="{i18n>saveInspection}" tooltip="{i18n>tipSaveInspection}" press="saveInspectionClicked"
                                icon="sap-icon://save" class="sideMenuButton"></Button>
                            <Button id="changeInspectionStatusButton" text="{i18n>changeInspectionStatus}" tooltip="{i18n>changeInspectionStatus}"
                                press="onChangeInspectionStagePressed" icon="sap-icon://navigation-right-arrow" class="sideMenuButton"></Button>
                            <!--<Button text="{i18n>navDetail}" id="navDetailButton" tooltip="{i18n>tipNavToSummary}" press="changeFixOmega" icon="sap-icon://detail-view"  class="sideMenuButton">

                            </Button>-->
                             
                            <!--
                            <Button id="calculateMirrorY" text="Mirror" tooltip="reflejo"
                                press="onCalculateMirrorY" icon="sap-icon://mirrored-task-circle" class="sideMenuButton"></Button>

                            <Button id="calculateVIDY" text="Hole" tooltip="reflejo"
                                press="onCalculateVIDY" icon="sap-icon://badge" class="sideMenuButton"></Button>
                            -->

                            <!-- DEFECT MODE BUTTONS -->
                            <Text text="{i18n>mode}" class="mapSideMenuTitleText"/>
                            <HBox id="defectModeButtonsContainer" class="fastMarkButtonsContainer">
                                <items>
                                    <ToggleButton id="spotButton" tooltip="{i18n>tipSpot}" press="onPointModeSelected" icon="sap-icon://target-group" class="fastMarkButton"></ToggleButton>
                                    <ToggleButton id="areaButton" tooltip="{i18n>tipArea}" press="onAreaModeSelected" icon="sap-icon://draw-rectangle" class="fastMarkButton"></ToggleButton>
                                    <ToggleButton id="routeButton" tooltip="{i18n>tipLine}" press="onRouteModeSelected" icon="sap-icon://chart-axis" class="fastMarkButton"></ToggleButton>
                                    <ToggleButton id="omegaButton" text="Ω" tooltip="{i18n>tipOmega}" press="onOmegaModeSelected" class="fastMarkButton omegaButton"></ToggleButton>
                                </items>
                            </HBox>
                            <Button text="{i18n>createArea}" id="createAreaButton" tooltip="{i18n>tipCreateAreaButton}" press="onAddAreaPress" icon="sap-icon://add"
                                class="sideMenuButton"></Button>
                            <HBox id="shapeButtonsContainer" class="fastMarkButtonsContainer">
                                <items>
                                    <ToggleButton id="squareButton" tooltip="{i18n>tipSquare}" press="onSquareModeSelected" icon="sap-icon://border" class="fastMarkButton"></ToggleButton>
                                    <ToggleButton id="triangleButton" tooltip="{i18n>tipTriangle}" press="onTriangleModeSelected" icon="sap-icon://project-definition-triangle" class="fastMarkButton"></ToggleButton>
                                    <ToggleButton id="circleButton" tooltip="{i18n>tipCircle}" press="onCircleModeSelected" icon="sap-icon://circle-task" class="fastMarkButton"></ToggleButton>
                                </items>
                            </HBox>
                            <!-- END DEFECT MODE BUTTONS -->
                            <!-- ACTION BUTTONS -->
                            <Text text="{i18n>action}" class="mapSideMenuTitleText"/>
                            <HBox class="fastMarkButtonsContainer">
                                <items>
                                    <ToggleButton id="createDefectButton" tooltip="{i18n>tipNewDefect}" press="onCreateSelected" icon="sap-icon://add"
                                        class="fastMarkButton mapCreateButton"></ToggleButton>
                                    <ToggleButton id="repairDefectButton" tooltip="{i18n>tipRepair}" press="onRepairSelected" icon="sap-icon://technical-object"
                                        class="fastMarkButton mapRepairButton"></ToggleButton>
                                    <ToggleButton id="verifyDefectButton" tooltip="{i18n>tipVerify}" press="onVerifySelected" icon="sap-icon://activity-2"
                                        class="fastMarkButton mapVerifyButton"></ToggleButton>
                                </items>
                            </HBox>
                            <HBox id="statusButtonsOnlyIconContainer" class="fastMarkButtonsContainer">
                                <items>
                                    <ToggleButton id="removeDefectButton" tooltip="{i18n>tipDelete}" press="onDeleteSelected" icon="sap-icon://delete" class="fastMarkButton"></ToggleButton>
                                    <ToggleButton id="commentDefectButton" tooltip="{i18n>tipAddComment}" press="onCommentSelected" icon="sap-icon://comment"
                                        class="fastMarkButton"></ToggleButton>
                                    <ToggleButton id="helpButton" tooltip="{i18n>tipRollback}" press="onHelpSelected" icon="sap-icon://nav-back" class="fastMarkButton"></ToggleButton>
                                </items>
                            </HBox>
                            <Text text="{i18n>filters}" class="mapSideMenuTitleText"/>
                            <HBox>
                                <items>
                                    <ToggleButton id="filterButton" tooltip="{i18n>tipFilter}" press="onFilterSelected" icon="sap-icon://filter" class="sideMenuButton"></ToggleButton>
                                    <ToggleButton id="clearFilterButton" tooltip="{i18n>tipUnfilter}" press="onUnfilterSelected" icon="sap-icon://clear-filter"
                                        class="sideMenuButton"></ToggleButton>
                                </items>
                            </HBox>
                            <Text text="{i18n>quickFlagging}" class="mapSideMenuTitleText"/>
                            <HBox class="fastMarkButtonsContainer customSmallMarginTop">
                                <items>
                                    <Button text="1" tooltip="{i18n>tipVerify}" press="changeFixOmega" class="fastMarkButton"></Button>
                                    <Button text="2" tooltip="{i18n>tipVerify}" press="changeFixOmega" class="fastMarkButton"></Button>
                                    <Button text="2" tooltip="{i18n>tipVerify}" press="changeFixOmega" class="fastMarkButton"></Button>
                                </items>
                            </HBox>
                            <HBox class="fastMarkButtonsContainer">
                                <items>
                                    <Button text="3" tooltip="{i18n>tipVerify}" press="changeFixOmega" class="fastMarkButton"></Button>
                                    <Button text="4" tooltip="{i18n>tipVerify}" press="changeFixOmega" class="fastMarkButton"></Button>
                                    <Button text="2" tooltip="{i18n>tipVerify}" press="changeFixOmega" class="fastMarkButton"></Button>
                                </items>
                            </HBox>
                            <HBox class="fastMarkButtonsContainer">
                                <items>
                                    <Button text="5" tooltip="{i18n>tipVerify}" press="changeFixOmega" class="fastMarkButton"></Button>
                                    <Button text="6" tooltip="{i18n>tipVerify}" press="changeFixOmega" class="fastMarkButton"></Button>
                                    <Button text="2" tooltip="{i18n>tipVerify}" press="changeFixOmega" class="fastMarkButton"></Button>
                                </items>
                            </HBox>
                            <Button text="OTRO" id="otherButton" tooltip="{i18n>tipOther}" press="changeFixOmega"></Button>
                            <!-- END ACTION BUTTONS -->
                        </items>
                    </VBox>
                    <vk:MapContainer id="mapC" autoAdjustHeight="true" width="90%" >
                        <vk:content>
                            <vk:ContainerContent title="Analytic Map">
                                <vk:content>
                                    <vbm:AnalyticMap id="HDR" width="100%" xmlns:l="sap.ui.layout" height="80%" initialPosition="6.56;13.28;0" initialZoom="7"
                                     regionContextMenu="onRegionContextMenu" scaleVisible="true" legendVisible="true" click="myClick"
                                        select="onSelect" centerChanged="onCenterChanged" zoomChanged="onZoomChanged">
                                        <vbm:resources>
                                            <vbm:Resource name="ErrorNotComment" src="images/spots/createdNotComment_Dalt.png"/>
                                            <vbm:Resource name="ErrorComment" src="images/spots/createdComment_Dalt.png"/>
                                            <vbm:Resource name="WarningNotComment" src="images/spots/repairedNotComment_Dalt.png"/>
                                            <vbm:Resource name="WarningComment" src="images/spots/repairedComment_Dalt.png"/>
                                            <vbm:Resource name="SuccessNotComment" src="images/spots/verifiedNotComment_Dalt.png"/>
                                            <vbm:Resource name="SuccessComment" src="images/spots/verifiedComment_Dalt.png"/>
                                            <vbm:Resource name="InactiveNotComment_0_Dalt" src="images/spots/inactiveNotComment_0_Dalt.png"/>
                                            <vbm:Resource name="InactiveComment_0_Dalt" src="images/spots/inactiveComment_0_Dalt.png"/>
                                            <vbm:Resource name="AssistedNotComment_0_Dalt" src="images/spots/assistedNotComment_0_Dalt.png"/>
                                            <vbm:Resource name="AssistedComment_0_Dalt" src="images/spots/assistedComment_0_Dalt.png"/>
                                            <vbm:Resource name="InactiveNotComment_1_Dalt" src="images/spots/inactiveNotComment_1_Dalt.png"/>
                                            <vbm:Resource name="InactiveComment_1_Dalt" src="images/spots/inactiveComment_1_Dalt.png"/>
                                            <vbm:Resource name="InactiveNotComment_2_Dalt" src="images/spots/inactiveNotComment_2_Dalt.png"/>
                                            <vbm:Resource name="InactiveComment_2_Dalt" src="images/spots/inactiveComment_2_Dalt.png"/>
                                        
                                            
                                        </vbm:resources>
                                        <vbm:vos>
                                
                                            <vbm:Routes id="Routes" items="{/Routes}">
                                                <vbm:Route position="{position}" color="{color}" start="{start}" end="{end}" tooltip="{defectTypeDesc} {comment}"
                                         labelText="{text}" labelBgColor="RGB(0;0;0)" linewidth="{linewidth}" lineDash="{lineDash}"/>
                                            </vbm:Routes>
                                     
                                            <vbm:Areas id="Areas" items="{/Areas}" contextMenu="onContextMenuItem" >
                                                <vbm:Area id="Area" contextMenu="changeFixOmega" tooltip="{defectTypeDesc} {comment}" color="{color}" colorBorder="{border}"
                                                    position="{polygon}" labelArrow="false" labelBgColor="{labelColor}" labelBorderColor="{labelColor}" labelPos="0" 
                                         labelText="{text}"/>
                                            </vbm:Areas>            
                                       
                                    
                                          <vbm:Areas id="AreasLocked" items="{/AreasLocked}" contextMenu="onContextMenuItem">
                                            <vbm:Area id="AreaLocked" click="onClickAreaLocked" contextMenu="onContextMenuArea" position="{polygon}" color="{color}" colorBorder="{border}"/>
                                            </vbm:Areas>    
                                    
                                            <vbm:Spots id="Spots" items="{/Spots}">
                                                <vbm:Spot position="{position}" tooltip="{defectTypeDesc}{comment}" contentOffset="0;2" hotDeltaColor="{color}" text="{text}" click="onControlClicked"
                                                        contentColor="{path: 'comment', formatter: 'util.my.Formatter.spotContentFont' }"  image="{ parts : [ 'type', 'comment'], formatter: 'util.my.Formatter.spotImage' }"/>
                                            </vbm:Spots>
                                    
                                     

                                        </vbm:vos>
                                    </vbm:AnalyticMap>
                                </vk:content>
                            </vk:ContainerContent>
                        </vk:content>
                    </vk:MapContainer>
                </items>
            </HBox>
        </content>
    <footer>
            <OverflowToolbar id="mapFooterToolbar" visible="false">
                    <RadioButtonGroup id="LhRhRadioButtonGroup2" columns="2" class="LhRhRadioButtonGroup" select="onS19Changed2">
                        <buttons>
                            <RadioButton text="LH"></RadioButton>
                            <RadioButton text="RH"></RadioButton>
                        </buttons>
                    </RadioButtonGroup>
                <ToolbarSpacer/>
                    <Text id="avisoSector" text ="Seleccione el/los sector(es) en los que desee trabajar" class="footerToolbar" />
                <ToolbarSpacer/>
                    <Text id="nTSectors" text ="Sectores seleccionados: " class = "headerToolbar"  visible="false"/>    
                <Text id="nSectors" text ="0" class = "headerToolbar"  visible="false"/>
                <ToolbarSpacer/>        
                <OverflowToolbarButton id="editSectors" text="Edit" tooltip="Editar sectores seleccionados" icon="sap-icon://edit" press="onEditLocked"  visible="false" />
                <OverflowToolbarButton  id="cancelSectors" text="Cancel"  tooltip="Cancelar selección sectores" icon="sap-icon://cancel" press="onCancelEditLocked" visible="false"/>
            </OverflowToolbar>
        </footer>
    </Page>
    <!-- <html:button class="staticTop5Button top5BigButton">1</html:button>
      <html:button class="staticTop5Button top5SmallButton top5SmallButton1">2</html:button>
      <html:button class="staticTop5Button top5SmallButton top5SmallButton2">3</html:button>
      <html:button class="staticTop5Button top5SmallButton top5SmallButton3">4</html:button>
      <html:button class="staticTop5Button top5SmallButton top5SmallButton4">99</html:button>-->
</mvc:View>

New contributor

Fernando Prieto Pérez is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa Dịch vụ tổ chức sự kiện 5 sao Thông tin về chúng tôi Dịch vụ sinh nhật bé trai Dịch vụ sinh nhật bé gái Sự kiện trọn gói Các tiết mục giải trí Dịch vụ bổ trợ Tiệc cưới sang trọng Dịch vụ khai trương Tư vấn tổ chức sự kiện Hình ảnh sự kiện Cập nhật tin tức Liên hệ ngay Thuê chú hề chuyên nghiệp Tiệc tất niên cho công ty Trang trí tiệc cuối năm Tiệc tất niên độc đáo Sinh nhật bé Hải Đăng Sinh nhật đáng yêu bé Khánh Vân Sinh nhật sang trọng Bích Ngân Tiệc sinh nhật bé Thanh Trang Dịch vụ ông già Noel Xiếc thú vui nhộn Biểu diễn xiếc quay đĩa Dịch vụ tổ chức tiệc uy tín Khám phá dịch vụ của chúng tôi Tiệc sinh nhật cho bé trai Trang trí tiệc cho bé gái Gói sự kiện chuyên nghiệp Chương trình giải trí hấp dẫn Dịch vụ hỗ trợ sự kiện Trang trí tiệc cưới đẹp Khởi đầu thành công với khai trương Chuyên gia tư vấn sự kiện Xem ảnh các sự kiện đẹp Tin mới về sự kiện Kết nối với đội ngũ chuyên gia Chú hề vui nhộn cho tiệc sinh nhật Ý tưởng tiệc cuối năm Tất niên độc đáo Trang trí tiệc hiện đại Tổ chức sinh nhật cho Hải Đăng Sinh nhật độc quyền Khánh Vân Phong cách tiệc Bích Ngân Trang trí tiệc bé Thanh Trang Thuê dịch vụ ông già Noel chuyên nghiệp Xem xiếc khỉ đặc sắc Xiếc quay đĩa thú vị
Trang chủ Giới thiệu Sinh nhật bé trai Sinh nhật bé gái Tổ chức sự kiện Biểu diễn giải trí Dịch vụ khác Trang trí tiệc cưới Tổ chức khai trương Tư vấn dịch vụ Thư viện ảnh Tin tức - sự kiện Liên hệ Chú hề sinh nhật Trang trí YEAR END PARTY công ty Trang trí tất niên cuối năm Trang trí tất niên xu hướng mới nhất Trang trí sinh nhật bé trai Hải Đăng Trang trí sinh nhật bé Khánh Vân Trang trí sinh nhật Bích Ngân Trang trí sinh nhật bé Thanh Trang Thuê ông già Noel phát quà Biểu diễn xiếc khỉ Xiếc quay đĩa
Thiết kế website Thiết kế website Thiết kế website Cách kháng tài khoản quảng cáo Mua bán Fanpage Facebook Dịch vụ SEO Tổ chức sinh nhật