Skip to content

Using the Map View

Only in DbVisualizer Pro

This feature is only available in the DbVisualizer Pro edition.

Result sets that contain geospatial data (geodata) can be viewed on an interactive map. This allows you to visually inspect and verify location-based datasets directly within DbVisualizer, eliminating the need to export data to external GIS software.

The geo map support in DbVisualizer plots spatial data from any result set onto a map background, where you can pan, zoom, color, label, and inspect your data's features. Points, lines, and polygons are all supported, and each row in your result set translates to a feature on the map.

The map viewer is available as an alternative view for a result set, alongside the standard data grid. You can open it by clicking the map icon among the View as controls located at the top-right of the result panel.

Here are two sample maps, one featuring points and the other polygons:

Sample point map

Sample polygon map

Showing a result set on the map

When you switch to the map view, DbVisualizer automatically detects the geographic data within the active result set and plots it. How spatial columns are read depends on your target database.

  • Native support: H2, PostgreSQL, MySQL, SQL Server, and Oracle are supported natively. Their geometry and geography columns - including native binary formats - are automatically recognized and decoded with no manual conversion required.

  • Best-effort support: Any other database engine is handled on a best-effort basis. Well-Known Text (WKT/EWKT) string formats (for example, POINT(1 2)) are displayed for any database. Standard binary forms (EWKB hex and plain OGC WKB bytes) are also attempted, though proprietary or non-standard binary formats may not decode. If a spatial column fails to render, expose it as WKT using an OGC-standard function like ST_AsText() in your query:

    SELECT id, name, ST_AsText(geom) AS location
    FROM places;
    
  • Coordinate pairs: Latitude and longitude coordinates also work seamlessly across all databases when stored as a pair of distinct numeric columns.

Settings panel

When an active geometry column is detected, the Settings panel opens automatically with that column pre-selected. If no spatial data is automatically detected, you can open the panel manually by clicking the settings icon in the map toolbar.

Map view settings panel

Location

Choose the source format of your geographic data.

  • Geometry: Reads the location data from a single spatial column. Select your target column from the Column drop-down menu.
  • Lat / Lon: Reads the location data from two distinct numeric columns. Select your designated latitude and longitude columns from their respective drop-down menus.

Color

Customize how features are styled and distinguished on the map background.

  • Fill: Draws every map feature in a single, uniform color chosen from the color picker.
  • Color by: Colors each feature dynamically based on a specific column's value. After choosing the target column, select an appropriate Scale, a color Palette, and specify the number of Steps (ranging from 2 to 20) to divide the color bands.

Use the Opacity slider (ranging from 0 for fully transparent to 1 for fully opaque) to control the visibility of the underlying map tiles beneath your plotted shapes.

Below is an example of a dataset colored dynamically by a specific column: Map colored by a column

Label

Select one or more columns to label each mapped feature with its corresponding data value, or leave the setting at None for a clean map interface. Once your labels are configured, you can toggle their visibility on and off using the Show labels icon in the map toolbar.

Map with feature labels

You can navigate and move around the interactive map viewer using typical web map gestures:

  • Pan: Click and drag anywhere on the map surface.
  • Zoom: Use your mouse scroll wheel, double-click, or use the + and buttons in the upper-left corner.
  • Fit map to all markers: Click this toolbar button to automatically recenter and adjust the zoom level so that every plotted feature fits within the visible boundaries.

The map viewer centers automatically on your dataset upon opening, and only loads the background tiles required for your active view as you pan and zoom.

Inspecting a feature

Click directly on any map feature to open an information popup containing that specific row's full attribute values. This allows you to inspect and read the underlying database data without switching back to the grid view.

Feature popup

Export

Maps can be exported in several standard image formats, including PNG, GIF, RAW, and TIFF.

Click the Export button in the map toolbar to save the current map view to an image file on your computer. The exported image captures your exact active view, maintaining the current map boundaries, zoom level, and applied feature styling.

Trying it out

If you do not have geodata readily available on hand, you can ask the AI Assistant to generate a sample dataset for you.

First, ensure you have installed the demo database. Next, open the AI Assistant panel and submit the following prompt:

In my H2 DbVisualizer Demo database, create one table called 'geo_sample':

- 'id' integer primary key
- 'name' varchar
- 'category' varchar, using a few repeating values (e.g. city, river, road, lake, region)
- 'metric_value' integer, with varied numbers
- 'geom' as a native H2 'GEOMETRY' column

Insert 20 rows of real places in a country of your choice, mixing geometry types: mostly 'POINT's (cities), a few 'LINESTRING's (rivers or roads), and a few 'POLYGON's (lakes or regions). Write every geometry as an H2 geometry literal in the form 'GEOMETRY 'SRID=4326;<WKT>'' (WGS 84, longitude latitude order). Do not use 'ST_GeomFromText'. Finish with 'SELECT * FROM geo_sample ORDER BY id;'.

Execute the SQL script generated by the assistant, and open the resulting dataset in the map viewer to try out the map features described in this guide.