Thank you for your support.
I’ll take a look and see if I can provide a working example to help.
Ben
Try something like this in your functions.php file:
function my_wpgeo_map_js_preoverlays( $output, $map_id ) {
// May Map KML
$output .= "var myMapKML = new google.maps.KmlLayer( {
url: 'http://kml-samples.googlecode.com/svn/trunk/kml/Model/ResourceMap/macky-alt.kml'
} );
myMapKML.setMap(" . $map_id . ");
";
return $output;
}
add_filter( 'wpgeo_map_js_preoverlays', 'my_wpgeo_map_js_preoverlays', 10, 2 );
Thread Starter
foxyea
(@foxyea)
Thanks for the great example!
Map KML layer is working now. Strange thing, the WP Geo widget we are using on the home page is now centering and zooming on the KML object. Is there a way to make the zoom show all points? We have some posts with map points that are outside of this KML layer boundary. See it here:
Home Page:
http://accesslocal.tv
Post with a map point outside of the KML layer:
http://accesslocal.tv/2014/05/30/hunger-awareness-week-spreads-the-importance-of-community-health/
Which widget are you using?
Thread Starter
foxyea
(@foxyea)
Ben,
We apologize for the delay in getting back to you, we launched a new theme that required our full attention and turned the mapping plugin off for a while for troubleshooting.
Now we are back using WP-Geo: Still getting the zooming and centering behavior on our KML layer.
To answer your question, we are using the WP-Geo Recent Locations widget.
Our other questions is regarding performance. We are seeing very large database requests and are trying to determine if it is WP-Geo. Turning the plugin off definitely improves overall performance and site load time. Any ideas on optimizing our server and preloads for WP-Geo?
Thanks again! We love the way this plugin works with our content, just trying to get the wrinkles out.