I am trying to remove the poi when Modifying the Map Type Registry. The issue I am having is that when I use ImageMapType's getTileUrl method, the styles I add to options dissapear. Please take a look at this sample:
map.setOptions({
mapTypeControlOptions: {
mapTypeIds: ["Map", 'VFR', 'IFR Low', 'Satellite'],
position: google.maps.ControlPosition.TOP_LEFT
},
mapTypeId: "Map", //If I remove this line of code, the poi dissapear, else they appear
styles : [
{
"elementType": "all",
"featureType": "poi",
"stylers": [
{
"visibility": "off"
}
]
}
]
});
map.mapTypes.set(
"Map",
new google.maps.ImageMapType({
getTileUrl: (tileCoord, tileZoom) =>
`https://mt.google.com/vt/lyrs=p&x=${tileCoord.x}&y=${tileCoord.y}&z=${tileZoom}`,
tileSize: new google.maps.Size(256, 256),
name: 'Map',
maxZoom: 21
})
);
My question is how can I remove the poi when using ImageMapType's getTileUrl?
Thanks in advance.