Google Maps KmlLayer Deprecated: Working Alternatives
Google deprecated
KmlLayeron April 30, 2026 and removed it from Maps JavaScript API v3.66 on October 22, 2026. WordPress plugins and custom site scripts relying ongoogle.maps.KmlLayernow drop flight paths, boundaries, and pins with console errors, pushing small teams to choose between maintaining custom JavaScript parsers or hosting their KML in a dedicated map embed.
If a trail map, flight log, or service territory page on your website suddenly loads a bare basemap with missing routes, an automatic Maps JavaScript API channel update is often the culprit. For over a decade, developers and WordPress map plugins relied on KmlLayer to pass a public .kml or .kmz URL to Google's servers and render overlays automatically.
Google Maps Platform's release notes for version 3.66.11a on October 22, 2026 confirm that KmlLayer is no longer available, following the official deprecation notice posted on April 30, 2026.
What breaks on WordPress and custom KML sites
Site owners upgrading plugins or loading the weekly Google Maps JS API channel immediately see broken overlays and cascading JavaScript exceptions. In a WordPress.org support thread for Easy Google Maps, a site maintainer documented the exact console error triggered after updating:
Uncaught Error: The KmlLayer functionality in the Maps JavaScript API is no longer available in the Maps JavaScript API as of version 3.66.
Once KmlLayer throws that uncaught exception, initialization scripts often abort before drawing markers, setting the viewport, or clearing old shapes. Existing maps sometimes appear without their KML flight tracks, while new embeds fail to mount at all.
To keep overlays alive on WordPress, site owners in that same thread ended up writing custom browser JavaScript with JSZip and DOMParser to unzip .kmz archives, decode KML AABBGGRR hex colors manually, and instantiate google.maps.Polyline objects one by one. Even after patching plugin files, theme CSS rules, LiteSpeed or Cloudflare caching, and split free vs pro plugin updates continue to create ongoing fragility.
Why Google's official KmlLayer replacements demand developer upkeep
Google's KmlLayer Migration Guide outlines two primary paths forward for developers, both aimed at engineering teams comfortable maintaining cloud infrastructure or frontend build pipelines:
- Google Cloud Datasets and Data-driven Styling: Teams convert or upload static KML data as Datasets in Google Cloud Console, switch their map to a Vector Map ID, and write JavaScript calling
map.getDatasetFeatureLayer. Google notes that Datasets do not natively parse<NetworkLink>tags or screen overlays, so dynamic updates require scripted Dataset API uploads and custom map controls. - Client-side third-party parsers: Google documents
deck.glusing@loaders.gl/kmlalongsidegeoxml3. Usingdeck.glrequires a Vector map canvas and JavaScript module setup, whilegeoxml3requires self-hosting parser scripts, configuring CORS headers on your KML server, and writing custom event callbacks for polygons, GroundOverlays, and click info windows.
For a WordPress blog owner, civic association, or marketing coordinator, maintaining togeojson pipelines, Google Cloud IAM billing, or custom geoxml3 scripts solves the deprecation by adding permanent front-end maintenance.
Moving KML and KMZ files to a hosted map embed
If your goal is displaying trails, service zones, or heritage stops on a webpage without writing JavaScript or debugging CMS plugins, importing the source file into a hosted map builder removes the Google Maps JS API dependency altogether.
In Tasmap, you upload .kml or .kmz files directly in the Data workspace, or paste raw KML snippets and individual Placemark XML blocks into the paste editor without hosting external XML files on your web server.
Check these current import specifications before bringing over large archives:
- KML files and pasted snippets: Single
.kmlfiles up to 10 MB, or raw KML text pasted up to 1 MB. - KMZ archives: Unzipped contents up to 20 MB across up to 200 files, keeping the inner KML under 10 MB and individual embedded marker images up to 5 MB each. Oversized marker images skip cleanly while preserving the location itself.
- Element and vertex budgets: Up to 1,000 points, routes, and areas per import batch, with up to 5,000 points on a single line or polygon and 20,000 vertices total.
- Styles and geometry preservation: Keep embedded KML colors and icons or swap to your map's default theme during preview. Inner polygon rings import automatically as hollow polygon cutouts, and any invalid rows appear in a clear issue summary before you confirm.
Once imported, URLs inside marker or route descriptions render as clickable links without extra regex filters. To publish, copy the Responsive ratio iframe at 16:9, 4:3, 1:1, or a custom ratio, or pick Fill container for fixed CMS blocks. Whenever you edit a route or stop in Tasmap and click Save, every embedded iframe reflects the change immediately.
When custom developer migration still makes sense
Hosted imports fit trail directories, flight histories, store zones, and event maps up to 1,000 elements per batch. Stay with a developer-led migration using Google Cloud Datasets API or GeoJSON vector tiles if your application relies on automated live <NetworkLink> server polling every few minutes, serves single-layer maps with tens of thousands of dense shapes, or binds tightly into authenticated web app state.
For everyday website embeds broken by v3.66, replacing a brittle CMS KML plugin with a standalone hosted iframe saves hours of maintenance every time a browser or API version rolls forward.
References
- Maps JavaScript API Release Notes, Google for Developers. Version 3.66.11a entry from October 22, 2026 confirming KmlLayer is no longer available.
- Deprecations, Google Maps Platform. Official KML Layer deprecation notice dated April 30, 2026 with Datasets and third-party parser recommendations.
- KmlLayer Migration Paths, Google for Developers. Technical migration requirements for Datasets, deck.gl
@loaders.gl/kml, andgeoxml3. - Unable to add markers/kml files/location, WordPress.org Support. Site owner console logs showing the v3.66 KmlLayer uncaught error and manual JSZip KMZ workaround.
- Unable to display markers from kml file in latest version, WordPress.org Support. Example of WordPress plugin updates breaking existing external KML marker embeds.
Related reading
Upload your existing KML or KMZ files and embed a clean, responsive map without touching JS API keys or WordPress plugins at tasmap.app.