Open in Map is a Visual Studio Code extension that allows developers to visualize geographical coordinates directly within the editor. By simply selecting latitude and longitude values in your code, you can open a map view in a split editor and see the exact locations marked with pins.
Features 🚀
Instant Map Visualization: Select latitude and longitude values, and see them on a map instantly.
Multiple pins Adding additional lat/lngs will add to the existing map.
Interactive Map: Pan, zoom, and explore the map right within VS Code.
Elegant Animations: New markers are shown with an expanding circle.
Robust matching: As long as the lat/lngs are comma separated it will find within arrays and other formats eg ["-20.1235,-19.236", "-12.466,23.467"] and <loc>-20.1235, -19.236</loc><loc>-12.466, 23.467</loc> will work.
Installation 💻
Open the Extensions view in VS Code (Ctrl+Shift+X).
Search for "Open in Map."
Click "Install" to install the extension.
Reload VS Code to activate the extension.
Usage 🌐
Highlight the latitude and longitude values in your code (e.g., 51.501476,-0.140634).
Use the command palette (Ctrl+Shift+P) and search for "Open in map."
Enjoy the map view in a split editor with the selected coordinates marked.
Acknowledgments 🙏
Special thanks to the Leaflet library for providing the mapping functionality. The maps are served from Open Street Map, please consider donating to them to keep the servers running.
Author 👨💻
Developed by Patrick Woodcock, a contract software developer in the UK. Linkedin
Contributing 🤝
Contributions are welcome! Feel free to open an issue or submit a pull request.
License 📄
This project is licensed under the MIT License - see the LICENSE file for details.