Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The cursorStyle is not having any effect on the page. #409

Open
Lowell20 opened this issue Nov 14, 2023 · 1 comment
Open

The cursorStyle is not having any effect on the page. #409

Lowell20 opened this issue Nov 14, 2023 · 1 comment

Comments

@Lowell20
Copy link

Using Angular 16, "ngx-mapbox-gl": "10.0.0"

The cursorStyle is not having any effect on the page.

I would expect the cursor to be a pointer when mousing over the map.
Please let me know if it is possible to use an image in place of 'pointer'

<mgl-map
[style]="mapStyle"
[zoom]="[zoom]"
[bearing]="[0]"
[pitch]="[45]"
[center]="center"
[style.height.%]="100"
[cursorStyle]="'pointer'"
(mapClick)="onMapClick($event)"
>

@danielkuhlwein
Copy link

danielkuhlwein commented Oct 15, 2024

I am reproducing the same issue.

Angular: "18.2.1"
ngx-mapbox-gl: "11.0.1"

Passing any valid cursor attribute into mgl-map component's cursorStyle property is not having any effect. It also throws this error:

TypeError: Cannot read properties of undefined (reading 'getCanvasContainer')
    at _MapService.changeCanvasCursor (ngx-mapbox-gl.mjs:204:37)
    at _MapComponent.ngAfterViewInit (ngx-mapbox-gl.mjs:2472:23)
    at callHookInternal (core.mjs:5007:10)
    at callHook (core.mjs:5031:7)
    at callHooks (core.mjs:4991:9)
    at executeInitAndCheckHooks (core.mjs:4946:5)
    at refreshView (core.mjs:13413:11)
    at detectChangesInView (core.mjs:13549:5)
    at detectChangesInViewIfAttached (core.mjs:13511:3)
    at detectChangesInComponent (core.mjs:13500:3)

Reproducible stackblitz here (just supply your own mapbox-gl token):

Screenshot 2024-10-15 at 9 53 56 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants