What Delphi Google Map is
TEdgeGoogleMapViewer is a VCL component that shows a Google Map inside your Delphi application. It is a wrapper on the WebView2 component (TCustomEdgeBrowser, the Microsoft Edge engine) that adds what an application needs from a map: go to an address or to a position, markers, circles, polylines and polygons, routing with the directions panel, map events, and the map type, layers and controls as properties.
You set properties and call methods; the component generates the web page, loads the Google Maps JavaScript API in it and calls its functions for you.
// Go to an address
EdgeGoogleMapViewer.GotoAddress(MemoAddress.Lines.Text);
// Go to a latitude / longitude
var
Location: TLatLng;
begin
Location.Latitude := TEdgeGoogleMapViewer.TextToCoord(Latitude.Text);
Location.Longitude := TEdgeGoogleMapViewer.TextToCoord(Longitude.Text);
EdgeGoogleMapViewer.GotoLocation(Location);
end;
// Change the view mode
EdgeGoogleMapViewer.MapTypeId := mtHYBRID;At a glance
| Component | TEdgeGoogleMapViewer, unit Vcl.GoogleMap, in the Ethea page of the palette |
| Framework | VCL only (it needs WebView2) |
| Delphi | 10.4.2, 11, 12 and 13 |
| Platforms | Windows 32 and 64 bit |
| Needs | A Google Maps API key, an internet connection, WebView2Loader.dll and the Microsoft Edge WebView2 Runtime on the user's machine |
| License | Apache 2.0 |
What it can do
- Show the map: by address or coordinates, map type (road map, satellite, hybrid, terrain), zoom, traffic and bicycling layers, controls, light and dark colour scheme.
- Markers: by coordinates or by address, with label, animation, info window and custom drawing.
- Circles, polylines and polygons, and the distance between two points.
- Routing between addresses or coordinates, with the directions panel.
- Events: click, right click and zoom of the map.
- Your own JavaScript inside the page, for what the component does not wrap.
There is a complete demo that uses every one of these, and the Quick Start goes from an empty form to a map.
The documentation is the demo too
The demo application is where each feature is shown at work, with the Delphi code that calls it. Open Demo\GoogleMaps\GoogleMapsTest.dproj: the pages of this site refer to its code.
License
Copyright © 2021-2026 Ethea S.r.l. Licensed under the Apache License, Version 2.0. Google Maps is a product of Google; its use is subject to the Google Maps Platform terms.