I am trying to add 2 google.maps.Data layers one has all the google.maps.Data.Feature of type Point and another is google.maps.Data.Feature of type Polygon. I want to see the polygon data layer in the front and point data layer at the back.So i am setting zIndex for polygon data layer like this.
styleFunction1 : function(feature, resolution){
var styleOption = {
fillColor:"#AAAAAA",
fillOpacity:1,
strokeColor:"#000000",
strokeOpacity:1,
strokeWeight:1,
zIndex:4000000000
};
return styleOption;
},
datalayer1.setStyle(this.styleFunction1.bind(this));
And for Point data layer like this
styleFunction2 : function(feature, resolution){
var styleOption = {icon :{
fillColor:"#FF0000",
fillOpacity:1,
path:"M -1,-1 L -1,1 L 1,1 L 1,-1 L -1,-1
Z",
rotation:0,
scale:"6",
strokeColor:"#000000",
strokeOpacity:1,
strokeWeight:1
},
zIndex:2000000001
};
return styleOption;
},
datalayer2.setStyle(this.styleFunction2.bind(this));
Even though the zIndex of polygon data layer is more it should show in front but point layer is showing in the front. In the API documentation its given that points are always shown on front. But if that's the case how to manage data layers sequencing on map?