How can i get a reference to map object, i have this code
HandleMapMounted (map) {
this._map = map;
var customMapType = new google.maps. StyleMapType (style_file, styledMapOptions);
this._map.mapTypes.set (MY_MAPTYPE_ID, customMapType);
}
Shows that maptypes is undefined
Please refer to Getting Help section in the README.
@victors141, did you end up getting an answer or a work around for this? I need to use it and can't find anything that will work.
['custom_style', new google.maps.StyledMapType([
{
elementType: 'labels',
stylers: [{visibility: 'off'}]
}
], {
name: 'Custom Style'
})]
]}
defaultMapTypeId={'custom_style'}
>
@MINZHE-XU Thanks for the example!
Most helpful comment
['custom_style', new google.maps.StyledMapType([
{
elementType: 'labels',
stylers: [{visibility: 'off'}]
}
], {
name: 'Custom Style'
})]
]}
defaultMapTypeId={'custom_style'}
>