I am trying to incorporate Polygon layer and Placemarks layers into the same map.
However, after loading a Polygon layer from a .kml file using the geoxml3 parser.
I tried to load a few Placemarks layers and it was a success, however the Placemarks seems to be below the Polygons.
Tried searching online and tried the suggestion of loading layers only after parsing, but did not work. Also tried zIndex on kmllayer, but does not work as well.
What can I do to make the Placemarks appear on top of the Polygons?
A short portion of my code is shown below.
var map = new google.maps.Map(document.getElementById("map"), {
zoom: 12,
center: center
});
var geocoder = new google.maps.Geocoder();
var geoXml = new geoXML3.parser({
map: map,
singleInfoWindow: true,
zoom : false,
afterParse: loadPlacemarks
});
geoXml.parse('Polygons.kml');
function loadPlacemarks() {
var src = "http://xxx.xxx.xxx.xxx/Placemarks.kml";
var kmlLayer = new google.maps.KmlLayer(src, {
suppressInfoWindows: false,
preserveViewport: true,
map: map,
zIndex: 999
});
}