I'm working on an Android app that uses the Google Map. I have large Polygon that hides the map. But the labels are above of this but I want them under my Polygon. I do not want to turn off labels.
how the labels look above the polygon
I can set the labels' color to black to "hide" them but this changes the labels that is not under the Polygon
the map with black labels
this is how I add the polygon to the map:
hidePolygon = myMap.addPolygon(new PolygonOptions()
.addAll(points)
.strokeColor(Color.rgb(218, 112, 214))
.zIndex(100f)
.fillColor(0xFF000000));
my gmap style json:
[
{
"featureType": "all",
"elementType": "labels",
"stylers": [
{
"weight": "0.01"
}
]
},
{
"featureType": "all",
"elementType": "labels.text",
"stylers": [
{
"visibility": "off"
}
]
},
{
"featureType": "all",
"elementType": "labels.text.fill",
"stylers": [
{
"visibility": "on"
},
{
"saturation": "100"
},
{
"lightness": "-100"
},
{
"gamma": "0.00"
},
{
"color": "#000000"
}
]
},
{
"featureType": "all",
"elementType": "labels.text.stroke",
"stylers": [
{
"visibility": "on"
},
{
"color": "#000000"
},
{
"saturation": "-48"
},
{
"lightness": "-75"
},
{
"gamma": "4.80"
}
]
},
{
"featureType": "all",
"elementType": "labels.icon",
"stylers": [
{
"saturation": "-100"
},
{
"visibility": "on"
},
{
"lightness": "-100"
},
{
"color": "#000000"
}
]
},
{
"featureType": "landscape.man_made",
"elementType": "labels",
"stylers": [
{
"weight": "2.59"
}
]
}
]