Skip to content

TopoJSON Map Fixes#425

Merged
reb-dev merged 8 commits into
mainfrom
fix/topojson-docs
Aug 15, 2024
Merged

TopoJSON Map Fixes#425
reb-dev merged 8 commits into
mainfrom
fix/topojson-docs

Conversation

@reb-dev

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

Copy link
Copy Markdown
Contributor

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

@lee00678 lee00678 left a comment

Copy link
Copy Markdown
Collaborator

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
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Unused code?

@rokotyan

rokotyan commented Aug 9, 2024

Copy link
Copy Markdown
Contributor

Thanks for the fixes @reb-dev!

@reb-dev

reb-dev commented Aug 9, 2024

Copy link
Copy Markdown
Contributor Author

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
Copy Markdown
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.

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

Successfully merging this pull request may close these issues.

Multiple Issues linked to TopoJSON Maps Countries like "Antigua and Barbuda" and "Malta" are not being displayed in Map

3 participants