function initializ...">

Javascript section in google maps where text becomes bold

Here's the code that affects it:

<script type="text/javascript">
    function initialize() {
      var latLng = new google.maps.LatLng(51.4893169, -2.1182648);
      var mapOptions = {
        center: latLng,
        zoom: 15,
        scrollwheel: false,
      };
      var map = new google.maps.Map(document.getElementById('map-canvas'),
        mapOptions);
      var image = 'images/map_blue.png';
      var marker = new google.maps.Marker({
        position: latLng,
        map: map,
        icon: image
      });
    }
    google.maps.event.addDomListener(window, 'load', initialize);
  </script>

      

This makes some of my text bold, nothing appears in google check element for bold or font. However, if I remove the above code ^ then it fixes itself.

This confuses me as I cannot see how the two could be related. I have checked for missing characters in my html but its perfect (checked on sites too).

Cheers Guys

+3


source to share


1 answer


Had the same problem, the reason is the "Roboto" page font with font-weight: 300, but google maps download this font weight 300 400 500 700, so the "normal" equalizer is 400, not 300, and the text gets bolder ...



+3


source







All Articles