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

TopoJSON Map Fixes #425

Merged
merged 8 commits into from
Aug 15, 2024
Merged

TopoJSON Map Fixes #425

merged 8 commits into from
Aug 15, 2024

Conversation

reb-dev
Copy link
Collaborator

@reb-dev reb-dev commented Aug 7, 2024

This PR addresses multiple issues with TopoJSON maps, makes some revisions to the TopoJSONMap component doc page, and adds a few new examples to the demo app.

Changes:

  • Fixed: when multiple TopoJSONMap components are on the same page, they share the same projection instance and cause inconsistent behavior when panning/zooming on any one of them (This is related to the change when we converted configs from classes to objects, sorry @rokotyan I found another one)
  • Fixed: Zooming/panning when mapFitToPoints is enabled will reset the view entirely
  • Fixed the issue where TopoJSONLayer property in LeafletMap component not taking effect
  • If points are added/removed to/from the data and mapFitToPoints is enabled, the map will now refit to the new points (previously did nothing)
  • Added the following countries that were missing from WorldMapTopoJSON:
Name Country Code
Aruba AW
Anguilla AI
American Samoa AS
Antigua and Barbuda AG
Bermuda BM
Barbados BB
Cook Islands CK
Curaçao CW
Cayman Islands KY
Micronesia, Federated States of FM
Guernsey GG
Grenada GD
Guam GU
Heard Island and McDonald Islands HM
Isle of Man IM
Cocos Islands CC
Christmas Island CX
British Indian Ocean Territory IO
Jersey JE
Kiribati KI
Saint Kitts and Nevis KN
Macao MO
Monaco MC
Maldives MV
Marshall Islands MH
Malta MT
Northern Mariana Islands MP
Montserrat MS
Norfolk Island NF
Niue NU
Pitcairn PN
Palau PW
Saint Helena, Ascension and Tristan da Cunha SH
San Marino SM
Saint Pierre and Miquelon PM
Seychelles SC
Turks and Caicos Islands TC
Tonga TO
Saint Vincent and the Grenadines VC
Virgin Islands, British VG
Virgin Islands, U.S. VI
Wallis and Futuna WF

Copy link
Collaborator

@lee00678 lee00678 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the fixes! This is great.

I just have one issue I've noticed. (pan or zoom on this map, the map disappears)

Screen.Recording.2024-08-07.at.11.30.08.AM.mov

Comment on lines +26 to +30
events={{
[TopoJSONMap.selectors.feature]: {
// click: c => console.log(c),
},
}}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unused code?

@rokotyan
Copy link
Contributor

rokotyan commented Aug 9, 2024

Thanks for the fixes @reb-dev!

@reb-dev
Copy link
Collaborator Author

reb-dev commented Aug 9, 2024

I just have one issue I've noticed. (pan or zoom on this map, the map disappears)

Can you try npm run install:clean and try the local build again? I can't seem to reproduce it on my end

@lee00678
Copy link
Collaborator

Can you try npm run install:clean and try the local build again? I can't seem to reproduce it on my end

My bad, it's working after the clean install.

@reb-dev reb-dev merged commit cff348d into main Aug 15, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants