خرائط Google لا تظهر خلفية القمر الصناعي - الشوارع على خلفية بيضاء

StackOverflow https://stackoverflow.com/questions/2484169

  •  21-09-2019
  •  | 
  •  

سؤال

خريطة مخصصة مكسورة على عرض الأقمار الصناعية ، لا تظهر صور الأقمار الصناعية. أي أفكار ، ما هو الخطأ؟ التراكبات مكسورة أيضًا - إنها ليست شفافة.

alt text

شفرة:

<div id="map_canvas" class="grid_8 omega" style="width:460px; height: 420px"></div>
<script src="http://maps.google.com/maps?file=api&amp;v=3&amp;sensor=true&amp;key=my-key-is-here" type="text/javascript"></script>
<script type="text/javascript">
    function initialize() {
        if (GBrowserIsCompatible()) {
            var map = new GMap2(document.getElementById("map_canvas"));
            map.setCenter(new GLatLng(52.229676, 21.012229), 13);
            map.setMapType(G_HYBRID_MAP);
            map.setUIToDefault();
        }
        var geocoder = new GClientGeocoder();
        function showAddress(address) {
            geocoder.getLatLng(address, function(point) {
                if (!point) {
                    alert('Nie można znaleźć adresu: '+address);
                } else {
                    map.setCenter(point, 13);
                    var marker = new GMarker(point);
                    map.addOverlay(marker);
                    marker.openInfoWindowHtml(address);
                }
            }
            );
        }
        showAddress('some address goes here')
    }
    $('body').ready(initialize);
    $('body').unload(GUnload);
</script>
هل كانت مفيدة؟

المحلول

كان هذا بسبب إعداد CSS:

img {
    background: #FAFAFA;
}
مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top