0

H,

I want to display all KML/KMZ attachments to a wordpress post in one single gmap3. The page is rendering without any JS errors and the KML URLs are being pulled from the attachments correctly. However the KMLs are not showing, only the KMZ.

See here in action:

http://dev.felixsalomon.net/wordpress/geo-kml-kmz-bg/

(check the source code to see the two different URLs)

Any ideas what I'm doing wrong?

Dreamingof8a
  • 127
  • 11

1 Answers1

0

After some more testing I finally got it to run. It seems that every kmlLayer has to be added individually like so:

$the_map.gmap3({
  kmllayer:{
    options:{
      url: "first.url",
  opts:{}
}
  }
});
$the_map.gmap3({
  kmllayer:{
    options:{
      url: "second.url",
      opts:{}
    }
  }
});

wheras this approach will fail:

$the_map.gmap3({
    kmllayer:{
        options:{
          url: "first.url",
      opts:{}
        }
    },
    kmllayer:{
        options:{
          url: "second.url",
      opts:{}
        }
    }
});

I hope this will help someone in the future!

Dreamingof8a
  • 127
  • 11