GoogleMapsStreetDock is a QGIS plugin that integrates Google Maps and Street View into a dockable browser panel. By clicking on the QGIS map canvas, users can instantly open Street View centered at the selected location, with options to switch to Map View. The panel supports full navigation, enabling detailed exploration and precise digitization of road networks using high-resolution imagery.
- Click any point on the QGIS map canvas to open Street View by default in a dockable panel.
- Switch between Google Maps and Street View using dedicated buttons in the panel.
- Provides a zoom instruction label ("Press CTRL + mouse wheel up/down to adjust the zoom level of the panel").
- Automatically transforms clicked coordinates to WGS84 (EPSG:4326) for accurate positioning.
- Seamless integration with QGIS toolbar and plugin menu for quick activation.
- Renders Google Maps and Street View using a
QWebEngineViewwithin a QGIS dock widget.
- Activate the plugin via the toolbar icon or the "Google Maps/Street Dock" menu.
- Click a location on the QGIS map canvas to select a point.
- The plugin converts the clicked coordinates to WGS84 and opens Street View in a dockable panel.
- Use the "Switch to Map View" or "Switch to Street View" buttons to toggle views.
- Adjust the panel’s zoom level with CTRL + mouse wheel, as indicated by the instruction label.
- Navigate Street View or Map View for detailed road network digitization.
- Clone or download this repository:
git clone https://github.com/Consortis-Geospatial/GoogleMapsStreetDock.git
- Copy the folder to your QGIS plugin directory:
- Linux:
~/.local/share/QGIS/QGIS3/profiles/default/python/plugins/ - Windows:
%APPDATA%\QGIS\QGIS3\profiles\default\python\plugins\ - macOS:
~/Library/Application Support/QGIS/QGIS3/profiles/default/python/plugins/
- Linux:
- Set up the required Python dependencies (see Dependencies section below).
- Open QGIS and enable the plugin via Plugins > Manage and Install Plugins.
To ensure the plugin runs correctly, particularly for the QWebEngineView component, follow these steps to install the required Python packages in the QGIS Python environment. These steps are tailored for QGIS 3.38.3 on Windows but may apply to other versions with slight modifications.
-
Locate the QGIS Python Executable:
- Open the QGIS Python Console (Ctrl+Alt+P or via Plugins > Python Console).
- Run the following commands to identify the Python executable and its path:
import sys print(sys.executable) print(sys.path)
- Note the path to
python.exe(e.g.,C:\Program Files\QGIS 3.38.3\apps\Python312\python.exe).
-
Open Command Prompt and Navigate to Python Directory:
- Open a Command Prompt as Administrator.
- Navigate to the QGIS Python directory:
cd "C:\Program Files\QGIS 3.38.3\apps\Python312"
-
Ensure pip is Available:
- Run the following command to ensure
pipis installed:python.exe -m ensurepip --default-pip
- Run the following command to ensure
-
Upgrade pip:
- Update
pipto the latest version:python.exe -m pip install --upgrade pip
- If you encounter a PATH warning, consider adding
C:\Program Files\QGIS 3.38.3\apps\Python312\Scriptsto your system PATH or ignore it for one-time use.
- Update
-
Install PyQtWebEngine:
- Install the
PyQtWebEnginepackage, which includesQtWebEngineWidgets:python.exe -m pip install PyQtWebEngine
- Install the
-
Verify Installation:
- Restart QGIS and activate the plugin. If errors occur, confirm that
PyQtWebEngineand its dependencies (e.g.,PyQtWebEngine-Qt5) are installed correctly by running:in the QGIS Python Console.import PyQt5.QtWebEngineWidgets
- Restart QGIS and activate the plugin. If errors occur, confirm that
Coming Soon...
- Developed in Python using PyQt, PyQGIS, and QtWebEngine APIs.
- Uses a custom
QgsMapToolto capture map clicks and transform coordinates. - Employs
QWebEngineViewto render Google Maps and Street View within the QGIS interface. - Coordinates are transformed to EPSG:4326 (WGS84) for compatibility with Google Maps.
- Includes buttons for toggling between Map and Street View, with URL parsing to maintain coordinates.
- Dock state is preserved using a unique
objectName, and manual dock closure is handled gracefully.
- QGIS 3.x: Compatible with QGIS version 3.x (tested with 3.38.3), providing the core GIS functionality and PyQGIS API.
- Python 3: QGIS 3.38.3 includes an embedded Python 3.12 interpreter. Other QGIS 3.x versions may use Python 3.7 or higher.
- PyQt5: Required for GUI components like
QAction,QDockWidget,QPushButton, andQWebEngineView. Bundled with QGIS 3.x installations (version 5.15.10 or similar). - PyQtWebEngine: Provides the
QtWebEngineWidgetsmodule for rendering web content viaQWebEngineView. Must be installed manually (as shown above) if not included in your QGIS setup:- Installs
PyQtWebEngine(e.g., version 5.15.7) andPyQtWebEngine-Qt5(e.g., version 5.15.2). - On Linux, ensure
qt5-webengineorlibqt5webengineis installed (e.g.,sudo apt install qt5-webengineon Ubuntu). - On Windows, installed via
pipas shown in the setup steps. - On macOS, typically bundled with QGIS, but verify WebEngine support in your QGIS build.
- Installs
- PyQt5-sip: A dependency of
PyQtWebEngine, usually included with QGIS (version 12.13.0 or higher). - urllib.parse: Part of the Python standard library, used for parsing URLs to extract coordinates.
- Homepage: https://github.com/Consortis-Geospatial
- Issue Tracker: https://github.com/Consortis-Geospatial/GoogleMapsStreetDock/issues
- Author: Gkaravelis Andreas - Consortis Geospatial
- Email: gkaravelis@consortis.gr
- Repository: https://github.com/Consortis-Geospatial/GoogleMapsStreetDock
This plugin is released under the GPL-3.0 license.
