Skip to main content
100%

Cheap Tricks for Interaction

✓ Published1🌍 Public
CChooo4u
Last edited Sep 26, 2018
Created on Sep 26, 2018

This example shows an interactive world map where users can click to place blue pointer markers anywhere on the globe. The map renders countries from TopoJSON data using d3.geoPath with a natural Earth projection. Click handlers use d3.mouse to capture coordinates and append SVG `<use>` elements referencing a predefined pointer icon. The visualization also incorporates d3.zoom for panning and scaling, with country names displayed via hover titles from a TSV dataset.

AI-generated description

Since meeting a problem when trying to select multiple countries, I choose to add a landmark on the world map by clcking. Thanks to the tutorial:D3.JS TUTORIAL: MOUSE EVENTS HANDLING

MIT Licensed

Similar vizzes