Disable Zoom functionality on MapGraphicsView double click event

1130
2
Jump to solution
03-21-2018 11:11 AM
VishnuB
New Contributor III

How to disable the map zoom feature when double click event occurs. i am using the MapGraphicsView double click event only for identifying layers. How to disable this zoom feature in Arcgis Runtime 100.2.1 for Qt widget application.

Thanks in advance

0 Kudos
1 Solution

Accepted Solutions
JamesBallard1
Esri Regular Contributor

Hi Vishnu B,

  Yes, this can be done. You can intercept any of the mouse events. To disable the zoom behavior for the MapView on double click, connect up to the signal and "accept" the mouse event. It will look something like this

connect(m_mapView, &MapGraphicsView::mouseDoubleClicked, this, [this](QMouseEvent& mouseEvent)
{
  mouseEvent.accept();
});

View solution in original post

2 Replies
JamesBallard1
Esri Regular Contributor

Hi Vishnu B,

  Yes, this can be done. You can intercept any of the mouse events. To disable the zoom behavior for the MapView on double click, connect up to the signal and "accept" the mouse event. It will look something like this

connect(m_mapView, &MapGraphicsView::mouseDoubleClicked, this, [this](QMouseEvent& mouseEvent)
{
  mouseEvent.accept();
});

VishnuB
New Contributor III

Thank You

0 Kudos