Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/fnesveda/mapswitcher
A browser extension to switch between map websites.
https://github.com/fnesveda/mapswitcher
Last synced: about 2 months ago
JSON representation
A browser extension to switch between map websites.
- Host: GitHub
- URL: https://github.com/fnesveda/mapswitcher
- Owner: fnesveda
- License: mit
- Created: 2019-08-28T18:04:04.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-11-08T11:31:59.000Z (about 5 years ago)
- Last Synced: 2024-11-22T03:25:54.638Z (2 months ago)
- Language: JavaScript
- Homepage: https://www.nesveda.com/projects/MapSwitcher/
- Size: 1.16 MB
- Stars: 5
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
MapSwitcher
A browser extension to switch between map websites.
About
-----
*MapSwitcher* is a small browser extension which adds buttons to various map services for opening the displayed location in a different service.Currently supported is switching between Google Maps, Mapy.cz and Geoportal.gov.cz.
This is a small summer project which I did to get some practice with developing browser extensions. There are a few similar projects available, but none support Geoportal.gov.cz and I didn't like their user experience, so I wanted to make a free, simple, open source alternative which would suit my needs and would integrate well with the supported services.
Installation
------------
*MapSwitcher* currently supports Google Chrome, Mozilla Firefox and Opera.To install, download the extension either from the [Chrome Web Store](https://chrome.google.com/webstore/detail/mapswitcher/eogccmggebhlkjdjhlgddmnkffjfjamo) or the [Firefox Add-Ons](https://addons.mozilla.org/en-US/firefox/addon/map-switcher/) portal.
Usage
-----
*MapSwitcher* adds buttons to the tools sections of Google Maps and Mapy.cz, clicking on which opens the currently displayed location in Google Maps, Mapy.cz or Geoportal.gov.cz.
In the extension options you can decide which buttons will be shown, as well as whether the new map will open in a new tab.Developing
----------
*MapSwitcher* is a fairly standard WebExtension, prepared to work in all the major browsers supporting WebExtensions.
Currently it is tested to work in Google Chrome, Mozilla Firefox and Opera, with support for Microsoft Edge coming as soon as Edge officially switches to a Chromium base in the stable releases.The extension injects content scripts to the supported services, which on load of the page insert the desired buttons to the DOM.
When clicking those buttons, the currently displayed location gets extracted from the page URL and gets converted to the coordinate system used by the target service,
from which the target URL is assembled and then opened.### Quirks and perks
Most of the work the extension does happens in content scripts, except for the retrieval of Geoportal.gov.cz URLs.
Geoportal uses a private API to request permalinks to a map view of a given location, and the API does not accept cross-origin requests.
To work around that, we need to send requests to the API from a background script, which avoids the CORS problems.Links
-----
- [Project homepage](https://www.nesveda.com/projects/MapSwitcher/)
- [Project repository](https://www.github.com/fnesveda/MapSwitcher/)Licensing
---------
The code in this project is licensed under the MIT license.
Everybody is welcome to use, change and modify the project as they see fit.The Google Maps, Mapy.cz and Geoportal.gov.cz logos are registered trademarks of their respective owners, and are used within this project only for identification purposes.