src/query/mapQueryComponent.js
function(evt) {
        if (evt instanceof MapBrowserEvent && !evt.dragging) {
          const pixel = map.getEventPixel(evt.originalEvent);
          const queryable = function(layer) {
            const visible = layer.get('visible');
            const sourceids = layer.get('querySourceIds');
            return visible && !!sourceids;
          };
          const hit = map.forEachLayerAtPixel(pixel, () => true, undefined, queryable);
          map.getTargetElement().style.cursor = hit ? 'pointer' : '';
        }
      }
function(evt) {
        if (evt instanceof MapBrowserEvent && !evt.dragging) {
          const pixel = map.getEventPixel(evt.originalEvent);
          const queryable = function(layer) {
            const visible = layer.get('visible');
            const sourceids = layer.get('querySourceIds');
            return visible && !!sourceids;
          };
          const hit = map.forEachLayerAtPixel(pixel, () => true, undefined, queryable);
          map.getTargetElement().style.cursor = hit ? 'pointer' : '';
        }
      }
function ( evt ) { if ( evt instanceof MapBrowserEvent && ! evt . dragging ) { const pixel = map . getEventPixel ( evt . originalEvent ) ; const queryable = function ( layer ) { const visible = layer . get ( 'visible' ) ; const sourceids = layer . get ( 'querySourceIds' ) ; return visible && ! ! sourceids ; } ; const hit = map . forEachLayerAtPixel ( pixel , ( ) => true , undefined , queryable ) ; map . getTargetElement ( ) . style . cursor = hit ? 'pointer' : '' ; } }
Called when the pointer is moved while this controller is active.
Change the mouse pointer when hovering a non-transparent pixel on the
map.
@param {Event|import("ol/events/Event.js").default} evt The map browser event being fired.
Called when the pointer is moved while this controller is active . Change the mouse pointer when hovering a non - transparent pixel on the map .