Sie können Ihre KML-Daten als Dataset hochladen und mithilfe von datengestützten Stilen auf der Karte darstellen. Dieser Ansatz bietet eine bessere Leistung und mehr Stiloptionen.
Sie können auch Drittanbieterbibliotheken verwenden, um KML-Dateien im Browser zu parsen und die Daten mithilfe der Datenebene der Maps JavaScript API oder anderer Overlays anzuzeigen.
Zu den beliebten Drittanbieterbibliotheken zum Parsen von KML gehören:
[null,null,["Zuletzt aktualisiert: 2026-10-21 (UTC)."],[],["This tutorial demonstrates how to display KML file information on a Google Map and in a sidebar. Key actions include: initializing a Google Map, creating a `KmlLayer` object to load a KML file from a URL, and configuring the layer to suppress info windows. An event listener is added to capture clicks on KML features. When a click occurs, the feature's `infoWindowHtml` content is extracted and used to update the content of a designated sidebar `div`, dynamically displaying the selected feature's information.\n"]]