GMap version: 7.x-1.x-dev
GMap addons version: 7.x-1.x-dev
Drupal core 7.9

1. I have viewed the kml file in Google Earth.
2. I have no issues with GMap macros (user since Drupal 6).

My kml does not display. There are no error messages. I just get the base map driven by the macro without the overlay. I followed the syntax in the subcomponent README and here as well: How to insert overlays into Nodes and Views

Could I get confirmation that the above combination should work for displaying kml overlays? How about tiles? Thank you.

Comments

torgormack’s picture

I have just move my site from D6 to D7 and I am getting the same problem.

kniekel’s picture

It used to work for me with gmap 7.x.something-dev from April 2012. Stopped working when I switched to gmap 7.x.2.2. and it seems that the old Gmap version is no longer available, so I can't switch back. :-/
Now, when I use overlay=kml:, the map displays without any markers.

kniekel’s picture

The 1.x versions of Gmap work for me, eg http://drupal.org/node/1831410#comment-6693082

See an example at http://test.schweinfurt-evangelisch.de/karte

The gmap macro for this map is [gmap height=800px||overlay=kml:http://test.schweinfurt-evangelisch.de/alle27b.kml]

sirtet’s picture

took me forever to find this post!
after downgrading gmap to 7.x-1.x-dev - 2013-Mar-01 i see my kml files!
(gmap_addons 7.x-1.x-dev - 2011-Mar-30 )

sirtet’s picture

Title: Requesting confirmation of successful kml overlay display in Drupal 7 » kml overlay only working with gmap 7.x-1.x
Category: support » bug
swiftarf’s picture

I'm having the same problem as Kniekel with GMap 7.x-2.6
It was working ok with previous version of GMap, but an upgrade to 7.x-2.6 broke it.

kniekel’s picture

Anybody still working on this module?
Here ist the javascript error I get with KML overlay activated:

[12:38:32.367] ReferenceError: GGeoXml is not defined @ https://www.schweinfurt-evangelisch.de/sites/all/modules/gmap_addons/gma...

(This was with GMap 7.x.2.6 I think)

There is some more discussion about this in https://drupal.org/node/1831410

Still no KML overlay possible with Gmap 2.7.

ErikJanVens’s picture

Same here. On http://ejvens.net/trekvogelpad/alkmaar-purmerend the maps show but the KML doesn't.

The error message is: Timestamp: 06/25/2013 08:46:41 AM
Error: ReferenceError: GGeoXml is not defined
Source File: http://ejvens.net/sites/all/modules/gmap_addons/gmap_overlays/js/overlay...
Line: 15

Drupal version : 7.22
Location GMap (gmap) Module Enabled 7.x-2.7
Location GMap Overlays (gmap_overlays) Module Enabled 7.x-1.x -dev

detran’s picture

Tested with newest version today. No luck!

greenskunk’s picture

Issue summary: View changes

If you are using the Google Maps API v3 & gmap_addons 6.x-1.x-dev then you'll want to update the file overlay_geoxml.js in gmap_addons/gmap_overlays/js/ as parts of the Google Maps API v2 have been deprecated. You'll want to use KmlLayer now instead of GGeoXML
Copy over line 15 with the following:

//obj.map.addOverlay(new GGeoXml(d.url));
          var kmlLayer = new google.maps.KmlLayer({
            url: d.url});
          kmlLayer.setMap(obj.map);

One small change and your KML maps should work again.

Patching & Testing

Testing and patching requested

farlap’s picture

Hello, I applied the code changes (#10) to overlay_geoxml.js (gmap_addons) and it works!
If you still can't see your KML it might be due to the format of the KML file itself.
I had a look at some examples that work, eg:
http://www.ancientforestnationalpark.org/AncientForestParkGoogleEarth.kml
http://jmfriedt.free.fr/060416.kml

NAIZ’s picture

When the load KML layer, then to the Google map covers all of the objects on this site, and I need that in the initial field of vision was a station where there is a marker. Those. I do not know how to do Zoom is a marker rather than objects.
How to make what would be the opening of the default map was on the marker, not the entire map?
help me please