Deck.gl: Is there a way to override cursor style in deck gl on arcgis maps

Created on 20 Aug 2020  路  7Comments  路  Source: visgl/deck.gl

I know we can override cursor style in deck gl using google maps and mapbox. Is there a way to override the same on arcgis maps?

question

All 7 comments

@damix911

Hello @arunkarepu thank you for your question.

I feel like it should be possible by creating the DeckLayer instance like this:

const layer = new DeckLayer({
  "deck.getCursor": () => "progress"
});

But it seems like it's not working so it means that you may have found a legitimate bug. I'll have a look at this, and possibly confirm that it is indeed a bug and possibly come up with a solution.

Can you point me to examples/share code of how you would do it with Google Maps and MapBox? So I can provide an answer that is most relevant for you.

Thanks!

Opened issue #4895 and possible fix #4896 but we are still actively looking for alternatives.

In particular I am trying to understand if there is a way to set the cursor using CSS.

Deck.gl sets the CSS cursor property on the canvas. If the styling should be controlled on the ArcGIS container level you can use getCursor: () => 'inherit'.

Deck.gl sets the CSS cursor property on the canvas. If the styling should be controlled on the ArcGIS container level you can use getCursor: () => 'inherit'.

Yes, I tested this locally with the #4896 fix and I can confirm that it behaves as expected.

I am still trying to figure out workarounds that @arunkarepu could use in the meantime, but haven't been successful so far. I though of adding an overlay <div> to set the cursor; however, if you do that you need to specifiy pointer-events: none so that ArcGIS can remain interactive. But if you do that, Deck.GL will succeed in setting its own standard _"grab"_ cursor.

I'll keep you posted if I discover something useful.

Thanks @damix911 for resolving this issue. It would be great if you can provide me an alternative to fix this issue for the time being. I tried to override cursor on arcgis maps but deck gl is internally changing the pointer to "grab" cursor every time.

Fix is published in 8.2.7

Was this page helpful?
0 / 5 - 0 ratings