Cheap Tricks for Interaction
✓ Published0🌍 Public
This example demonstrates interactive annotation on a natural Earth projection world map. Clicking anywhere places a scaled pointer marker that fades in via a D3 transition, while holding Ctrl and clicking a marker removes it. The map is rendered from TopoJSON world-atlas data using `d3.geoPath`, with pan and zoom handled by `d3.zoom`. The pointer shape is defined as an SVG symbol, and mouse events rely on `d3.event` and `d3.mouse`.
AI-generated descriptionSince 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