Can I remove the local language label and just show a specified language on Google embed map?

Can I remove the local language label and just show a specified language on Google embed map?

requirement preview

I found this doc and have tested it, but it can’t achieve my intended purpose.

It’s my test code.

<html lang="en">
<head>
    <title>Map test</title>
    <style type="text/css">
        #map {
            height : 400px;
            width  : 100%;
        }
    </style>
    <script>
        function initMap(){
            const map = new google.maps.Map(document.getElementById('map'), {
                zoom  : 8,
                center: {lat: 36.768532104638695, lng: 127.82733891396664},
                style : {
                    featureType: 'all',
                    elementType: 'labels',
                    stylers    : [
                        {
                            visibility: 'off'
                        }
                    ]
                }
            });
        }
    </script>
</head>
<body>
    <div id="map"></div>
    <script src="https://maps.googleapis.com/maps/api/js?key=REPLACE_YOUR_KEY&callback=initMap&libraries=&v=weekly&language=en&region=US" async></script>
</body>

I still find that the labels on the map have both English and local language. Like I will see English and Korean when I move to Republic of Korea’s map, I don’t want to show Korean on the map.

Does google map API provides relevant methods to fulfill this requirement? (Allows me to display only in English on the map, no matter which country I view.)

Leave a Comment