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

panZoomEvent error #33

Closed
alan-wu opened this issue Aug 13, 2024 · 3 comments
Closed

panZoomEvent error #33

alan-wu opened this issue Aug 13, 2024 · 3 comments

Comments

@alan-wu
Copy link
Contributor

alan-wu commented Aug 13, 2024

I am getting an error from the pan zoom event with the following error:


TypeError: Cannot read properties of undefined (reading 'layerX')
    at Cht.panZoomEvent_ (@abi-software_flatmap-viewer.js?v=2acb1da3:88921:23)

Looks like it comes from the following function:

panZoomEvent_(type, event)

Our code is calling the zoomToGeoJSONFeatures method with the following list -

 ['12517', '12518', '12519', '12520', '12521', '12522', '12523', '12524', '12525', '12526', '12527', '12528', '12529', '12530', '12531', '12532', '12533', '12534', '12535', '12537', '12538', '12539', '12540', '12541', '12542', '12543', '12544', '12545', '12546', '12547', '12548', '12549', '12550', '12551', '12552', '12553', '12554', '12555', '12556', '12557', '12558', '12559', '12560', '12561', '12562', '12563', '12564', '12565', '12566', '12567', '12568', '12569', '12570', '12571', '12572', '12573', '12574', '12575', '12576', '12577', '12578', '12579', '12580', '12581', '12582', '12583', '12584', '12585', '12586']
 
 in the rat flatmap on the curation server.

@dbrnz
Copy link
Contributor

dbrnz commented Aug 13, 2024

As a workaround pass {noZoomIn: true} as options -- i.e. zoomToGeoJSONFeatures(zoomIds, {noZoomIn: true}).

I also think we've been here before...

@dbrnz
Copy link
Contributor

dbrnz commented Aug 13, 2024

No, forget that workaround, there's a second issue at play (and a fix about to made).

dbrnz added a commit to dbrnz/flatmap-viewer that referenced this issue Aug 15, 2024
@dbrnz
Copy link
Contributor

dbrnz commented Aug 15, 2024

Fixed in release 3.1.0.

@dbrnz dbrnz closed this as completed Aug 15, 2024
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