Title: Add KMLLayer
Last modified: August 30, 2016

---

# Add KMLLayer

 *  Resolved [kenoby](https://wordpress.org/support/users/kenoby/)
 * (@kenoby)
 * [11 years ago](https://wordpress.org/support/topic/add-kmllayer/)
 * Hi,
    I try to add kml layer as base of my placemarks map. I change functions.
   js code with this
 *     ```
       // Create the map
       			try
       			{
       				$.bgmp.map = new google.maps.Map( $.bgmp.canvas, mapOptions );
   
       				$.bgmp.ctaLayer = new google.maps.KmlLayer('http://path_to_my.kml',
       {
                             suppressInfoWindows: true,
                             map: $.bgmp.map,
                             preserveViewport: true
                         });
           $.bgmp.ctaLayer.setMap($.bgmp.map);
   
              			}
   
       			catch( e )
       ```
   
 * And in general that work, but not every time all map is loading correctly. Especially
   in IE and sometime in Chrome. The best performance is in Firefox, but also have
   a problems…
    Please for some advise to change other parts of code for better 
   performance.
 * [https://wordpress.org/plugins/basic-google-maps-placemarks/](https://wordpress.org/plugins/basic-google-maps-placemarks/)

Viewing 2 replies - 1 through 2 (of 2 total)

 *  Plugin Author [Ian Dunn](https://wordpress.org/support/users/iandunn/)
 * (@iandunn)
 * [11 years ago](https://wordpress.org/support/topic/add-kmllayer/#post-6255475)
 * I’m not sure, I’ve never tried to add layers.
 *  Thread Starter [kenoby](https://wordpress.org/support/users/kenoby/)
 * (@kenoby)
 * [11 years ago](https://wordpress.org/support/topic/add-kmllayer/#post-6255478)
 * Problem is when put map in any Tab shortcode. But without tabs work nice. If 
   there not have any conflict as described in your FAQ section.
    With code above
   need to add:
 *     ```
       $.bgmp.map					= undefined;
       $.bgmp.ctaLayer				= undefined;
       ```
   
 *  in // Initialize variables. Both in functions.js

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Add KMLLayer’ is closed to new replies.

 * ![](https://ps.w.org/basic-google-maps-placemarks/assets/icon-128x128.png?rev
   =1152531)
 * [Basic Google Maps Placemarks](https://wordpress.org/plugins/basic-google-maps-placemarks/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/basic-google-maps-placemarks/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/basic-google-maps-placemarks/)
 * [Active Topics](https://wordpress.org/support/plugin/basic-google-maps-placemarks/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/basic-google-maps-placemarks/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/basic-google-maps-placemarks/reviews/)

## Tags

 * [kml](https://wordpress.org/support/topic-tag/kml/)

 * 2 replies
 * 2 participants
 * Last reply from: [kenoby](https://wordpress.org/support/users/kenoby/)
 * Last activity: [11 years ago](https://wordpress.org/support/topic/add-kmllayer/#post-6255478)
 * Status: resolved