Note that there are some explanatory texts on larger screens.

plurals
  1. POgoogle maps api - unwanted transparent borders
    text
    copied!<p>Followed by this example: <a href="https://developers.google.com/maps/documentation/javascript/examples/maptype-styled-simple" rel="nofollow noreferrer">https://developers.google.com/maps/documentation/javascript/examples/maptype-styled-simple</a></p> <p>and made a custom one </p> <p>my html(almost same, main diff. are <strong>var feartureOpts</strong> and <strong>var mapOtions</strong>): </p> <pre><code>&lt;script src="https://maps.googleapis.com/maps/api/js?v=3.exp&amp;sensor=false"&gt;&lt;/script&gt; &lt;script&gt; var map; var brooklyn = new google.maps.LatLng(52.330394, -23.661259); var MY_MAPTYPE_ID = 'custom_style'; function initialize() { var featureOpts = [ { stylers: [ { gamma: 1.56 }, { lightness: 25 }, { saturation: -100 } ] } ]; var mapOptions = { zoom: 17, disableDefaultUI: true, center: brooklyn, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.ROADMAP, MY_MAPTYPE_ID] }, mapTypeId: MY_MAPTYPE_ID }; map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions); var styledMapOptions = { name: 'Custom Style' }; var customMapType = new google.maps.StyledMapType(featureOpts, styledMapOptions); map.mapTypes.set(MY_MAPTYPE_ID, customMapType); } google.maps.event.addDomListener(window, 'load', initialize); &lt;/script&gt; &lt;div id="map-canvas" style="witdh: 100%; height: 350px;"&gt;&lt;/div&gt; </code></pre> <p>results: <img src="https://i.stack.imgur.com/icAX8.jpg" alt="enter image description here"></p> <p><br><br><br></p> <p><strong>QUESTION: how to remove those nasty semi-transparent square borders?</strong> <br><br><br></p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload